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

Unified Diff: runtime/vm/locations.cc

Issue 207063002: Refactor to support multiple outputs in location summary (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
« runtime/vm/locations.h ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/locations.cc
diff --git a/runtime/vm/locations.cc b/runtime/vm/locations.cc
index e5d0fab186b7863339dbaceeafd1af02d3aa48b9..48fb2416b82bcaeb4ee720f1ff151d39fef20576 100644
--- a/runtime/vm/locations.cc
+++ b/runtime/vm/locations.cc
@@ -25,10 +25,11 @@ intptr_t RegisterSet::RegisterCount(intptr_t registers) {
LocationSummary::LocationSummary(intptr_t input_count,
intptr_t temp_count,
- LocationSummary::ContainsCall contains_call)
+ LocationSummary::ContainsCall contains_call,
+ intptr_t output_count)
: input_locations_(input_count),
temp_locations_(temp_count),
- output_location_(),
+ output_locations_(output_count),
stack_bitmap_(NULL),
contains_call_(contains_call),
live_registers_() {
@@ -38,6 +39,11 @@ LocationSummary::LocationSummary(intptr_t input_count,
for (intptr_t i = 0; i < temp_count; i++) {
temp_locations_.Add(Location());
}
+ // TODO(johnmccutchan): Remove this assertion.
+ ASSERT(output_count == 1);
+ for (intptr_t i = 0; i < output_count; i++) {
+ output_locations_.Add(Location());
+ }
if (contains_call_ != kNoCall) {
stack_bitmap_ = new BitmapBuilder();
@@ -53,7 +59,7 @@ LocationSummary* LocationSummary::Make(
for (intptr_t i = 0; i < input_count; i++) {
summary->set_in(i, Location::RequiresRegister());
}
- summary->set_out(out);
+ summary->set_out(0, out);
return summary;
}
@@ -195,9 +201,9 @@ void LocationSummary::PrintTo(BufferFormatter* f) const {
f->Print("]");
}
- if (!out().IsInvalid()) {
+ if (!out(0).IsInvalid()) {
f->Print(" => ");
- out().PrintTo(f);
+ out(0).PrintTo(f);
}
if (always_calls()) f->Print(" C");
« runtime/vm/locations.h ('K') | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698