| 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 | 49 |
| 50 bool FlowGraphCompiler::SupportsSinCos() { | 50 bool FlowGraphCompiler::SupportsSinCos() { |
| 51 return false; | 51 return false; |
| 52 } | 52 } |
| 53 | 53 |
| 54 | 54 |
| 55 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, | 55 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, |
| 56 DeoptInfoBuilder* builder, | 56 DeoptInfoBuilder* builder, |
| 57 const Array& deopt_table) { | 57 const Array& deopt_table) { |
| 58 if (deopt_env_ == NULL) return DeoptInfo::null(); | 58 if (deopt_env_ == NULL) { |
| 59 return DeoptInfo::null(); |
| 60 } |
| 59 | 61 |
| 60 intptr_t stack_height = compiler->StackSize(); | 62 intptr_t stack_height = compiler->StackSize(); |
| 61 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); | 63 AllocateIncomingParametersRecursive(deopt_env_, &stack_height); |
| 62 | 64 |
| 63 intptr_t slot_ix = 0; | 65 intptr_t slot_ix = 0; |
| 64 Environment* current = deopt_env_; | 66 Environment* current = deopt_env_; |
| 65 | 67 |
| 66 // Emit all kMaterializeObject instructions describing objects to be | 68 // Emit all kMaterializeObject instructions describing objects to be |
| 67 // materialized on the deoptimization as a prefix to the deoptimization info. | 69 // materialized on the deoptimization as a prefix to the deoptimization info. |
| 68 EmitMaterializations(deopt_env_, builder); | 70 EmitMaterializations(deopt_env_, builder); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 152 |
| 151 | 153 |
| 152 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 154 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
| 153 intptr_t stub_ix) { | 155 intptr_t stub_ix) { |
| 154 // Calls do not need stubs, they share a deoptimization trampoline. | 156 // Calls do not need stubs, they share a deoptimization trampoline. |
| 155 ASSERT(reason() != ICData::kDeoptAtCall); | 157 ASSERT(reason() != ICData::kDeoptAtCall); |
| 156 Assembler* assem = compiler->assembler(); | 158 Assembler* assem = compiler->assembler(); |
| 157 #define __ assem-> | 159 #define __ assem-> |
| 158 __ Comment("Deopt stub for id %" Pd "", deopt_id()); | 160 __ Comment("Deopt stub for id %" Pd "", deopt_id()); |
| 159 __ Bind(entry_label()); | 161 __ Bind(entry_label()); |
| 160 if (FLAG_trap_on_deoptimization) __ break_(0); | 162 if (FLAG_trap_on_deoptimization) { |
| 163 __ break_(0); |
| 164 } |
| 161 | 165 |
| 162 ASSERT(deopt_env() != NULL); | 166 ASSERT(deopt_env() != NULL); |
| 163 | 167 |
| 164 __ BranchLink(&StubCode::DeoptimizeLabel()); | 168 __ BranchLink(&StubCode::DeoptimizeLabel()); |
| 165 set_pc_offset(assem->CodeSize()); | 169 set_pc_offset(assem->CodeSize()); |
| 166 #undef __ | 170 #undef __ |
| 167 } | 171 } |
| 168 | 172 |
| 169 | 173 |
| 170 #define __ assembler()-> | 174 #define __ assembler()-> |
| (...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 __ AddImmediate(SP, kDoubleSize); | 1855 __ AddImmediate(SP, kDoubleSize); |
| 1852 } | 1856 } |
| 1853 | 1857 |
| 1854 | 1858 |
| 1855 #undef __ | 1859 #undef __ |
| 1856 | 1860 |
| 1857 | 1861 |
| 1858 } // namespace dart | 1862 } // namespace dart |
| 1859 | 1863 |
| 1860 #endif // defined TARGET_ARCH_MIPS | 1864 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |