OLD | NEW |
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/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 3267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3278 new GuardFieldInstr(store_value, | 3278 new GuardFieldInstr(store_value, |
3279 node->field(), | 3279 node->field(), |
3280 Isolate::Current()->GetNextDeoptId()); | 3280 Isolate::Current()->GetNextDeoptId()); |
3281 AddInstruction(guard); | 3281 AddInstruction(guard); |
3282 | 3282 |
3283 store_value = Bind(BuildLoadExprTemp()); | 3283 store_value = Bind(BuildLoadExprTemp()); |
3284 StoreInstanceFieldInstr* store = | 3284 StoreInstanceFieldInstr* store = |
3285 new StoreInstanceFieldInstr(node->field(), | 3285 new StoreInstanceFieldInstr(node->field(), |
3286 for_instance.value(), | 3286 for_instance.value(), |
3287 store_value, | 3287 store_value, |
3288 kEmitStoreBarrier); | 3288 kEmitStoreBarrier, |
| 3289 true); // Maybe initializing store. |
3289 ReturnDefinition(store); | 3290 ReturnDefinition(store); |
3290 } | 3291 } |
3291 | 3292 |
3292 | 3293 |
3293 // StoreInstanceFieldNode does not return result. | |
3294 void ValueGraphVisitor::VisitStoreInstanceFieldNode( | |
3295 StoreInstanceFieldNode* node) { | |
3296 UNIMPLEMENTED(); | |
3297 } | |
3298 | |
3299 | |
3300 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { | 3294 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { |
3301 if (node->field().is_const()) { | 3295 if (node->field().is_const()) { |
3302 ASSERT(node->field().value() != Object::sentinel().raw()); | 3296 ASSERT(node->field().value() != Object::sentinel().raw()); |
3303 ASSERT(node->field().value() != Object::transition_sentinel().raw()); | 3297 ASSERT(node->field().value() != Object::transition_sentinel().raw()); |
3304 Definition* result = | 3298 Definition* result = |
3305 new ConstantInstr(Instance::ZoneHandle(node->field().value())); | 3299 new ConstantInstr(Instance::ZoneHandle(node->field().value())); |
3306 return ReturnDefinition(result); | 3300 return ReturnDefinition(result); |
3307 } | 3301 } |
3308 Value* field_value = Bind(new ConstantInstr(node->field())); | 3302 Value* field_value = Bind(new ConstantInstr(node->field())); |
3309 LoadStaticFieldInstr* load = new LoadStaticFieldInstr(field_value); | 3303 LoadStaticFieldInstr* load = new LoadStaticFieldInstr(field_value); |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4042 LanguageError::kError, | 4036 LanguageError::kError, |
4043 Heap::kNew, | 4037 Heap::kNew, |
4044 "FlowGraphBuilder Bailout: %s %s", | 4038 "FlowGraphBuilder Bailout: %s %s", |
4045 String::Handle(function.name()).ToCString(), | 4039 String::Handle(function.name()).ToCString(), |
4046 reason)); | 4040 reason)); |
4047 Isolate::Current()->long_jump_base()->Jump(1, error); | 4041 Isolate::Current()->long_jump_base()->Jump(1, error); |
4048 } | 4042 } |
4049 | 4043 |
4050 | 4044 |
4051 } // namespace dart | 4045 } // namespace dart |
OLD | NEW |