Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(655)

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 17311002: Fix crash in OSR with --optimization-counter-threshold=-1: do not check for OSR if the optimizaiton… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 (FLAG_use_osr && compiler->CanOptimizeFunction() &&
2151 !compiler->is_optimizing() && in_loop()) {
siva 2013/06/17 21:31:40 Would it make sense to have a CanOSRFunction() hel
srdjan 2013/06/17 21:46:14 Done
2151 // In unoptimized code check the usage counter to trigger OSR at loop 2152 // In unoptimized code check the usage counter to trigger OSR at loop
2152 // stack checks. 2153 // stack checks.
2153 __ LoadObject(EDI, compiler->parsed_function().function()); 2154 __ LoadObject(EDI, compiler->parsed_function().function());
2154 __ cmpl(FieldAddress(EDI, Function::usage_counter_offset()), 2155 __ cmpl(FieldAddress(EDI, Function::usage_counter_offset()),
2155 Immediate(2 * FLAG_optimization_counter_threshold)); 2156 Immediate(2 * FLAG_optimization_counter_threshold));
2156 __ j(GREATER_EQUAL, slow_path->entry_label()); 2157 __ j(GREATER_EQUAL, slow_path->entry_label());
2157 } 2158 }
2158 __ Bind(slow_path->exit_label()); 2159 __ Bind(slow_path->exit_label());
2159 } 2160 }
2160 2161
(...skipping 2598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4759 PcDescriptors::kOther, 4760 PcDescriptors::kOther,
4760 locs()); 4761 locs());
4761 __ Drop(2); // Discard type arguments and receiver. 4762 __ Drop(2); // Discard type arguments and receiver.
4762 } 4763 }
4763 4764
4764 } // namespace dart 4765 } // namespace dart
4765 4766
4766 #undef __ 4767 #undef __
4767 4768
4768 #endif // defined TARGET_ARCH_IA32 4769 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698