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

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

Issue 10916078: Remove the is_used_ field from BindInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_test.cc » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return (other_constant != NULL) && 105 return (other_constant != NULL) &&
106 (value().raw() == other_constant->value().raw()); 106 (value().raw() == other_constant->value().raw());
107 } 107 }
108 108
109 109
110 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry) 110 GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry)
111 : BlockEntryInstr(CatchClauseNode::kInvalidTryIndex), 111 : BlockEntryInstr(CatchClauseNode::kInvalidTryIndex),
112 normal_entry_(normal_entry), 112 normal_entry_(normal_entry),
113 catch_entries_(), 113 catch_entries_(),
114 start_env_(NULL), 114 start_env_(NULL),
115 constant_null_(new BindInstr(BindInstr::kUsed, 115 constant_null_(new BindInstr(Definition::kValue,
116 new ConstantComp(Object::ZoneHandle()))), 116 new ConstantComp(Object::ZoneHandle()))),
117 spill_slot_count_(0) { 117 spill_slot_count_(0) {
118 } 118 }
119 119
120 120
121 MethodRecognizer::Kind MethodRecognizer::RecognizeKind( 121 MethodRecognizer::Kind MethodRecognizer::RecognizeKind(
122 const Function& function) { 122 const Function& function) {
123 // Only core and math library methods can be recognized. 123 // Only core and math library methods can be recognized.
124 const Library& core_lib = Library::Handle(Library::CoreLibrary()); 124 const Library& core_lib = Library::Handle(Library::CoreLibrary());
125 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary()); 125 const Library& core_impl_lib = Library::Handle(Library::CoreImplLibrary());
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 prev_instr->set_next(next_instr); 192 prev_instr->set_next(next_instr);
193 next_instr->set_previous(prev_instr); 193 next_instr->set_previous(prev_instr);
194 // Reset successor and previous instruction to indicate 194 // Reset successor and previous instruction to indicate
195 // that the instruction is removed from the graph. 195 // that the instruction is removed from the graph.
196 set_previous(NULL); 196 set_previous(NULL);
197 set_next(NULL); 197 set_next(NULL);
198 return return_previous ? prev_instr : next_instr; 198 return return_previous ? prev_instr : next_instr;
199 } 199 }
200 200
201 201
202 void BindInstr::InsertBefore(Instruction* next) { 202 void Definition::InsertBefore(Instruction* next) {
203 ASSERT(previous_ == NULL); 203 ASSERT(previous_ == NULL);
204 ASSERT(next_ == NULL); 204 ASSERT(next_ == NULL);
205 next_ = next; 205 next_ = next;
206 previous_ = next->previous_; 206 previous_ = next->previous_;
207 next->previous_ = this; 207 next->previous_ = this;
208 previous_->next_ = this; 208 previous_->next_ = this;
209 } 209 }
210 210
211 211
212 void BindInstr::InsertAfter(Instruction* prev) { 212 void Definition::InsertAfter(Instruction* prev) {
213 ASSERT(previous_ == NULL); 213 ASSERT(previous_ == NULL);
214 ASSERT(next_ == NULL); 214 ASSERT(next_ == NULL);
215 previous_ = prev; 215 previous_ = prev;
216 next_ = prev->next_; 216 next_ = prev->next_;
217 next_->previous_ = this; 217 next_->previous_ = this;
218 previous_->next_ = this; 218 previous_->next_ = this;
219 } 219 }
220 220
221 221
222 void ForwardInstructionIterator::RemoveCurrentFromGraph() { 222 void ForwardInstructionIterator::RemoveCurrentFromGraph() {
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 value->set_use_index(i); 1526 value->set_use_index(i);
1527 value->AddToEnvUseList(); 1527 value->AddToEnvUseList();
1528 } 1528 }
1529 instr->set_env(copy); 1529 instr->set_env(copy);
1530 } 1530 }
1531 1531
1532 1532
1533 #undef __ 1533 #undef __
1534 1534
1535 } // namespace dart 1535 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698