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

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

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
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/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 5541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5552 const Object& value = instr->value()->definition()->constant_value(); 5552 const Object& value = instr->value()->definition()->constant_value();
5553 if (IsNonConstant(value)) { 5553 if (IsNonConstant(value)) {
5554 SetValue(instr, non_constant_); 5554 SetValue(instr, non_constant_);
5555 } else if (IsConstant(value)) { 5555 } else if (IsConstant(value)) {
5556 // TODO(kmillikin): Handle assertion. 5556 // TODO(kmillikin): Handle assertion.
5557 SetValue(instr, non_constant_); 5557 SetValue(instr, non_constant_);
5558 } 5558 }
5559 } 5559 }
5560 5560
5561 5561
5562 void ConstantPropagator::VisitArgumentDefinitionTest(
5563 ArgumentDefinitionTestInstr* instr) {
5564 SetValue(instr, non_constant_);
5565 }
5566
5567
5568 void ConstantPropagator::VisitCurrentContext(CurrentContextInstr* instr) { 5562 void ConstantPropagator::VisitCurrentContext(CurrentContextInstr* instr) {
5569 SetValue(instr, non_constant_); 5563 SetValue(instr, non_constant_);
5570 } 5564 }
5571 5565
5572 5566
5573 void ConstantPropagator::VisitClosureCall(ClosureCallInstr* instr) { 5567 void ConstantPropagator::VisitClosureCall(ClosureCallInstr* instr) {
5574 SetValue(instr, non_constant_); 5568 SetValue(instr, non_constant_);
5575 } 5569 }
5576 5570
5577 5571
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
7139 7133
7140 // Insert materializations at environment uses. 7134 // Insert materializations at environment uses.
7141 const Class& cls = Class::Handle(alloc->constructor().Owner()); 7135 const Class& cls = Class::Handle(alloc->constructor().Owner());
7142 for (intptr_t i = 0; i < exits.length(); i++) { 7136 for (intptr_t i = 0; i < exits.length(); i++) {
7143 CreateMaterializationAt(exits[i], alloc, cls, *fields); 7137 CreateMaterializationAt(exits[i], alloc, cls, *fields);
7144 } 7138 }
7145 } 7139 }
7146 7140
7147 7141
7148 } // namespace dart 7142 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698