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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 678763004: Make CTX allocatable by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: incorporated latest comments Created 6 years, 2 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
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 41393)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -30,8 +30,8 @@
// Generic summary for call instructions that have all arguments pushed
// on the stack and return the result in a fixed register RAX.
-LocationSummary* Instruction::MakeCallSummary() {
- LocationSummary* result = new LocationSummary(
+LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) {
+ LocationSummary* result = new(isolate) LocationSummary(
Isolate::Current(), 0, 0, LocationSummary::kCall);
result->set_out(0, Location::RegisterLocation(RAX));
return result;
@@ -752,22 +752,11 @@
LocationSummary* NativeCallInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
- const intptr_t kNumInputs = 0;
- const intptr_t kNumTemps = 3;
- LocationSummary* locs = new(isolate) LocationSummary(
- isolate, kNumInputs, kNumTemps, LocationSummary::kCall);
- locs->set_temp(0, Location::RegisterLocation(RAX));
- locs->set_temp(1, Location::RegisterLocation(RBX));
- locs->set_temp(2, Location::RegisterLocation(R10));
- locs->set_out(0, Location::RegisterLocation(RAX));
- return locs;
+ return MakeCallSummary(isolate);
}
void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(locs()->temp(0).reg() == RAX);
- ASSERT(locs()->temp(1).reg() == RBX);
- ASSERT(locs()->temp(2).reg() == R10);
Register result = locs()->out(0).reg();
const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
const bool is_leaf_call =
@@ -5299,7 +5288,7 @@
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
Isolate* isolate, bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}
@@ -6375,7 +6364,7 @@
LocationSummary* AllocateObjectInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}

Powered by Google App Engine
This is Rietveld 408576698