Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 0af766ac8dcfc3edb70adfbae07f5c3612864a2d..b16d1d582d3236126a02d92dc8e09321d17277aa 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -69,6 +69,7 @@ namespace dart { |
V(Float32x4) \ |
V(Int32x4) \ |
V(Float64x2) \ |
+ V(UserTag) \ |
#define CLASS_LIST_ARRAYS(V) \ |
V(Array) \ |
@@ -1581,6 +1582,29 @@ class RawMirrorReference : public RawInstance { |
}; |
+// UserTag are used by the profiler to track Dart script state. |
+class RawUserTag : public RawInstance { |
+ RAW_HEAP_OBJECT_IMPLEMENTATION(UserTag); |
+ |
+ RawObject** from() { |
+ return reinterpret_cast<RawObject**>(&ptr()->label_); |
+ } |
+ |
+ RawString* label_; |
+ |
+ RawObject** to() { |
+ return reinterpret_cast<RawObject**>(&ptr()->label_); |
+ } |
+ |
+ // Isolate unique tag. |
+ uword tag_; |
+ |
+ friend class SnapshotReader; |
+ |
+ public: |
+ uword tag() const { return tag_; } |
+}; |
+ |
// Class Id predicates. |
inline bool RawObject::IsErrorClassId(intptr_t index) { |