OLD | NEW |
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/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2299 } else { | 2299 } else { |
2300 return false; | 2300 return false; |
2301 } | 2301 } |
2302 ASSERT(unary_op != NULL); | 2302 ASSERT(unary_op != NULL); |
2303 ReplaceCall(call, unary_op); | 2303 ReplaceCall(call, unary_op); |
2304 return true; | 2304 return true; |
2305 } | 2305 } |
2306 | 2306 |
2307 | 2307 |
2308 // Using field class | 2308 // Using field class |
2309 static RawField* GetField(intptr_t class_id, const String& field_name) { | 2309 RawField* FlowGraphOptimizer::GetField(intptr_t class_id, |
2310 Isolate* isolate = Isolate::Current(); | 2310 const String& field_name) { |
2311 Class& cls = Class::Handle(isolate, isolate->class_table()->At(class_id)); | 2311 Class& cls = Class::Handle(Z, isolate()->class_table()->At(class_id)); |
2312 Field& field = Field::Handle(isolate); | 2312 Field& field = Field::Handle(Z); |
2313 while (!cls.IsNull()) { | 2313 while (!cls.IsNull()) { |
2314 field = cls.LookupInstanceField(field_name); | 2314 field = cls.LookupInstanceField(field_name); |
2315 if (!field.IsNull()) { | 2315 if (!field.IsNull()) { |
2316 return field.raw(); | 2316 return field.raw(); |
2317 } | 2317 } |
2318 cls = cls.SuperClass(); | 2318 cls = cls.SuperClass(); |
2319 } | 2319 } |
2320 return Field::null(); | 2320 return Field::null(); |
2321 } | 2321 } |
2322 | 2322 |
(...skipping 6467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8790 | 8790 |
8791 // Insert materializations at environment uses. | 8791 // Insert materializations at environment uses. |
8792 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 8792 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
8793 CreateMaterializationAt( | 8793 CreateMaterializationAt( |
8794 exits_collector_.exits()[i], alloc, *slots); | 8794 exits_collector_.exits()[i], alloc, *slots); |
8795 } | 8795 } |
8796 } | 8796 } |
8797 | 8797 |
8798 | 8798 |
8799 } // namespace dart | 8799 } // namespace dart |
OLD | NEW |