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

Unified Diff: vm/raw_object.cc

Issue 9027017: - Promote objects from new gen to old space if they survived a scavenge. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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/scavenger.h » ('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 2792)
+++ vm/raw_object.cc (working copy)
@@ -23,6 +23,10 @@
RawClass* raw_class_class = raw_class->ptr()->class_;
ASSERT(raw_class_class->IsHeapObject());
ASSERT(raw_class_class->ptr()->instance_kind_ == kClass);
+
+ // Validate that the tags_ field is sensible.
+ intptr_t tags = ptr()->tags_;
+ ASSERT((tags & 0xfffffff0) == 0);
}
@@ -33,13 +37,6 @@
ASSERT(IsHeapObject());
RawClass* raw_class = ptr()->class_;
- if (IsMarked()) {
- // If the object is marked we need to remove the marking bits from the
- // raw_class which we loaded above.
- uword header_bits = reinterpret_cast<uword>(raw_class);
- header_bits = (header_bits & ~kMarkingMask) | kNotMarked;
- raw_class = reinterpret_cast<RawClass*>(header_bits);
- }
intptr_t instance_size = raw_class->ptr()->instance_size_;
ObjectKind instance_kind = raw_class->ptr()->instance_kind_;
@@ -174,19 +171,10 @@
// Read the necessary data out of the class before visting the class itself.
RawClass* raw_class = ptr()->class_;
- if (IsMarked()) {
- // If the object is marked we need to remove the marking bits from the
- // raw_class which we loaded above.
- uword header_bits = reinterpret_cast<uword>(raw_class);
- header_bits = (header_bits & ~kMarkingMask) | kNotMarked;
- raw_class = reinterpret_cast<RawClass*>(header_bits);
- }
ObjectKind kind = raw_class->ptr()->instance_kind_;
// Visit the class before visting the fields.
- if (!IsMarked()) {
- visitor->VisitPointer(reinterpret_cast<RawObject**>(&ptr()->class_));
- }
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&ptr()->class_));
switch (kind) {
#define RAW_VISITPOINTERS(clazz) \
« no previous file with comments | « vm/raw_object.h ('k') | vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698