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

Unified Diff: runtime/vm/raw_object.cc

Issue 10915120: In preparation for lazy deoptimization add "is_alive_" field to RawCode: visit embedded pointers on… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
« runtime/vm/raw_object.h ('K') | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.cc
===================================================================
--- runtime/vm/raw_object.cc (revision 11927)
+++ runtime/vm/raw_object.cc (working copy)
@@ -435,14 +435,17 @@
ObjectPointerVisitor* visitor) {
visitor->VisitPointers(raw_obj->from(), raw_obj->to());
- // Also visit all the embedded pointers in the corresponding instructions.
RawCode* obj = raw_obj->ptr();
intptr_t length = obj->pointer_offsets_length_;
- uword entry_point = reinterpret_cast<uword>(obj->instructions_->ptr()) +
- Instructions::HeaderSize();
- for (intptr_t i = 0; i < length; i++) {
- int32_t offset = obj->data_[i];
- visitor->VisitPointer(reinterpret_cast<RawObject**>(entry_point + offset));
+ if (obj->is_alive_ == 1) {
+ // Also visit all the embedded pointers in the corresponding instructions.
+ uword entry_point = reinterpret_cast<uword>(obj->instructions_->ptr()) +
+ Instructions::HeaderSize();
+ for (intptr_t i = 0; i < length; i++) {
+ int32_t offset = obj->data_[i];
+ visitor->VisitPointer(
+ reinterpret_cast<RawObject**>(entry_point + offset));
+ }
}
siva 2012/09/06 16:57:55 I am assuming the change to mark an object as not
srdjan 2012/09/06 17:06:03 Correct.
return Code::InstanceSize(length);
}
« runtime/vm/raw_object.h ('K') | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698