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

Unified Diff: vm/raw_object.h

Issue 9791048: - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
Index: vm/raw_object.h
===================================================================
--- vm/raw_object.h (revision 5921)
+++ vm/raw_object.h (working copy)
@@ -251,6 +251,7 @@
void Validate() const;
intptr_t VisitPointers(ObjectPointerVisitor* visitor);
+ bool FindObject(FindObjectVisitor* visitor);
static RawObject* FromAddr(uword addr) {
// We expect the untagged address here.
@@ -270,6 +271,8 @@
return CanonicalObjectTag::decode(value);
}
+ static bool IsRawInstruction(RawObject* raw_obj);
+
protected:
RawClass* class_;
uword tags_; // Various object tags (bits).
@@ -665,6 +668,14 @@
// Variable length data follows here.
int32_t data_[0];
+
+ // Private helper function used while visiting stack frames during
+ // GC. The code which iterates over dart frames during GC is not
+ // allowed to create handles.
+ RawStackmap* GetStackmap(uword pc) const;
+
+ friend class DartFrame;
+ friend class StubFrame;
};
@@ -677,7 +688,13 @@
// Variable length data follows here.
uint8_t data_[0];
+ // Private helper function used while visiting stack frames. The
+ // code which iterates over dart frames is also called during GC and
+ // is not allowed to create handles.
+ static bool ContainsPC(RawObject* raw_obj, uword pc);
+
friend class RawCode;
+ friend class StackFrame;
};
@@ -714,6 +731,16 @@
// Variable length data follows here (bitmap of the stack layout).
uint8_t data_[0];
+
+ // Private helper functions used while visiting stack frames during
+ // GC. The code which iterates over dart frames during GC is not
+ // allowed to create handles.
+ bool IsObject(intptr_t bit_offset) const;
+ intptr_t SizeInBits() const;
+ uword PC() const { return ptr()->pc_; }
+
+ friend class RawCode;
+ friend class DartFrame;
};
@@ -1031,6 +1058,13 @@
return reinterpret_cast<RawObject**>(&ptr()->data()[length - 1]);
}
+ // Private helper functions used while visiting stack frames during
+ // GC. The code which iterates over dart frames during GC is not
+ // allowed to create handles.
+ intptr_t Length() const;
+ RawObject* DataAt(intptr_t index) const { return ptr()->data()[index]; }
+
+ friend class RawCode;
friend class RawImmutableArray;
friend class SnapshotReader;
friend class GrowableObjectArray;

Powered by Google App Engine
This is Rietveld 408576698