| 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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 __ pushq(registers_[i]); | 35 __ pushq(registers_[i]); |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 } else { | 38 } else { |
| 39 // We have a deoptimization environment, we have to tear down optimized | 39 // We have a deoptimization environment, we have to tear down optimized |
| 40 // frame and recreate non-optimized one. | 40 // frame and recreate non-optimized one. |
| 41 __ leaq(RSP, | 41 __ leaq(RSP, |
| 42 Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize)); | 42 Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize)); |
| 43 | 43 |
| 44 const GrowableArray<Value*>& values = deoptimization_env_->values(); | 44 const GrowableArray<Value*>& values = deoptimization_env_->values(); |
| 45 const GrowableArray<Location>* locations = deoptimization_env_->locations(); | |
| 46 | |
| 47 for (intptr_t i = 0; i < values.length(); i++) { | 45 for (intptr_t i = 0; i < values.length(); i++) { |
| 48 const Location loc = (*locations)[i]; | 46 const Location loc = deoptimization_env_->LocationAt(i); |
| 49 if (loc.IsInvalid()) { | 47 if (loc.IsInvalid()) { |
| 50 ASSERT(values[i]->IsConstant()); | 48 ASSERT(values[i]->IsConstant()); |
| 51 __ PushObject(values[i]->AsConstant()->value()); | 49 __ PushObject(values[i]->AsConstant()->value()); |
| 52 } else { | 50 } else { |
| 53 ASSERT(loc.IsRegister()); | 51 ASSERT(loc.IsRegister()); |
| 54 __ pushq(loc.reg()); | 52 __ pushq(loc.reg()); |
| 55 } | 53 } |
| 56 } | 54 } |
| 57 } | 55 } |
| 58 | 56 |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1205 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1208 __ Exchange(mem1, mem2); | 1206 __ Exchange(mem1, mem2); |
| 1209 } | 1207 } |
| 1210 | 1208 |
| 1211 | 1209 |
| 1212 #undef __ | 1210 #undef __ |
| 1213 | 1211 |
| 1214 } // namespace dart | 1212 } // namespace dart |
| 1215 | 1213 |
| 1216 #endif // defined TARGET_ARCH_X64 | 1214 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |