| 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 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3210 StoreStaticFieldNode* node, bool result_is_needed) { | 3210 StoreStaticFieldNode* node, bool result_is_needed) { |
| 3211 ValueGraphVisitor for_value(owner()); | 3211 ValueGraphVisitor for_value(owner()); |
| 3212 node->value()->Visit(&for_value); | 3212 node->value()->Visit(&for_value); |
| 3213 Append(for_value); | 3213 Append(for_value); |
| 3214 Value* store_value = NULL; | 3214 Value* store_value = NULL; |
| 3215 if (result_is_needed) { | 3215 if (result_is_needed) { |
| 3216 store_value = Bind(BuildStoreExprTemp(for_value.value())); | 3216 store_value = Bind(BuildStoreExprTemp(for_value.value())); |
| 3217 } else { | 3217 } else { |
| 3218 store_value = for_value.value(); | 3218 store_value = for_value.value(); |
| 3219 } | 3219 } |
| 3220 if (FLAG_enable_type_checks) { | |
| 3221 const AbstractType& type = AbstractType::ZoneHandle(node->field().type()); | |
| 3222 const String& dst_name = String::ZoneHandle(node->field().name()); | |
| 3223 store_value = BuildAssignableValue(node->value()->token_pos(), | |
| 3224 store_value, | |
| 3225 type, | |
| 3226 dst_name); | |
| 3227 } | |
| 3228 StoreStaticFieldInstr* store = | 3220 StoreStaticFieldInstr* store = |
| 3229 new StoreStaticFieldInstr(node->field(), store_value); | 3221 new StoreStaticFieldInstr(node->field(), store_value); |
| 3230 | 3222 |
| 3231 if (result_is_needed) { | 3223 if (result_is_needed) { |
| 3232 Do(store); | 3224 Do(store); |
| 3233 return BuildLoadExprTemp(); | 3225 return BuildLoadExprTemp(); |
| 3234 } else { | 3226 } else { |
| 3235 return store; | 3227 return store; |
| 3236 } | 3228 } |
| 3237 } | 3229 } |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3976 LanguageError::kBailout, | 3968 LanguageError::kBailout, |
| 3977 Heap::kNew, | 3969 Heap::kNew, |
| 3978 "FlowGraphBuilder Bailout: %s %s", | 3970 "FlowGraphBuilder Bailout: %s %s", |
| 3979 String::Handle(function.name()).ToCString(), | 3971 String::Handle(function.name()).ToCString(), |
| 3980 reason)); | 3972 reason)); |
| 3981 Isolate::Current()->long_jump_base()->Jump(1, error); | 3973 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 3982 UNREACHABLE(); | 3974 UNREACHABLE(); |
| 3983 } | 3975 } |
| 3984 | 3976 |
| 3985 } // namespace dart | 3977 } // namespace dart |
| OLD | NEW |