| 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/aot_optimizer.h" | 5 #include "vm/aot_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/branch_optimizer.h" | 8 #include "vm/branch_optimizer.h" |
| 9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 String::Handle(Z, Field::NameFromGetter(call->function_name())); | 1072 String::Handle(Z, Field::NameFromGetter(call->function_name())); |
| 1073 const Field& field = Field::ZoneHandle(Z, GetField(class_ids[0], field_name)); | 1073 const Field& field = Field::ZoneHandle(Z, GetField(class_ids[0], field_name)); |
| 1074 ASSERT(!field.IsNull()); | 1074 ASSERT(!field.IsNull()); |
| 1075 | 1075 |
| 1076 if (flow_graph()->InstanceCallNeedsClassCheck(call, | 1076 if (flow_graph()->InstanceCallNeedsClassCheck(call, |
| 1077 RawFunction::kImplicitGetter)) { | 1077 RawFunction::kImplicitGetter)) { |
| 1078 return false; | 1078 return false; |
| 1079 } | 1079 } |
| 1080 LoadFieldInstr* load = new (Z) LoadFieldInstr( | 1080 LoadFieldInstr* load = new (Z) LoadFieldInstr( |
| 1081 new (Z) Value(call->ArgumentAt(0)), &field, | 1081 new (Z) Value(call->ArgumentAt(0)), &field, |
| 1082 AbstractType::ZoneHandle(Z, field.type()), call->token_pos()); | 1082 AbstractType::ZoneHandle(Z, field.type()), call->token_pos(), NULL); |
| 1083 load->set_is_immutable(field.is_final()); | 1083 load->set_is_immutable(field.is_final()); |
| 1084 | 1084 |
| 1085 // Discard the environment from the original instruction because the load | 1085 // Discard the environment from the original instruction because the load |
| 1086 // can't deoptimize. | 1086 // can't deoptimize. |
| 1087 call->RemoveEnvironment(); | 1087 call->RemoveEnvironment(); |
| 1088 ReplaceCall(call, load); | 1088 ReplaceCall(call, load); |
| 1089 | 1089 |
| 1090 if (load->result_cid() != kDynamicCid) { | 1090 if (load->result_cid() != kDynamicCid) { |
| 1091 // Reset value types if guarded_cid was used. | 1091 // Reset value types if guarded_cid was used. |
| 1092 for (Value::Iterator it(load->input_use_list()); !it.Done(); it.Advance()) { | 1092 for (Value::Iterator it(load->input_use_list()); !it.Done(); it.Advance()) { |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2176 FlowGraph::kEffect); | 2176 FlowGraph::kEffect); |
| 2177 current_iterator()->RemoveCurrentFromGraph(); | 2177 current_iterator()->RemoveCurrentFromGraph(); |
| 2178 } | 2178 } |
| 2179 } | 2179 } |
| 2180 } | 2180 } |
| 2181 } | 2181 } |
| 2182 | 2182 |
| 2183 #endif // DART_PRECOMPILER | 2183 #endif // DART_PRECOMPILER |
| 2184 | 2184 |
| 2185 } // namespace dart | 2185 } // namespace dart |
| OLD | NEW |