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

Unified Diff: runtime/vm/intermediate_language_arm.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_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 41393)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -31,8 +31,7 @@
// Generic summary for call instructions that have all arguments pushed
// on the stack and return the result in a fixed register R0.
-LocationSummary* Instruction::MakeCallSummary() {
- Isolate* isolate = Isolate::Current();
+LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) {
LocationSummary* result = new(isolate) LocationSummary(
isolate, 0, 0, LocationSummary::kCall);
result->set_out(0, Location::RegisterLocation(R0));
@@ -919,22 +918,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(R1));
- locs->set_temp(1, Location::RegisterLocation(R2));
- locs->set_temp(2, Location::RegisterLocation(R5));
- locs->set_out(0, Location::RegisterLocation(R0));
- return locs;
+ return MakeCallSummary(isolate);
}
void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(locs()->temp(0).reg() == R1);
- ASSERT(locs()->temp(1).reg() == R2);
- ASSERT(locs()->temp(2).reg() == R5);
const Register result = locs()->out(0).reg();
// Push the result place holder initialized to NULL.
@@ -5746,7 +5734,7 @@
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
Isolate* isolate, bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}
@@ -6961,7 +6949,7 @@
LocationSummary* AllocateObjectInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}

Powered by Google App Engine
This is Rietveld 408576698