| 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 30 matching lines...) Expand all Loading... |
| 41 // frame and recreate non-optimized one. | 41 // frame and recreate non-optimized one. |
| 42 __ leaq(RSP, | 42 __ leaq(RSP, |
| 43 Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize)); | 43 Address(RBP, ParsedFunction::kFirstLocalSlotIndex * kWordSize)); |
| 44 | 44 |
| 45 const GrowableArray<Value*>& values = deoptimization_env_->values(); | 45 const GrowableArray<Value*>& values = deoptimization_env_->values(); |
| 46 for (intptr_t i = 0; i < values.length(); i++) { | 46 for (intptr_t i = 0; i < values.length(); i++) { |
| 47 const Location loc = deoptimization_env_->LocationAt(i); | 47 const Location loc = deoptimization_env_->LocationAt(i); |
| 48 if (loc.IsInvalid()) { | 48 if (loc.IsInvalid()) { |
| 49 ASSERT(values[i]->IsConstant()); | 49 ASSERT(values[i]->IsConstant()); |
| 50 __ PushObject(values[i]->AsConstant()->value()); | 50 __ PushObject(values[i]->AsConstant()->value()); |
| 51 } else if (loc.IsRegister()) { |
| 52 __ pushq(loc.reg()); |
| 51 } else { | 53 } else { |
| 52 ASSERT(loc.IsRegister()); | 54 compiler->Bailout("unsupported deoptimization state"); |
| 53 __ pushq(loc.reg()); | |
| 54 } | 55 } |
| 55 } | 56 } |
| 56 } | 57 } |
| 57 | 58 |
| 58 if (compiler->IsLeaf()) { | 59 if (compiler->IsLeaf()) { |
| 59 Label L; | 60 Label L; |
| 60 __ call(&L); | 61 __ call(&L); |
| 61 const intptr_t offset = assem->CodeSize(); | 62 const intptr_t offset = assem->CodeSize(); |
| 62 __ Bind(&L); | 63 __ Bind(&L); |
| 63 __ popq(RAX); | 64 __ popq(RAX); |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1207 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
| 1207 __ Exchange(mem1, mem2); | 1208 __ Exchange(mem1, mem2); |
| 1208 } | 1209 } |
| 1209 | 1210 |
| 1210 | 1211 |
| 1211 #undef __ | 1212 #undef __ |
| 1212 | 1213 |
| 1213 } // namespace dart | 1214 } // namespace dart |
| 1214 | 1215 |
| 1215 #endif // defined TARGET_ARCH_X64 | 1216 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |