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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 17421003: Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call si… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 24207)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -274,17 +274,6 @@
}
-LocationSummary* ClosureCallInstr::MakeLocationSummary() const {
- const intptr_t kNumInputs = 0;
- const intptr_t kNumTemps = 1;
- LocationSummary* result =
- new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
- result->set_out(Location::RegisterLocation(RAX));
- result->set_temp(0, Location::RegisterLocation(R10)); // Arg. descriptor.
- return result;
-}
-
-
LocationSummary* LoadLocalInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 0;
return LocationSummary::Make(kNumInputs,
@@ -502,7 +491,7 @@
token_pos);
}
const int kNumberOfArguments = 2;
- const Array& kNoArgumentNames = Array::Handle();
+ const Array& kNoArgumentNames = Object::null_array();
const int kNumArgumentsChecked = 2;
const Immediate& raw_null =
@@ -524,8 +513,12 @@
equality_ic_data = original_ic_data.AsUnaryClassChecks();
}
} else {
+ const Array& arguments_descriptor =
+ Array::Handle(ArgumentsDescriptor::New(kNumberOfArguments,
+ kNoArgumentNames));
equality_ic_data = ICData::New(compiler->parsed_function().function(),
Symbols::EqualOperator(),
+ arguments_descriptor,
deopt_id,
kNumArgumentsChecked);
}
@@ -653,7 +646,7 @@
}
} else {
const int kNumberOfArguments = 2;
- const Array& kNoArgumentNames = Array::Handle();
+ const Array& kNoArgumentNames = Object::null_array();
compiler->GenerateStaticCall(deopt_id,
token_pos,
target,
@@ -1013,7 +1006,7 @@
compiler->EmitTestAndCall(ICData::Handle(ic_data()->AsUnaryClassChecks()),
RDI, // Class id register.
kNumArguments,
- Array::Handle(), // No named arguments.
+ Object::null_array(), // No named arguments.
deopt, // Deoptimize target.
deopt_id(),
token_pos(),
@@ -1040,15 +1033,19 @@
relational_ic_data = ic_data()->AsUnaryClassChecks();
}
} else {
+ const Array& arguments_descriptor =
+ Array::Handle(ArgumentsDescriptor::New(kNumArguments,
+ Object::null_array()));
relational_ic_data = ICData::New(compiler->parsed_function().function(),
function_name,
+ arguments_descriptor,
deopt_id(),
kNumArgsChecked);
}
compiler->GenerateInstanceCall(deopt_id(),
token_pos(),
kNumArguments,
- Array::ZoneHandle(), // No optional arguments.
+ Object::null_array(), // No optional args.
locs(),
relational_ic_data);
}
@@ -3794,7 +3791,7 @@
instance_call()->token_pos(),
target,
kNumberOfArguments,
- Array::Handle(), // No argument names.
+ Object::null_array(), // No argument names.
locs());
__ Bind(&done);
}
@@ -4321,6 +4318,17 @@
}
+LocationSummary* ClosureCallInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 0;
+ const intptr_t kNumTemps = 1;
+ LocationSummary* result =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ result->set_out(Location::RegisterLocation(RAX));
+ result->set_temp(0, Location::RegisterLocation(R10)); // Arg. descriptor.
+ return result;
+}
+
+
void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// The arguments to the stub include the closure, as does the arguments
// descriptor.
@@ -4330,6 +4338,7 @@
Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
argument_names()));
__ LoadObject(temp_reg, arguments_descriptor);
+ ASSERT(temp_reg == R10);
compiler->GenerateDartCall(deopt_id(),
token_pos(),
&StubCode::CallClosureFunctionLabel(),
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698