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 3785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3796 kEmitStoreBarrier, | 3796 kEmitStoreBarrier, |
3797 node->token_pos()); | 3797 node->token_pos()); |
3798 // Maybe initializing unboxed store. | 3798 // Maybe initializing unboxed store. |
3799 store->set_is_potential_unboxed_initialization(true); | 3799 store->set_is_potential_unboxed_initialization(true); |
3800 ReturnDefinition(store); | 3800 ReturnDefinition(store); |
3801 } | 3801 } |
3802 | 3802 |
3803 | 3803 |
3804 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { | 3804 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { |
3805 if (node->field().is_const()) { | 3805 if (node->field().is_const()) { |
3806 ASSERT(node->field().value() != Object::sentinel().raw()); | 3806 ASSERT(node->field().StaticFieldValue() != Object::sentinel().raw()); |
3807 ASSERT(node->field().value() != Object::transition_sentinel().raw()); | 3807 ASSERT(node->field().StaticFieldValue() != |
hausner
2015/09/01 16:02:02
field().StaticFieldValue() seems a bit redundant,
siva
2015/09/03 23:32:09
I have renamed this to StaticValue as suggested by
| |
3808 Definition* result = | 3808 Object::transition_sentinel().raw()); |
3809 new(Z) ConstantInstr(Instance::ZoneHandle(Z, node->field().value())); | 3809 Definition* result = new(Z) ConstantInstr( |
3810 Instance::ZoneHandle(Z, node->field().StaticFieldValue())); | |
3810 return ReturnDefinition(result); | 3811 return ReturnDefinition(result); |
3811 } | 3812 } |
3812 Value* field_value = Bind(new(Z) ConstantInstr(node->field())); | 3813 Value* field_value = Bind(new(Z) ConstantInstr(node->field())); |
3813 LoadStaticFieldInstr* load = new(Z) LoadStaticFieldInstr(field_value); | 3814 LoadStaticFieldInstr* load = new(Z) LoadStaticFieldInstr(field_value); |
3814 ReturnDefinition(load); | 3815 ReturnDefinition(load); |
3815 } | 3816 } |
3816 | 3817 |
3817 | 3818 |
3818 Definition* EffectGraphVisitor::BuildStoreStaticField( | 3819 Definition* EffectGraphVisitor::BuildStoreStaticField( |
3819 StoreStaticFieldNode* node, bool result_is_needed) { | 3820 StoreStaticFieldNode* node, bool result_is_needed) { |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4675 Report::MessageF(Report::kBailout, | 4676 Report::MessageF(Report::kBailout, |
4676 Script::Handle(function.script()), | 4677 Script::Handle(function.script()), |
4677 function.token_pos(), | 4678 function.token_pos(), |
4678 "FlowGraphBuilder Bailout: %s %s", | 4679 "FlowGraphBuilder Bailout: %s %s", |
4679 String::Handle(function.name()).ToCString(), | 4680 String::Handle(function.name()).ToCString(), |
4680 reason); | 4681 reason); |
4681 UNREACHABLE(); | 4682 UNREACHABLE(); |
4682 } | 4683 } |
4683 | 4684 |
4684 } // namespace dart | 4685 } // namespace dart |
OLD | NEW |