Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index f42ab40472e93677eeae191f1e04948c485eda76..00f87c50eaccc9b40571064c9b044d7ff421a1ab 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -18,6 +18,7 @@ |
#include "vm/os.h" |
#include "vm/raw_object.h" |
#include "vm/scanner.h" |
+#include "vm/tags.h" |
namespace dart { |
@@ -2653,6 +2654,7 @@ class Library : public Object { |
static RawLibrary* MirrorsLibrary(); |
static RawLibrary* NativeWrappersLibrary(); |
static RawLibrary* TypedDataLibrary(); |
+ static RawLibrary* ProfilerLibrary(); |
// Eagerly compile all classes and functions in the library. |
static RawError* CompileAll(); |
@@ -6649,6 +6651,45 @@ class MirrorReference : public Instance { |
}; |
+class UserTag : public Instance { |
+ public: |
+ uword tag() const { return raw_ptr()->tag(); } |
+ void set_tag(uword t) const { |
+ ASSERT(t >= UserTags::kUserTagIdOffset); |
+ ASSERT(t < UserTags::kUserTagIdOffset + UserTags::kMaxUserTags); |
+ raw_ptr()->tag_ = t; |
+ }; |
+ |
+ RawString* label() const { |
+ return raw_ptr()->label_; |
+ } |
+ |
+ void MakeActive() const; |
+ static void ClearActive(); |
+ |
+ static intptr_t InstanceSize() { |
+ return RoundedAllocationSize(sizeof(RawUserTag)); |
+ } |
+ |
+ static RawUserTag* New(const String& label, |
+ Heap::Space space = Heap::kOld); |
+ |
+ static bool TagTableIsFull(Isolate* isolate); |
+ static RawUserTag* FindTagById(uword tag_id); |
+ |
+ private: |
+ static RawUserTag* FindTagInIsolate(Isolate* isolate, const String& label); |
+ static void AddTagToIsolate(Isolate* isolate, const UserTag& tag); |
+ |
+ void set_label(const String& tag_label) const { |
+ StorePointer(&raw_ptr()->label_, tag_label.raw()); |
+ } |
+ |
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(UserTag, Instance); |
+ friend class Class; |
+}; |
+ |
+ |
// Breaking cycles and loops. |
RawClass* Object::clazz() const { |
uword raw_value = reinterpret_cast<uword>(raw_); |