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

Unified Diff: runtime/vm/code_descriptors.h

Issue 10825077: Change the stackmap builder API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | « no previous file | runtime/vm/code_descriptors.cc » ('j') | runtime/vm/code_descriptors_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors.h
diff --git a/runtime/vm/code_descriptors.h b/runtime/vm/code_descriptors.h
index 5d2ac8e3915c03abf7a5a5914c0651d0a2ae995b..6a4630fc9cdb99a73067c19fd9289d098100612f 100644
--- a/runtime/vm/code_descriptors.h
+++ b/runtime/vm/code_descriptors.h
@@ -59,42 +59,15 @@ class DescriptorList : public ZoneAllocated {
};
-class StackmapBuilder : public ZoneAllocated {
+class StackmapTableBuilder : public ZoneAllocated {
public:
- StackmapBuilder() :
- builder_(new BitmapBuilder()),
+ StackmapTableBuilder() :
stack_map_(Stackmap::ZoneHandle()),
list_(GrowableObjectArray::ZoneHandle(
GrowableObjectArray::New(Heap::kOld))) { }
- ~StackmapBuilder() { }
+ ~StackmapTableBuilder() { }
- // Gets state of stack slot (object or regular value).
- bool IsSlotObject(intptr_t stack_slot) const {
- ASSERT(builder_ != NULL);
- return builder_->Get(stack_slot);
- }
- // Sets stack slot as containing an object.
- void SetSlotAsObject(intptr_t stack_slot) {
- ASSERT(builder_ != NULL);
- builder_->Set(stack_slot, true);
- }
- // Sets stack slot as containing regular value.
- void SetSlotAsValue(intptr_t stack_slot) {
- ASSERT(builder_ != NULL);
- builder_->Set(stack_slot, false);
- }
- // Sets min..max (inclusive) as stack slots containing objects.
- void SetSlotRangeAsObject(intptr_t min_stack_slot, intptr_t max_stack_slot) {
- ASSERT(builder_ != NULL);
- builder_->SetRange(min_stack_slot, max_stack_slot, true);
- }
- // Sets min..max (inclusive) as stack slots containing regular values.
- void SetSlotRangeAsValue(intptr_t min_stack_slot, intptr_t max_stack_slot) {
- ASSERT(builder_ != NULL);
- builder_->SetRange(min_stack_slot, max_stack_slot, false);
- }
-
- void AddEntry(intptr_t pc_offset);
+ void AddEntry(intptr_t pc_offset, BitmapBuilder* bitmap);
siva 2012/07/31 19:03:01 I would retain a StackmapBuilder class which has a
Kevin Millikin (Google) 2012/08/01 09:34:33 Thanks for the comment. I agree with the naming i
bool Verify();
@@ -104,10 +77,9 @@ class StackmapBuilder : public ZoneAllocated {
intptr_t Length() const { return list_.Length(); }
RawStackmap* Map(int index) const;
- BitmapBuilder* builder_;
Stackmap& stack_map_;
GrowableObjectArray& list_;
- DISALLOW_COPY_AND_ASSIGN(StackmapBuilder);
+ DISALLOW_COPY_AND_ASSIGN(StackmapTableBuilder);
};
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('j') | runtime/vm/code_descriptors_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698