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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 16693006: Initial implementation of on-stack replacement (OSR). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up for review. 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/intermediate_language.h ('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
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 21ed7c90f79ade1fb2b3d6fdbc42e80f02b056c8..9c96af95fe8c01bf7a62a642afc231610dcf3ab3 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -1418,18 +1418,7 @@ void StubCode::GenerateOptimizedUsageCounterIncrement(Assembler* assembler) {
__ popq(func_reg); // Restore.
__ LeaveFrame();
}
- Label is_hot;
- if (FlowGraphCompiler::CanOptimize()) {
- ASSERT(FLAG_optimization_counter_threshold > 1);
- __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
- Immediate(FLAG_optimization_counter_threshold));
- __ j(GREATER_EQUAL, &is_hot, Assembler::kNearJump);
- // As long as VM has no OSR do not optimize in the middle of the function
- // but only at exit so that we have collected all type feedback before
- // optimizing.
- }
__ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
- __ Bind(&is_hot);
}
@@ -1440,22 +1429,10 @@ void StubCode::GenerateUsageCounterIncrement(Assembler* assembler,
Register func_reg = temp_reg;
ASSERT(ic_reg != func_reg);
__ movq(func_reg, FieldAddress(ic_reg, ICData::function_offset()));
- Label is_hot;
- if (FlowGraphCompiler::CanOptimize()) {
- ASSERT(FLAG_optimization_counter_threshold > 1);
- // The usage_counter is always less than FLAG_optimization_counter_threshold
- // except when the function gets optimized.
- __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
- Immediate(FLAG_optimization_counter_threshold));
- __ j(EQUAL, &is_hot, Assembler::kNearJump);
- // As long as VM has no OSR do not optimize in the middle of the function
- // but only at exit so that we have collected all type feedback before
- // optimizing.
- }
__ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
- __ Bind(&is_hot);
}
+
// Generate inline cache check for 'num_args'.
// RBX: Inline cache data object.
// R10: Arguments descriptor array.
« runtime/vm/intermediate_language.h ('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