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

Unified Diff: vm/raw_object.cc

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, 8 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 | « vm/raw_object.h ('k') | vm/runtime_entry_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.cc
===================================================================
--- vm/raw_object.cc (revision 6294)
+++ vm/raw_object.cc (working copy)
@@ -228,6 +228,12 @@
}
+bool RawObject::FindObject(FindObjectVisitor* visitor) {
+ ASSERT(visitor != NULL);
+ return visitor->FindObject(const_cast<RawObject*>(this));
+}
+
+
intptr_t RawClass::VisitClassPointers(RawClass* raw_obj,
ObjectPointerVisitor* visitor) {
visitor->VisitPointers(raw_obj->from(), raw_obj->to());
@@ -369,6 +375,23 @@
}
+bool RawInstructions::ContainsPC(RawObject* raw_obj, uword pc) {
+ RawClass* raw_class = raw_obj->ptr()->class_;
+ ObjectKind instance_kind = raw_class->ptr()->instance_kind_;
+ if (instance_kind == kInstructions) {
+ RawInstructions* raw_instr = reinterpret_cast<RawInstructions*>(raw_obj);
+ uword start_pc =
+ reinterpret_cast<uword>(raw_instr->ptr()) + Instructions::HeaderSize();
+ uword end_pc = start_pc + raw_instr->ptr()->size_;
+ ASSERT(end_pc > start_pc);
+ if ((pc >= start_pc) && (pc < end_pc)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
intptr_t RawPcDescriptors::VisitPcDescriptorsPointers(
RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) {
RawPcDescriptors* obj = raw_obj->ptr();
« no previous file with comments | « vm/raw_object.h ('k') | vm/runtime_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698