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

Unified Diff: runtime/vm/locations.h

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
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/locations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/locations.h
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index 89e6702abb27c3cf73b2e3923c40eb8926beea43..43182cd159ca42603bd9731fdc4eba70a61823cc 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -394,10 +394,16 @@ class LocationSummary : public ZoneAllocated {
kCallOnSlowPath
};
+ // Defaults to 1 output.
LocationSummary(intptr_t input_count,
intptr_t temp_count,
LocationSummary::ContainsCall contains_call);
+ LocationSummary(intptr_t input_count,
+ intptr_t temp_count,
+ intptr_t output_count,
+ LocationSummary::ContainsCall contains_call);
+
intptr_t input_count() const {
return input_locations_.length();
}
@@ -437,17 +443,21 @@ class LocationSummary : public ZoneAllocated {
temp_locations_.Add(loc);
}
- Location out() const {
- return output_location_;
+ intptr_t output_count() const {
+ return output_locations_.length();
}
- Location* out_slot() {
- return &output_location_;
+ Location out(intptr_t index) const {
+ return output_locations_[index];
}
- void set_out(Location loc) {
+ Location* out_slot(intptr_t index) {
+ return &output_locations_[index];
+ }
+
+ void set_out(intptr_t index, Location loc) {
ASSERT(!always_calls() || (loc.IsMachineRegister() || loc.IsInvalid()));
- output_location_ = loc;
+ output_locations_[index] = loc;
}
BitmapBuilder* stack_bitmap() const { return stack_bitmap_; }
@@ -471,10 +481,10 @@ class LocationSummary : public ZoneAllocated {
}
private:
- // TODO(vegorov): replace with ZoneArray.
- GrowableArray<Location> input_locations_;
- GrowableArray<Location> temp_locations_;
- Location output_location_;
+ ZoneGrowableArray<Location> input_locations_;
+ ZoneGrowableArray<Location> temp_locations_;
+ ZoneGrowableArray<Location> output_locations_;
+
BitmapBuilder* stack_bitmap_;
const ContainsCall contains_call_;
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/locations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698