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

Unified Diff: vm/object.h

Issue 11722026: Do not emit pointer information for embedded singleton VM Isolate objects while generating code. Th… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 12 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/heap.cc ('k') | vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 16644)
+++ vm/object.h (working copy)
@@ -202,6 +202,15 @@
bool IsNew() const { return raw()->IsNewObject(); }
bool IsOld() const { return raw()->IsOldObject(); }
+ bool InVMHeap() const {
+#if defined(DEBUG)
+ if (raw()->IsVMHeapObject()) {
+ Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
+ ASSERT(vm_isolate_heap->Contains(RawObject::ToAddr(raw())));
+ }
+#endif
+ return raw()->IsVMHeapObject();
+ }
// Print the object on stdout for debugging.
void Print() const;
@@ -6138,8 +6147,8 @@
if (FLAG_verify_handles) {
Heap* isolate_heap = isolate->heap();
Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
- ASSERT(isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr())) ||
- vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr())));
+ ASSERT(isolate_heap->Contains(RawObject::ToAddr(raw_)) ||
+ vm_isolate_heap->Contains(RawObject::ToAddr(raw_)));
}
ASSERT(builtin_vtables_[cid] ==
isolate->class_table()->At(cid)->ptr()->handle_vtable_);
« no previous file with comments | « vm/heap.cc ('k') | vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698