Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index c5940a5ee5d27ef4e6fd76b65e4f99dec3583e89..8fe3d4cc83d7f903feb938234275fdaf1e639861 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -18667,13 +18667,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()); |
@@ -18705,6 +18698,23 @@ RawUserTag* UserTag::New(const String& label, Heap::Space space) { |
} |
+RawUserTag* UserTag::MakeDefault() { |
+ 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( |