Chromium Code Reviews| 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 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3167 if (FLAG_enable_type_checks) { | 3167 if (FLAG_enable_type_checks) { |
| 3168 const AbstractType& type = AbstractType::ZoneHandle(node->field().type()); | 3168 const AbstractType& type = AbstractType::ZoneHandle(node->field().type()); |
| 3169 const String& dst_name = String::ZoneHandle(node->field().name()); | 3169 const String& dst_name = String::ZoneHandle(node->field().name()); |
| 3170 store_value = BuildAssignableValue(node->value()->token_pos(), | 3170 store_value = BuildAssignableValue(node->value()->token_pos(), |
| 3171 store_value, | 3171 store_value, |
| 3172 type, | 3172 type, |
| 3173 dst_name); | 3173 dst_name); |
| 3174 } | 3174 } |
| 3175 | 3175 |
| 3176 store_value = Bind(BuildStoreExprTemp(store_value)); | 3176 store_value = Bind(BuildStoreExprTemp(store_value)); |
| 3177 GuardFieldInstr* guard = | 3177 GuardFieldClassInstr* guard_field_class = |
| 3178 new GuardFieldInstr(store_value, | 3178 new GuardFieldClassInstr(store_value, |
| 3179 node->field(), | 3179 node->field(), |
| 3180 Isolate::Current()->GetNextDeoptId()); | 3180 Isolate::Current()->GetNextDeoptId()); |
|
Florian Schneider
2014/05/28 14:57:36
Why get a new deopt-id? The Instruction constructo
Florian Schneider
2014/05/28 14:58:52
Never mind this comment. It's needed because we us
| |
| 3181 AddInstruction(guard); | 3181 AddInstruction(guard_field_class); |
| 3182 | |
| 3183 store_value = Bind(BuildLoadExprTemp()); | |
| 3184 GuardFieldLengthInstr* guard_field_length = | |
| 3185 new GuardFieldLengthInstr(store_value, | |
| 3186 node->field(), | |
| 3187 Isolate::Current()->GetNextDeoptId()); | |
|
Florian Schneider
2014/05/28 14:57:36
Why get a new deopt-id? The Instruction constructo
| |
| 3188 AddInstruction(guard_field_length); | |
| 3189 | |
| 3182 | 3190 |
| 3183 store_value = Bind(BuildLoadExprTemp()); | 3191 store_value = Bind(BuildLoadExprTemp()); |
| 3184 StoreInstanceFieldInstr* store = | 3192 StoreInstanceFieldInstr* store = |
| 3185 new StoreInstanceFieldInstr(node->field(), | 3193 new StoreInstanceFieldInstr(node->field(), |
| 3186 for_instance.value(), | 3194 for_instance.value(), |
| 3187 store_value, | 3195 store_value, |
| 3188 kEmitStoreBarrier, | 3196 kEmitStoreBarrier, |
| 3189 node->token_pos()); | 3197 node->token_pos()); |
| 3190 store->set_is_initialization(true); // Maybe initializing store. | 3198 store->set_is_initialization(true); // Maybe initializing store. |
| 3191 ReturnDefinition(store); | 3199 ReturnDefinition(store); |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3968 LanguageError::kBailout, | 3976 LanguageError::kBailout, |
| 3969 Heap::kNew, | 3977 Heap::kNew, |
| 3970 "FlowGraphBuilder Bailout: %s %s", | 3978 "FlowGraphBuilder Bailout: %s %s", |
| 3971 String::Handle(function.name()).ToCString(), | 3979 String::Handle(function.name()).ToCString(), |
| 3972 reason)); | 3980 reason)); |
| 3973 Isolate::Current()->long_jump_base()->Jump(1, error); | 3981 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3974 UNREACHABLE(); | 3982 UNREACHABLE(); |
| 3975 } | 3983 } |
| 3976 | 3984 |
| 3977 } // namespace dart | 3985 } // namespace dart |
| OLD | NEW |