| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ASSERT(previous != NULL); | 145 ASSERT(previous != NULL); |
| 146 | 146 |
| 147 // For the outermost environment, set caller PC. | 147 // For the outermost environment, set caller PC. |
| 148 builder->AddCallerPc(slot_ix++); | 148 builder->AddCallerPc(slot_ix++); |
| 149 | 149 |
| 150 // For the outermost environment, set the incoming arguments. | 150 // For the outermost environment, set the incoming arguments. |
| 151 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) { | 151 for (intptr_t i = previous->fixed_parameter_count() - 1; i >= 0; i--) { |
| 152 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++); | 152 builder->AddCopy(previous->ValueAt(i), previous->LocationAt(i), slot_ix++); |
| 153 } | 153 } |
| 154 | 154 |
| 155 const DeoptInfo& deopt_info = | 155 return builder->CreateDeoptInfo(deopt_table); |
| 156 DeoptInfo::Handle(builder->CreateDeoptInfo(deopt_table)); | |
| 157 return deopt_info.raw(); | |
| 158 } | 156 } |
| 159 | 157 |
| 160 | 158 |
| 161 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 159 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
| 162 intptr_t stub_ix) { | 160 intptr_t stub_ix) { |
| 163 // Calls do not need stubs, they share a deoptimization trampoline. | 161 // Calls do not need stubs, they share a deoptimization trampoline. |
| 164 ASSERT(reason() != ICData::kDeoptAtCall); | 162 ASSERT(reason() != ICData::kDeoptAtCall); |
| 165 Assembler* assem = compiler->assembler(); | 163 Assembler* assem = compiler->assembler(); |
| 166 #define __ assem-> | 164 #define __ assem-> |
| 167 __ Comment("Deopt stub for id %" Pd "", deopt_id()); | 165 __ Comment("Deopt stub for id %" Pd "", deopt_id()); |
| (...skipping 1613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 __ movups(reg, Address(ESP, 0)); | 1779 __ movups(reg, Address(ESP, 0)); |
| 1782 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1780 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1783 } | 1781 } |
| 1784 | 1782 |
| 1785 | 1783 |
| 1786 #undef __ | 1784 #undef __ |
| 1787 | 1785 |
| 1788 } // namespace dart | 1786 } // namespace dart |
| 1789 | 1787 |
| 1790 #endif // defined TARGET_ARCH_IA32 | 1788 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |