| 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/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 bool FlowGraphCompiler::SupportsUnboxedMints() { | 41 bool FlowGraphCompiler::SupportsUnboxedMints() { |
| 42 return false; | 42 return false; |
| 43 } | 43 } |
| 44 | 44 |
| 45 | 45 |
| 46 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, | 46 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 47 DeoptInfoBuilder* builder) { | 47 DeoptInfoBuilder* builder) { |
| 48 if (deoptimization_env_ == NULL) return DeoptInfo::null(); | 48 if (deopt_env_ == NULL) return DeoptInfo::null(); |
| 49 | 49 |
| 50 intptr_t stack_height = compiler->StackSize(); | 50 intptr_t stack_height = compiler->StackSize(); |
| 51 AllocateIncomingParametersRecursive(deoptimization_env_, &stack_height); | 51 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); |
| 52 | 52 |
| 53 intptr_t slot_ix = 0; | 53 intptr_t slot_ix = 0; |
| 54 Environment* current = deoptimization_env_; | 54 Environment* current = deopt_env_; |
| 55 | 55 |
| 56 // Emit all kMaterializeObject instructions describing objects to be | 56 // Emit all kMaterializeObject instructions describing objects to be |
| 57 // materialized on the deoptimization as a prefix to the deoptimization info. | 57 // materialized on the deoptimization as a prefix to the deoptimization info. |
| 58 EmitMaterializations(deoptimization_env_, builder); | 58 EmitMaterializations(deopt_env_, builder); |
| 59 | 59 |
| 60 // The real frame starts here. | 60 // The real frame starts here. |
| 61 builder->MarkFrameStart(); | 61 builder->MarkFrameStart(); |
| 62 | 62 |
| 63 // Current PP, FP, and PC. | 63 // Current PP, FP, and PC. |
| 64 builder->AddPp(current->function(), slot_ix++); | 64 builder->AddPp(current->function(), slot_ix++); |
| 65 builder->AddCallerFp(slot_ix++); | 65 builder->AddCallerFp(slot_ix++); |
| 66 builder->AddReturnAddress(current->function(), | 66 builder->AddReturnAddress(current->function(), |
| 67 deopt_id(), | 67 deopt_id(), |
| 68 slot_ix++); | 68 slot_ix++); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 143 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
| 144 intptr_t stub_ix) { | 144 intptr_t stub_ix) { |
| 145 // Calls do not need stubs, they share a deoptimization trampoline. | 145 // Calls do not need stubs, they share a deoptimization trampoline. |
| 146 ASSERT(reason() != kDeoptAtCall); | 146 ASSERT(reason() != kDeoptAtCall); |
| 147 Assembler* assem = compiler->assembler(); | 147 Assembler* assem = compiler->assembler(); |
| 148 #define __ assem-> | 148 #define __ assem-> |
| 149 __ Comment("Deopt stub for id %"Pd"", deopt_id()); | 149 __ Comment("Deopt stub for id %"Pd"", deopt_id()); |
| 150 __ Bind(entry_label()); | 150 __ Bind(entry_label()); |
| 151 if (FLAG_trap_on_deoptimization) __ bkpt(0); | 151 if (FLAG_trap_on_deoptimization) __ bkpt(0); |
| 152 | 152 |
| 153 ASSERT(deoptimization_env() != NULL); | 153 ASSERT(deopt_env() != NULL); |
| 154 | 154 |
| 155 __ BranchLink(&StubCode::DeoptimizeLabel()); | 155 __ BranchLink(&StubCode::DeoptimizeLabel()); |
| 156 set_pc_offset(assem->CodeSize()); | 156 set_pc_offset(assem->CodeSize()); |
| 157 __ bkpt(0); // TODO(regis): Remove breakpoint to save space. | 157 __ bkpt(0); // TODO(regis): Remove breakpoint to save space. |
| 158 #undef __ | 158 #undef __ |
| 159 } | 159 } |
| 160 | 160 |
| 161 | 161 |
| 162 #define __ assembler()-> | 162 #define __ assembler()-> |
| 163 | 163 |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1575 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1576 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); | 1576 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 | 1579 |
| 1580 #undef __ | 1580 #undef __ |
| 1581 | 1581 |
| 1582 } // namespace dart | 1582 } // namespace dart |
| 1583 | 1583 |
| 1584 #endif // defined TARGET_ARCH_ARM | 1584 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |