Chromium Code Reviews| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2912 private: | 2912 private: |
| 2913 CheckStackOverflowInstr* instruction_; | 2913 CheckStackOverflowInstr* instruction_; |
| 2914 Label osr_entry_label_; | 2914 Label osr_entry_label_; |
| 2915 }; | 2915 }; |
| 2916 | 2916 |
| 2917 | 2917 |
| 2918 void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2918 void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2919 CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this); | 2919 CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this); |
| 2920 compiler->AddSlowPathCode(slow_path); | 2920 compiler->AddSlowPathCode(slow_path); |
| 2921 | 2921 |
| 2922 __ LoadImmediate(IP, Isolate::Current()->stack_limit_address()); | 2922 if (compiler->is_optimizing()) { |
| 2923 __ ldr(IP, Address(IP)); | 2923 __ LoadImmediate(IP, Isolate::Current()->stack_limit_address()); |
|
Cutch
2015/07/22 17:05:34
We should introduce a new function:
uword Assembl
| |
| 2924 __ ldr(IP, Address(IP)); | |
| 2925 } else { | |
| 2926 __ LoadIsolate(IP); | |
| 2927 __ ldr(IP, Address(IP, Isolate::stack_limit_offset())); | |
| 2928 } | |
| 2924 __ cmp(SP, Operand(IP)); | 2929 __ cmp(SP, Operand(IP)); |
| 2925 __ b(slow_path->entry_label(), LS); | 2930 __ b(slow_path->entry_label(), LS); |
| 2926 if (compiler->CanOSRFunction() && in_loop()) { | 2931 if (compiler->CanOSRFunction() && in_loop()) { |
| 2927 const Register temp = locs()->temp(0).reg(); | 2932 const Register temp = locs()->temp(0).reg(); |
| 2928 // In unoptimized code check the usage counter to trigger OSR at loop | 2933 // In unoptimized code check the usage counter to trigger OSR at loop |
| 2929 // stack checks. Use progressively higher thresholds for more deeply | 2934 // stack checks. Use progressively higher thresholds for more deeply |
| 2930 // nested loops to attempt to hit outer loops with OSR when possible. | 2935 // nested loops to attempt to hit outer loops with OSR when possible. |
| 2931 __ LoadObject(temp, compiler->parsed_function().function()); | 2936 __ LoadObject(temp, compiler->parsed_function().function()); |
| 2932 intptr_t threshold = | 2937 intptr_t threshold = |
| 2933 FLAG_optimization_counter_threshold * (loop_depth() + 1); | 2938 FLAG_optimization_counter_threshold * (loop_depth() + 1); |
| (...skipping 3916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6850 1, | 6855 1, |
| 6851 locs()); | 6856 locs()); |
| 6852 __ Drop(1); | 6857 __ Drop(1); |
| 6853 __ Pop(result); | 6858 __ Pop(result); |
| 6854 } | 6859 } |
| 6855 | 6860 |
| 6856 | 6861 |
| 6857 } // namespace dart | 6862 } // namespace dart |
| 6858 | 6863 |
| 6859 #endif // defined TARGET_ARCH_ARM | 6864 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |