| 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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 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 const Array& deopt_table) { |
| 48 if (deopt_env_ == NULL) return DeoptInfo::null(); | 49 if (deopt_env_ == NULL) return DeoptInfo::null(); |
| 49 | 50 |
| 50 intptr_t stack_height = compiler->StackSize(); | 51 intptr_t stack_height = compiler->StackSize(); |
| 51 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); | 52 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); |
| 52 | 53 |
| 53 intptr_t slot_ix = 0; | 54 intptr_t slot_ix = 0; |
| 54 Environment* current = deopt_env_; | 55 Environment* current = deopt_env_; |
| 55 | 56 |
| 56 // Emit all kMaterializeObject instructions describing objects to be | 57 // Emit all kMaterializeObject instructions describing objects to be |
| 57 // materialized on the deoptimization as a prefix to the deoptimization info. | 58 // materialized on the deoptimization as a prefix to the deoptimization info. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 builder->AddCallerPc(slot_ix++); | 127 builder->AddCallerPc(slot_ix++); |
| 127 | 128 |
| 128 // PC marker. | 129 // PC marker. |
| 129 builder->AddPcMarker(previous->function(), slot_ix++); | 130 builder->AddPcMarker(previous->function(), slot_ix++); |
| 130 | 131 |
| 131 // For the outermost environment, set the incoming arguments. | 132 // For the outermost environment, set the incoming arguments. |
| 132 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) { | 133 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) { |
| 133 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++); | 134 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++); |
| 134 } | 135 } |
| 135 | 136 |
| 136 const DeoptInfo& deopt_info = DeoptInfo::Handle(builder->CreateDeoptInfo()); | 137 const DeoptInfo& deopt_info = |
| 138 DeoptInfo::Handle(builder->CreateDeoptInfo(deopt_table)); |
| 137 return deopt_info.raw(); | 139 return deopt_info.raw(); |
| 138 } | 140 } |
| 139 | 141 |
| 140 | 142 |
| 141 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 143 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
| 142 intptr_t stub_ix) { | 144 intptr_t stub_ix) { |
| 143 // Calls do not need stubs, they share a deoptimization trampoline. | 145 // Calls do not need stubs, they share a deoptimization trampoline. |
| 144 ASSERT(reason() != kDeoptAtCall); | 146 ASSERT(reason() != kDeoptAtCall); |
| 145 Assembler* assem = compiler->assembler(); | 147 Assembler* assem = compiler->assembler(); |
| 146 #define __ assem-> | 148 #define __ assem-> |
| (...skipping 1764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1911 DRegister dreg = EvenDRegisterOf(reg); | 1913 DRegister dreg = EvenDRegisterOf(reg); |
| 1912 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1914 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1913 } | 1915 } |
| 1914 | 1916 |
| 1915 | 1917 |
| 1916 #undef __ | 1918 #undef __ |
| 1917 | 1919 |
| 1918 } // namespace dart | 1920 } // namespace dart |
| 1919 | 1921 |
| 1920 #endif // defined TARGET_ARCH_ARM | 1922 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |