| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2876 public: | 2876 public: |
| 2877 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) | 2877 explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction) |
| 2878 : instruction_(instruction) { } | 2878 : instruction_(instruction) { } |
| 2879 | 2879 |
| 2880 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { | 2880 virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2881 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { | 2881 if (FLAG_use_osr && osr_entry_label()->IsLinked()) { |
| 2882 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); | 2882 uword flags_address = Isolate::Current()->stack_overflow_flags_address(); |
| 2883 const Register value = instruction_->locs()->temp(0).reg(); | 2883 const Register value = instruction_->locs()->temp(0).reg(); |
| 2884 __ Comment("CheckStackOverflowSlowPathOsr"); | 2884 __ Comment("CheckStackOverflowSlowPathOsr"); |
| 2885 __ Bind(osr_entry_label()); | 2885 __ Bind(osr_entry_label()); |
| 2886 ASSERT(FLAG_allow_absolute_addresses); | 2886 if (FLAG_allow_absolute_addresses) { |
| 2887 __ LoadImmediate(IP, flags_address); | 2887 __ LoadImmediate(IP, flags_address); |
| 2888 __ LoadImmediate(value, Isolate::kOsrRequest); | 2888 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2889 __ str(value, Address(IP)); | 2889 __ str(value, Address(IP)); |
| 2890 } else { |
| 2891 __ LoadIsolate(IP); |
| 2892 __ LoadImmediate(value, Isolate::kOsrRequest); |
| 2893 __ str(value, Address(IP, Isolate::stack_overflow_flags_offset())); |
| 2894 } |
| 2890 } | 2895 } |
| 2891 __ Comment("CheckStackOverflowSlowPath"); | 2896 __ Comment("CheckStackOverflowSlowPath"); |
| 2892 __ Bind(entry_label()); | 2897 __ Bind(entry_label()); |
| 2893 compiler->SaveLiveRegisters(instruction_->locs()); | 2898 compiler->SaveLiveRegisters(instruction_->locs()); |
| 2894 // pending_deoptimization_env_ is needed to generate a runtime call that | 2899 // pending_deoptimization_env_ is needed to generate a runtime call that |
| 2895 // may throw an exception. | 2900 // may throw an exception. |
| 2896 ASSERT(compiler->pending_deoptimization_env_ == NULL); | 2901 ASSERT(compiler->pending_deoptimization_env_ == NULL); |
| 2897 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); | 2902 Environment* env = compiler->SlowPathEnvironmentFor(instruction_); |
| 2898 compiler->pending_deoptimization_env_ = env; | 2903 compiler->pending_deoptimization_env_ = env; |
| 2899 compiler->GenerateRuntimeCall(instruction_->token_pos(), | 2904 compiler->GenerateRuntimeCall(instruction_->token_pos(), |
| (...skipping 3961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6861 1, | 6866 1, |
| 6862 locs()); | 6867 locs()); |
| 6863 __ Drop(1); | 6868 __ Drop(1); |
| 6864 __ Pop(result); | 6869 __ Pop(result); |
| 6865 } | 6870 } |
| 6866 | 6871 |
| 6867 | 6872 |
| 6868 } // namespace dart | 6873 } // namespace dart |
| 6869 | 6874 |
| 6870 #endif // defined TARGET_ARCH_ARM | 6875 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |