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

Unified Diff: vm/raw_object.cc

Issue 10030001: Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions: (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') | vm/stack_frame.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.cc
===================================================================
--- vm/raw_object.cc (revision 6329)
+++ 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') | vm/stack_frame.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698