Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: runtime/vm/flow_graph_optimizer.cc

Issue 133853002: Undo workaround for a bug with compile-type of the context value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/pkg.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 4563 matching lines...) Expand 10 before | Expand all | Expand 10 after
4574 bool inputs_loop_invariant = true; 4574 bool inputs_loop_invariant = true;
4575 for (int i = 0; i < current->InputCount(); ++i) { 4575 for (int i = 0; i < current->InputCount(); ++i) {
4576 Definition* input_def = current->InputAt(i)->definition(); 4576 Definition* input_def = current->InputAt(i)->definition();
4577 if (!input_def->GetBlock()->Dominates(pre_header)) { 4577 if (!input_def->GetBlock()->Dominates(pre_header)) {
4578 inputs_loop_invariant = false; 4578 inputs_loop_invariant = false;
4579 break; 4579 break;
4580 } 4580 }
4581 } 4581 }
4582 if (inputs_loop_invariant && 4582 if (inputs_loop_invariant &&
4583 !current->IsAssertAssignable() && 4583 !current->IsAssertAssignable() &&
4584 !current->IsAssertBoolean() && 4584 !current->IsAssertBoolean()) {
4585 !current->IsGuardField()) {
4586 // TODO(fschneider): Enable hoisting of Assert-instructions 4585 // TODO(fschneider): Enable hoisting of Assert-instructions
4587 // if it safe to do. 4586 // if it safe to do.
4588 // TODO(15652): Hoisting guard-field instructions causes the
4589 // optimizing compiler to crash.
4590 Hoist(&it, pre_header, current); 4587 Hoist(&it, pre_header, current);
4591 } else if (current->IsCheckSmi() && 4588 } else if (current->IsCheckSmi() &&
4592 current->InputAt(0)->definition()->IsPhi()) { 4589 current->InputAt(0)->definition()->IsPhi()) {
4593 TryHoistCheckSmiThroughPhi( 4590 TryHoistCheckSmiThroughPhi(
4594 &it, header, pre_header, current->AsCheckSmi()); 4591 &it, header, pre_header, current->AsCheckSmi());
4595 } 4592 }
4596 } 4593 }
4597 } 4594 }
4598 } 4595 }
4599 } 4596 }
(...skipping 3721 matching lines...) Expand 10 before | Expand all | Expand 10 after
8321 } 8318 }
8322 8319
8323 // Insert materializations at environment uses. 8320 // Insert materializations at environment uses.
8324 for (intptr_t i = 0; i < exits.length(); i++) { 8321 for (intptr_t i = 0; i < exits.length(); i++) {
8325 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8322 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8326 } 8323 }
8327 } 8324 }
8328 8325
8329 8326
8330 } // namespace dart 8327 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698