| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2586 public: | 2586 public: |
| 2587 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2587 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
| 2588 : instruction_(instruction) { } | 2588 : instruction_(instruction) { } |
| 2589 | 2589 |
| 2590 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2590 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2591 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { | 2591 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { |
| 2592 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); | 2592 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); |
| 2593 const Register value = instruction_->locs()->temp(0).reg(); | 2593 const Register value = instruction_->locs()->temp(0).reg(); |
| 2594 __ Comment("CheckStackOverflowSlowPathOsr"); | 2594 __ Comment("CheckStackOverflowSlowPathOsr"); |
| 2595 __ Bind(osr_entry_label()); | 2595 __ Bind(osr_entry_label()); |
| 2596 ASSERT(FLAG_allow_absolute_addresses); | 2596 if (FLAG_allow_absolute_addresses) { |
| 2597 __ LoadImmediate(TMP, flags_address); | 2597 __ LoadImmediate(TMP, flags_address); |
| 2598 __ LoadImmediate(value, Isolate::kOsrRequest); | 2598 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2599 __ str(value, Address(TMP)); | 2599 __ str(value, Address(TMP)); |
| 2600 } else { |
| 2601 __ LoadIsolate(TMP); |
| 2602 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2603 __ str(value, Address(TMP, Isolate::stack_overflow_flags_offset())); |
| 2604 } |
| 2600 } | 2605 } |
| 2601 __ Comment("CheckStackOverflowSlowPath"); | 2606 __ Comment("CheckStackOverflowSlowPath"); |
| 2602 __ Bind(entry_label()); | 2607 __ Bind(entry_label()); |
| 2603 compiler->SaveLiveRegisters(instruction_->locs()); | 2608 compiler->SaveLiveRegisters(instruction_->locs()); |
| 2604 // pending_deoptimization_env_ is needed to generate a runtime call that | 2609 // pending_deoptimization_env_ is needed to generate a runtime call that |
| 2605 // may throw an exception. | 2610 // may throw an exception. |
| 2606 ASSERT(compiler->pending_deoptimization_env_ == NULL); | 2611 ASSERT(compiler->pending_deoptimization_env_ == NULL); |
| 2607 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 2612 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 2608 compiler->pending_deoptimization_env_ = env; | 2613 compiler->pending_deoptimization_env_ = env; |
| 2609 compiler->GenerateRuntimeCall(instruction_->token_pos(), | 2614 compiler->GenerateRuntimeCall(instruction_->token_pos(), |
| (...skipping 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5623 1, | 5628 1, |
| 5624 locs()); | 5629 locs()); |
| 5625 __ Drop(1); | 5630 __ Drop(1); |
| 5626 __ Pop(result); | 5631 __ Pop(result); |
| 5627 } | 5632 } |
| 5628 | 5633 |
| 5629 | 5634 |
| 5630 } // namespace dart | 5635 } // namespace dart |
| 5631 | 5636 |
| 5632 #endif // defined TARGET_ARCH_ARM64 | 5637 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |