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

Unified Diff: runtime/vm/locations.h

Issue 296003013: - Reduce the number of Isolate::Current() calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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: runtime/vm/locations.h
===================================================================
--- runtime/vm/locations.h (revision 36483)
+++ runtime/vm/locations.h (working copy)
@@ -522,11 +522,13 @@
};
// Defaults to 1 output.
- LocationSummary(intptr_t input_count,
+ LocationSummary(Isolate* isolate,
+ intptr_t input_count,
intptr_t temp_count,
LocationSummary::ContainsCall contains_call);
- LocationSummary(intptr_t input_count,
+ LocationSummary(Isolate* isolate,
+ intptr_t input_count,
intptr_t temp_count,
intptr_t output_count,
LocationSummary::ContainsCall contains_call);
@@ -589,7 +591,15 @@
output_locations_[index] = loc;
}
- BitmapBuilder* stack_bitmap() const { return stack_bitmap_; }
+ BitmapBuilder* stack_bitmap() {
+ if (stack_bitmap_ == NULL) {
+ stack_bitmap_ = new BitmapBuilder();
+ }
+ return stack_bitmap_;
+ }
+ void SetStackBit(intptr_t index) {
+ stack_bitmap()->Set(index, true);
+ }
bool always_calls() const {
return contains_call_ == kCall;
@@ -614,9 +624,9 @@
}
private:
- ZoneGrowableArray<Location> input_locations_;
- ZoneGrowableArray<Location> temp_locations_;
- ZoneGrowableArray<Location> output_locations_;
+ GrowableArray<Location> input_locations_;
+ GrowableArray<Location> temp_locations_;
+ GrowableArray<Location> output_locations_;
BitmapBuilder* stack_bitmap_;

Powered by Google App Engine
This is Rietveld 408576698