Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 6255d2a840ec663eeec6b35534a7547db2bb5432..eacee907452c9dd40ac41472c7affd274327a0f1 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -18666,13 +18666,6 @@ void UserTag::MakeActive() const { |
} |
-void UserTag::ClearActive() { |
- Isolate* isolate = Isolate::Current(); |
- ASSERT(isolate != NULL); |
- isolate->clear_current_tag(); |
-} |
- |
- |
RawUserTag* UserTag::New(const String& label, Heap::Space space) { |
Isolate* isolate = Isolate::Current(); |
ASSERT(isolate->tag_table() != GrowableObjectArray::null()); |
@@ -18704,6 +18697,23 @@ RawUserTag* UserTag::New(const String& label, Heap::Space space) { |
} |
+RawUserTag* UserTag::DefaultTag() { |
+ Isolate* isolate = Isolate::Current(); |
+ ASSERT(isolate != NULL); |
+ ASSERT(isolate->object_store() != NULL); |
+ if (isolate->object_store()->default_tag() != UserTag::null()) { |
+ // Already created. |
+ return isolate->object_store()->default_tag(); |
+ } |
+ // Create default tag. |
+ const UserTag& result = UserTag::Handle(isolate, |
+ UserTag::New(Symbols::Default())); |
+ ASSERT(result.tag() == UserTags::kDefaultUserTag); |
+ isolate->object_store()->set_default_tag(result); |
+ return result.raw(); |
+} |
+ |
+ |
RawUserTag* UserTag::FindTagInIsolate(Isolate* isolate, const String& label) { |
ASSERT(isolate->tag_table() != GrowableObjectArray::null()); |
const GrowableObjectArray& tag_table = GrowableObjectArray::Handle( |