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

Unified Diff: runtime/vm/intermediate_language_ia32.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
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 14749)
+++ runtime/vm/intermediate_language_ia32.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);
Florian Schneider 2012/11/09 20:41:35 Make sure that marking this as kCall does not caus
srdjan 2012/11/09 20:54:31 Discussed off-line: nothing should survice a retur
locs->set_in(0, Location::RegisterLocation(EAX));
- locs->set_temp(0, Location::RequiresRegister());
+ locs->set_temp(0, Location::RegisterLocation(EDX));
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 == EAX);
if (!compiler->is_optimizing()) {
// Count only in unoptimized code.
@@ -53,35 +52,25 @@
// collection and counting stub.
const Function& function =
Function::ZoneHandle(compiler->parsed_function().function().raw());
- __ LoadObject(temp, function);
- __ incl(FieldAddress(temp, Function::usage_counter_offset()));
+ __ LoadObject(func_reg, function);
+ __ incl(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.
- __ cmpl(FieldAddress(temp, Function::usage_counter_offset()),
+ __ cmpl(FieldAddress(func_reg, Function::usage_counter_offset()),
Immediate(FLAG_optimization_counter_threshold));
Label not_yet_hot;
__ j(LESS, &not_yet_hot, Assembler::kNearJump);
- __ pushl(result); // Preserve result.
- __ pushl(temp); // Argument for runtime: function to optimize.
- __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
- __ popl(temp); // Remove argument.
- __ popl(result); // Restore result.
+ // Equal (or greater), optimize.
+ // The stub call preserves result register (EAX).
+ ASSERT(func_reg == EDX);
+ 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);
- __ pushl(result); // Preserve result.
- __ pushl(temp);
- compiler->GenerateCallRuntime(0,
- kTraceFunctionExitRuntimeEntry,
- locs());
- __ popl(temp); // Remove argument.
- __ popl(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
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698