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

Unified Diff: runtime/vm/intermediate_language_ia32.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_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 41393)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -30,10 +30,11 @@
// Generic summary for call instructions that have all arguments pushed
// on the stack and return the result in a fixed register EAX.
-LocationSummary* Instruction::MakeCallSummary() {
- Isolate* isolate = Isolate::Current();
+LocationSummary* Instruction::MakeCallSummary(Isolate* isolate) {
+ const intptr_t kNumInputs = 0;
+ const intptr_t kNumTemps= 0;
LocationSummary* result = new(isolate) LocationSummary(
- isolate, 0, 0, LocationSummary::kCall);
+ isolate, kNumInputs, kNumTemps, LocationSummary::kCall);
result->set_out(0, Location::RegisterLocation(EAX));
return result;
}
@@ -803,22 +804,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(EAX));
- locs->set_temp(1, Location::RegisterLocation(ECX));
- locs->set_temp(2, Location::RegisterLocation(EDX));
- locs->set_out(0, Location::RegisterLocation(EAX));
- return locs;
+ return MakeCallSummary(isolate);
}
void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(locs()->temp(0).reg() == EAX);
- ASSERT(locs()->temp(1).reg() == ECX);
- ASSERT(locs()->temp(2).reg() == EDX);
Register result = locs()->out(0).reg();
const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
const bool is_leaf_call =
@@ -5395,7 +5385,7 @@
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary(
Isolate* isolate, bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}
@@ -6740,7 +6730,7 @@
LocationSummary* AllocateObjectInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}
@@ -6766,7 +6756,6 @@
compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
#if defined(DEBUG)
__ movl(EDX, Immediate(kInvalidObjectPointer));
- __ movl(EDX, Immediate(kInvalidObjectPointer));
#endif
}

Powered by Google App Engine
This is Rietveld 408576698