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

Unified Diff: runtime/vm/stub_code_x64.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
« runtime/vm/code_generator.cc ('K') | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 9644)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -1536,8 +1536,9 @@
if (FlowGraphCompiler::CanOptimize()) {
__ cmpq(FieldAddress(RCX, 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);
AssemblerMacros::EnterStubFrame(assembler);
__ pushq(RBX); // Preserve inline cache data object.
__ pushq(R10); // Preserve arguments array.
@@ -1548,6 +1549,7 @@
__ popq(RBX); // Restore inline cache data object.
__ LeaveFrame();
__ Bind(&not_yet_hot);
+ __ Bind(&already_optimized);
}
ASSERT(num_args > 0);
// Get receiver (first read number of arguments from argument descriptor array
« runtime/vm/code_generator.cc ('K') | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698