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

Unified Diff: runtime/vm/isolate.cc

Issue 583583007: 1. Add user tag to the pointers traversed in the object store (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 40496)
+++ runtime/vm/isolate.cc (working copy)
@@ -440,6 +440,7 @@
thread_state_(NULL),
tag_table_(GrowableObjectArray::null()),
current_tag_(UserTag::null()),
+ default_tag_(UserTag::null()),
metrics_list_head_(NULL),
next_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
@@ -498,6 +499,7 @@
thread_state_(NULL),
tag_table_(GrowableObjectArray::null()),
current_tag_(UserTag::null()),
+ default_tag_(UserTag::null()),
metrics_list_head_(NULL),
next_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
@@ -1124,6 +1126,9 @@
// Visit the current tag which is stored in the isolate.
visitor->VisitPointer(reinterpret_cast<RawObject**>(&current_tag_));
+ // Visit the default tag which is stored in the isolate.
+ visitor->VisitPointer(reinterpret_cast<RawObject**>(&default_tag_));
+
// Visit the tag table which is stored in the isolate.
visitor->VisitPointer(reinterpret_cast<RawObject**>(&tag_table_));
@@ -1312,12 +1317,18 @@
void Isolate::set_current_tag(const UserTag& tag) {
- intptr_t user_tag = tag.tag();
- set_user_tag(static_cast<uword>(user_tag));
+ uword user_tag = tag.tag();
+ ASSERT(user_tag < kUwordMax);
+ set_user_tag(user_tag);
current_tag_ = tag.raw();
}
+void Isolate::set_default_tag(const UserTag& tag) {
+ default_tag_ = tag.raw();
+}
+
+
void Isolate::VisitIsolates(IsolateVisitor* visitor) {
if (visitor == NULL) {
return;
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698