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

Unified Diff: vm/locations.h

Issue 10443013: Add support for temp locations and port Load-/StoreStaticField to use locations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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: vm/locations.h
===================================================================
--- vm/locations.h (revision 7955)
+++ vm/locations.h (working copy)
@@ -97,14 +97,19 @@
// Specification of locations for inputs and output.
class LocationSummary : public ZoneAllocated {
public:
- explicit LocationSummary(intptr_t count)
- : input_locations_(count), output_location_() {
- for (intptr_t i = 0; i < count; i++) {
+ LocationSummary(intptr_t input_count, intptr_t temp_count)
+ : input_locations_(input_count),
+ temp_locations_(temp_count),
+ output_location_() {
+ for (intptr_t i = 0; i < input_count; i++) {
input_locations_.Add(Location());
}
+ for (intptr_t i = 0; i < temp_count; i++) {
+ temp_locations_.Add(Location());
+ }
}
- intptr_t count() const {
+ intptr_t input_count() const {
return input_locations_.length();
}
@@ -116,6 +121,18 @@
input_locations_[index] = loc;
}
+ intptr_t temp_count() const {
+ return temp_locations_.length();
+ }
+
+ Location temp(intptr_t index) const {
+ return temp_locations_[index];
+ }
+
+ void set_temp(intptr_t index, Location loc) {
+ temp_locations_[index] = loc;
+ }
+
Location out() const {
return output_location_;
}
@@ -130,6 +147,7 @@
private:
// TODO(vegorov): replace with ZoneArray.
GrowableArray<Location> input_locations_;
+ GrowableArray<Location> temp_locations_;
Location output_location_;
};
« no previous file with comments | « vm/intermediate_language_x64.cc ('k') | vm/locations.cc » ('j') | vm/locations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698