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

Unified Diff: runtime/vm/intermediate_language.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.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 41393)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1055,7 +1055,7 @@
}
-void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
+PhiInstr* JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
// Lazily initialize the array of phis.
// Currently, phis are stored in a sparse array that holds the phi
// for variable with index i at position i.
@@ -1067,7 +1067,7 @@
}
}
ASSERT((*phis_)[var_index] == NULL);
- (*phis_)[var_index] = new PhiInstr(this, PredecessorCount());
+ return (*phis_)[var_index] = new PhiInstr(this, PredecessorCount());
}
@@ -2645,36 +2645,18 @@
LocationSummary* CurrentContextInstr::MakeLocationSummary(Isolate* isolate,
bool opt) const {
- return LocationSummary::Make(isolate,
- 0,
- Location::RegisterLocation(CTX),
- LocationSummary::kNoCall);
+ // Only appears in initial definitions, never in normal code.
+ UNREACHABLE();
+ return NULL;
}
void CurrentContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- // No code to emit. Just assert the correct result register.
- ASSERT(locs()->out(0).reg() == CTX);
+ // Only appears in initial definitions, never in normal code.
+ UNREACHABLE();
}
-LocationSummary* StoreContextInstr::MakeLocationSummary(Isolate* isolate,
- bool optimizing) const {
- const intptr_t kNumInputs = 1;
- const intptr_t kNumTemps = 0;
- LocationSummary* summary = new(isolate) LocationSummary(
- isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
- summary->set_in(0, Location::RegisterLocation(CTX));
- return summary;
-}
-
-
-void StoreContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- // Nothing to do. Context register was loaded by the register allocator.
- ASSERT(locs()->in(0).reg() == CTX);
-}
-
-
LocationSummary* PushTempInstr::MakeLocationSummary(Isolate* isolate,
bool optimizing) const {
return LocationSummary::Make(isolate,
@@ -2729,7 +2711,7 @@
LocationSummary* InstanceCallInstr::MakeLocationSummary(Isolate* isolate,
bool optimizing) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}
@@ -2847,7 +2829,7 @@
LocationSummary* StaticCallInstr::MakeLocationSummary(Isolate* isolate,
bool optimizing) const {
- return MakeCallSummary();
+ return MakeCallSummary(isolate);
}

Powered by Google App Engine
This is Rietveld 408576698