| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 | 163 |
| 164 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 164 void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 165 Register value = locs()->in(0).reg(); | 165 Register value = locs()->in(0).reg(); |
| 166 Register result = locs()->out().reg(); | 166 Register result = locs()->out().reg(); |
| 167 ASSERT(result == value); // Assert that register assignment is correct. | 167 ASSERT(result == value); // Assert that register assignment is correct. |
| 168 __ movq(Address(RBP, local().index() * kWordSize), value); | 168 __ movq(Address(RBP, local().index() * kWordSize), value); |
| 169 } | 169 } |
| 170 | 170 |
| 171 | 171 |
| 172 LocationSummary* MaterializeComp::MakeLocationSummary() const { | 172 LocationSummary* ConstantComp::MakeLocationSummary() const { |
| 173 return LocationSummary::Make(0, | 173 return LocationSummary::Make(0, |
| 174 Location::RequiresRegister(), | 174 Location::RequiresRegister(), |
| 175 LocationSummary::kNoCall); | 175 LocationSummary::kNoCall); |
| 176 } | 176 } |
| 177 | 177 |
| 178 | 178 |
| 179 void MaterializeComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 179 void ConstantComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 180 Register result = locs()->out().reg(); | 180 Register result = locs()->out().reg(); |
| 181 __ LoadObject(result, constant_val()->value()); | 181 __ LoadObject(result, value()); |
| 182 } | 182 } |
| 183 | 183 |
| 184 | 184 |
| 185 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { | 185 LocationSummary* AssertAssignableComp::MakeLocationSummary() const { |
| 186 const intptr_t kNumInputs = 3; | 186 const intptr_t kNumInputs = 3; |
| 187 const intptr_t kNumTemps = 0; | 187 const intptr_t kNumTemps = 0; |
| 188 LocationSummary* summary = | 188 LocationSummary* summary = |
| 189 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); | 189 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); |
| 190 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. | 190 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. |
| 191 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. | 191 summary->set_in(1, Location::RegisterLocation(RCX)); // Instantiator. |
| (...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2443 __ testq(value, Immediate(kSmiTagMask)); | 2443 __ testq(value, Immediate(kSmiTagMask)); |
| 2444 __ j(NOT_ZERO, deopt); | 2444 __ j(NOT_ZERO, deopt); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 | 2447 |
| 2448 } // namespace dart | 2448 } // namespace dart |
| 2449 | 2449 |
| 2450 #undef __ | 2450 #undef __ |
| 2451 | 2451 |
| 2452 #endif // defined TARGET_ARCH_X64 | 2452 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |