| 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/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const { | 1097 LocationSummary* LoadVMFieldComp::MakeLocationSummary() const { |
| 1098 return LocationSummary::Make(1, | 1098 return LocationSummary::Make(1, |
| 1099 Location::RequiresRegister(), | 1099 Location::RequiresRegister(), |
| 1100 LocationSummary::kNoCall); | 1100 LocationSummary::kNoCall); |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 | 1103 |
| 1104 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1104 void LoadVMFieldComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1105 Register instance_reg = locs()->in(0).reg(); | 1105 Register instance_reg = locs()->in(0).reg(); |
| 1106 Register result_reg = locs()->out().reg(); | 1106 Register result_reg = locs()->out().reg(); |
| 1107 if (HasICData()) { | |
| 1108 ASSERT(original() != NULL); | |
| 1109 Label* deopt = compiler->AddDeoptStub(original()->deopt_id(), | |
| 1110 kDeoptInstanceGetterSameTarget); | |
| 1111 // Smis do not have instance fields (Smi class is always first). | |
| 1112 // Use 'result' as temporary register. | |
| 1113 ASSERT(result_reg != instance_reg); | |
| 1114 ASSERT(ic_data() != NULL); | |
| 1115 compiler->EmitClassChecksNoSmi(*ic_data(), instance_reg, result_reg, deopt); | |
| 1116 } | |
| 1117 | 1107 |
| 1118 __ movl(result_reg, FieldAddress(instance_reg, offset_in_bytes())); | 1108 __ movl(result_reg, FieldAddress(instance_reg, offset_in_bytes())); |
| 1119 } | 1109 } |
| 1120 | 1110 |
| 1121 | 1111 |
| 1122 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const { | 1112 LocationSummary* InstantiateTypeArgumentsComp::MakeLocationSummary() const { |
| 1123 const intptr_t kNumInputs = 1; | 1113 const intptr_t kNumInputs = 1; |
| 1124 const intptr_t kNumTemps = 1; | 1114 const intptr_t kNumTemps = 1; |
| 1125 LocationSummary* locs = | 1115 LocationSummary* locs = |
| 1126 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 1116 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2221 } | 2211 } |
| 2222 __ j(ABOVE_EQUAL, deopt); | 2212 __ j(ABOVE_EQUAL, deopt); |
| 2223 } | 2213 } |
| 2224 | 2214 |
| 2225 | 2215 |
| 2226 } // namespace dart | 2216 } // namespace dart |
| 2227 | 2217 |
| 2228 #undef __ | 2218 #undef __ |
| 2229 | 2219 |
| 2230 #endif // defined TARGET_ARCH_X64 | 2220 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |