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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 11364184: Remove unused/not working function tracing flag and functionality. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 14749)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -20,7 +20,6 @@
namespace dart {
DECLARE_FLAG(int, optimization_counter_threshold);
-DECLARE_FLAG(bool, trace_functions);
DECLARE_FLAG(bool, propagate_ic_data);
// Generic summary for call instructions that have all arguments pushed
@@ -36,16 +35,16 @@
const intptr_t kNumInputs = 1;
const intptr_t kNumTemps = 1;
LocationSummary* locs =
- new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
locs->set_in(0, Location::RegisterLocation(RAX));
- locs->set_temp(0, Location::RequiresRegister());
+ locs->set_temp(0, Location::RegisterLocation(RDX));
return locs;
}
void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Register result = locs()->in(0).reg();
- Register temp = locs()->temp(0).reg();
+ Register func_reg = locs()->temp(0).reg();
ASSERT(result == RAX);
if (!compiler->is_optimizing()) {
__ Comment("Check function counter");
@@ -54,35 +53,25 @@
// collection and counting stub.
const Function& function =
Function::ZoneHandle(compiler->parsed_function().function().raw());
- __ LoadObject(temp, function);
- __ incq(FieldAddress(temp, Function::usage_counter_offset()));
+ __ LoadObject(func_reg, function);
+ __ incq(FieldAddress(func_reg, Function::usage_counter_offset()));
if (FlowGraphCompiler::CanOptimize() &&
compiler->parsed_function().function().is_optimizable()) {
// Do not optimize if usage count must be reported.
- __ cmpq(FieldAddress(temp, Function::usage_counter_offset()),
+ __ cmpq(FieldAddress(func_reg, Function::usage_counter_offset()),
Immediate(FLAG_optimization_counter_threshold));
Label not_yet_hot;
__ j(LESS, &not_yet_hot, Assembler::kNearJump);
- __ pushq(result); // Preserve result.
- __ pushq(temp); // Argument for runtime: function to optimize.
- __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
- __ popq(temp); // Remove argument.
- __ popq(result); // Restore result.
+ // Equal (or greater), optimize.
+ // The stub call preserves result register(RAX)
+ ASSERT(func_reg == RDX);
+ compiler->GenerateCall(0, // no token position.
+ &StubCode::OptimizeFunctionLabel(),
+ PcDescriptors::kOther,
+ locs());
__ Bind(&not_yet_hot);
}
}
- if (FLAG_trace_functions) {
- const Function& function =
- Function::ZoneHandle(compiler->parsed_function().function().raw());
- __ LoadObject(temp, function);
- __ pushq(result); // Preserve result.
- __ pushq(temp);
- compiler->GenerateCallRuntime(0,
- kTraceFunctionExitRuntimeEntry,
- NULL);
- __ popq(temp); // Remove argument.
- __ popq(result); // Restore result.
- }
#if defined(DEBUG)
// TODO(srdjan): Fix for functions with finally clause.
// A finally clause may leave a previously pushed return value if it

Powered by Google App Engine
This is Rietveld 408576698