| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2140 }; | 2140 }; |
| 2141 | 2141 |
| 2142 | 2142 |
| 2143 void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2143 void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2144 CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this); | 2144 CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this); |
| 2145 compiler->AddSlowPathCode(slow_path); | 2145 compiler->AddSlowPathCode(slow_path); |
| 2146 | 2146 |
| 2147 __ cmpl(ESP, | 2147 __ cmpl(ESP, |
| 2148 Address::Absolute(Isolate::Current()->stack_limit_address())); | 2148 Address::Absolute(Isolate::Current()->stack_limit_address())); |
| 2149 __ j(BELOW_EQUAL, slow_path->entry_label()); | 2149 __ j(BELOW_EQUAL, slow_path->entry_label()); |
| 2150 if (FLAG_use_osr && !compiler->is_optimizing() && in_loop()) { | 2150 if (compiler->CanOSRFunction() && in_loop()) { |
| 2151 // In unoptimized code check the usage counter to trigger OSR at loop | 2151 // In unoptimized code check the usage counter to trigger OSR at loop |
| 2152 // stack checks. | 2152 // stack checks. |
| 2153 __ LoadObject(EDI, compiler->parsed_function().function()); | 2153 __ LoadObject(EDI, compiler->parsed_function().function()); |
| 2154 __ cmpl(FieldAddress(EDI, Function::usage_counter_offset()), | 2154 __ cmpl(FieldAddress(EDI, Function::usage_counter_offset()), |
| 2155 Immediate(2 * FLAG_optimization_counter_threshold)); | 2155 Immediate(2 * FLAG_optimization_counter_threshold)); |
| 2156 __ j(GREATER_EQUAL, slow_path->entry_label()); | 2156 __ j(GREATER_EQUAL, slow_path->entry_label()); |
| 2157 } | 2157 } |
| 2158 __ Bind(slow_path->exit_label()); | 2158 __ Bind(slow_path->exit_label()); |
| 2159 } | 2159 } |
| 2160 | 2160 |
| (...skipping 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4759 PcDescriptors::kOther, | 4759 PcDescriptors::kOther, |
| 4760 locs()); | 4760 locs()); |
| 4761 __ Drop(2); // Discard type arguments and receiver. | 4761 __ Drop(2); // Discard type arguments and receiver. |
| 4762 } | 4762 } |
| 4763 | 4763 |
| 4764 } // namespace dart | 4764 } // namespace dart |
| 4765 | 4765 |
| 4766 #undef __ | 4766 #undef __ |
| 4767 | 4767 |
| 4768 #endif // defined TARGET_ARCH_IA32 | 4768 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |