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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 2, | 2121 2, |
2122 locs()); | 2122 locs()); |
2123 __ Drop(2); | 2123 __ Drop(2); |
2124 __ popl(kResultReg); | 2124 __ popl(kResultReg); |
2125 __ Bind(&done); | 2125 __ Bind(&done); |
2126 return; | 2126 return; |
2127 } | 2127 } |
2128 } | 2128 } |
2129 | 2129 |
2130 __ Bind(&slow_path); | 2130 __ Bind(&slow_path); |
| 2131 const Code& stub = Code::Handle(compiler->isolate(), |
| 2132 StubCode::AllocateArray_entry()->code()); |
| 2133 compiler->AddStubCallTarget(stub); |
2131 compiler->GenerateCall(token_pos(), | 2134 compiler->GenerateCall(token_pos(), |
2132 *StubCode::AllocateArray_entry(), | 2135 *StubCode::AllocateArray_entry(), |
2133 RawPcDescriptors::kOther, | 2136 RawPcDescriptors::kOther, |
2134 locs()); | 2137 locs()); |
2135 __ Bind(&done); | 2138 __ Bind(&done); |
2136 ASSERT(locs()->out(0).reg() == kResultReg); | 2139 ASSERT(locs()->out(0).reg() == kResultReg); |
2137 } | 2140 } |
2138 | 2141 |
2139 | 2142 |
2140 LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, | 2143 LocationSummary* LoadFieldInstr::MakeLocationSummary(Zone* zone, |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2396 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
2394 __ Comment("AllocateContextSlowPath"); | 2397 __ Comment("AllocateContextSlowPath"); |
2395 __ Bind(entry_label()); | 2398 __ Bind(entry_label()); |
2396 | 2399 |
2397 LocationSummary* locs = instruction_->locs(); | 2400 LocationSummary* locs = instruction_->locs(); |
2398 ASSERT(!locs->live_registers()->Contains(locs->out(0))); | 2401 ASSERT(!locs->live_registers()->Contains(locs->out(0))); |
2399 | 2402 |
2400 compiler->SaveLiveRegisters(locs); | 2403 compiler->SaveLiveRegisters(locs); |
2401 | 2404 |
2402 __ movl(EDX, Immediate(instruction_->num_context_variables())); | 2405 __ movl(EDX, Immediate(instruction_->num_context_variables())); |
| 2406 const Code& stub = Code::Handle(compiler->isolate(), |
| 2407 StubCode::AllocateContext_entry()->code()); |
| 2408 compiler->AddStubCallTarget(stub); |
2403 compiler->GenerateCall(instruction_->token_pos(), | 2409 compiler->GenerateCall(instruction_->token_pos(), |
2404 *StubCode::AllocateContext_entry(), | 2410 *StubCode::AllocateContext_entry(), |
2405 RawPcDescriptors::kOther, | 2411 RawPcDescriptors::kOther, |
2406 locs); | 2412 locs); |
2407 ASSERT(instruction_->locs()->out(0).reg() == EAX); | 2413 ASSERT(instruction_->locs()->out(0).reg() == EAX); |
2408 compiler->RestoreLiveRegisters(instruction_->locs()); | 2414 compiler->RestoreLiveRegisters(instruction_->locs()); |
2409 __ jmp(exit_label()); | 2415 __ jmp(exit_label()); |
2410 } | 2416 } |
2411 | 2417 |
2412 private: | 2418 private: |
(...skipping 4443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6856 __ Drop(1); | 6862 __ Drop(1); |
6857 __ popl(result); | 6863 __ popl(result); |
6858 } | 6864 } |
6859 | 6865 |
6860 | 6866 |
6861 } // namespace dart | 6867 } // namespace dart |
6862 | 6868 |
6863 #undef __ | 6869 #undef __ |
6864 | 6870 |
6865 #endif // defined TARGET_ARCH_IA32 | 6871 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |