| 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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 2693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2704 public: | 2704 public: |
| 2705 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2705 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
| 2706 : instruction_(instruction) { } | 2706 : instruction_(instruction) { } |
| 2707 | 2707 |
| 2708 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2708 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2709 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { | 2709 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { |
| 2710 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); | 2710 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); |
| 2711 Register value = instruction_->locs()->temp(0).reg(); | 2711 Register value = instruction_->locs()->temp(0).reg(); |
| 2712 __ Comment("CheckStackOverflowSlowPathOsr"); | 2712 __ Comment("CheckStackOverflowSlowPathOsr"); |
| 2713 __ Bind(osr_entry_label()); | 2713 __ Bind(osr_entry_label()); |
| 2714 ASSERT(FLAG_allow_absolute_addresses); | 2714 if (FLAG_allow_absolute_addresses) { |
| 2715 __ LoadImmediate(TMP, flags_address); | 2715 __ LoadImmediate(TMP, flags_address); |
| 2716 __ LoadImmediate(value, Isolate::kOsrRequest); | 2716 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2717 __ sw(value, Address(TMP)); | 2717 __ sw(value, Address(TMP)); |
| 2718 } else { |
| 2719 __ LoadIsolate(TMP); |
| 2720 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2721 __ sw(value, Address(TMP, Isolate::stack_overflow_flags_offset())); |
| 2722 } |
| 2718 } | 2723 } |
| 2719 __ Comment("CheckStackOverflowSlowPath"); | 2724 __ Comment("CheckStackOverflowSlowPath"); |
| 2720 __ Bind(entry_label()); | 2725 __ Bind(entry_label()); |
| 2721 compiler->SaveLiveRegisters(instruction_->locs()); | 2726 compiler->SaveLiveRegisters(instruction_->locs()); |
| 2722 // pending_deoptimization_env_ is needed to generate a runtime call that | 2727 // pending_deoptimization_env_ is needed to generate a runtime call that |
| 2723 // may throw an exception. | 2728 // may throw an exception. |
| 2724 ASSERT(compiler->pending_deoptimization_env_ == NULL); | 2729 ASSERT(compiler->pending_deoptimization_env_ == NULL); |
| 2725 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 2730 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 2726 compiler->pending_deoptimization_env_ = env; | 2731 compiler->pending_deoptimization_env_ = env; |
| 2727 compiler->GenerateRuntimeCall(instruction_->token_pos(), | 2732 compiler->GenerateRuntimeCall(instruction_->token_pos(), |
| (...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5598 1, | 5603 1, |
| 5599 locs()); | 5604 locs()); |
| 5600 __ lw(result, Address(SP, 1 * kWordSize)); | 5605 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5601 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5602 } | 5607 } |
| 5603 | 5608 |
| 5604 | 5609 |
| 5605 } // namespace dart | 5610 } // namespace dart |
| 5606 | 5611 |
| 5607 #endif // defined TARGET_ARCH_MIPS | 5612 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |