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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 10704210: Fix problem of excessive attempts to optimize, fix excessive deoptimizations for load/store indexed… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 9644)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1562,8 +1562,9 @@
if (FlowGraphCompiler::CanOptimize()) {
__ cmpl(FieldAddress(EBX, Function::usage_counter_offset()),
Immediate(FLAG_optimization_counter_threshold));
- Label not_yet_hot;
- __ j(LESS_EQUAL, &not_yet_hot, Assembler::kNearJump);
+ Label not_yet_hot, already_optimized;
+ __ j(LESS, &not_yet_hot, Assembler::kNearJump);
+ __ j(GREATER, &already_optimized, Assembler::kNearJump);
// Create a stub frame as we are pushing some objects on the stack before
// calling into the runtime.
AssemblerMacros::EnterStubFrame(assembler);
@@ -1576,6 +1577,7 @@
__ popl(ECX); // Restore inline cache data object.
__ LeaveFrame();
__ Bind(&not_yet_hot);
+ __ Bind(&already_optimized);
}
ASSERT(num_args > 0);

Powered by Google App Engine
This is Rietveld 408576698