Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index 5ba48aa5d6e4d773bd883723589c4b1295b94ec4..8a268f622c5822c78d4f1243df5a9c9acf0454fd 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 { |
| @@ -2646,6 +2647,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(); |
| @@ -6642,6 +6644,44 @@ class MirrorReference : public Instance { |
| }; |
| +class UserTag : public Instance { |
| + public: |
| + intptr_t tag() const { return raw_ptr()->tag(); } |
| + void set_tag(intptr_t t) const { |
| + ASSERT(t >= UserTagHelper::kUserTagIdOffset); |
| + ASSERT(t < UserTagHelper::kUserTagIdOffset + UserTagHelper::kMaxUserTags); |
| + raw_ptr()->tag_ = t; |
| + }; |
| + |
| + RawString* label() const { |
| + return raw_ptr()->label_; |
| + } |
| + |
| + void make_active(); |
|
srdjan
2014/04/09 17:08:18
MakeActive
Cutch
2014/04/09 20:28:54
Done.
|
| + |
| + static intptr_t InstanceSize() { |
| + return RoundedAllocationSize(sizeof(RawUserTag)); |
| + } |
| + |
| + static RawUserTag* New(const String& label, |
| + Heap::Space space = Heap::kOld); |
| + |
| + static bool TagTableFull(Isolate* isolate); |
|
srdjan
2014/04/09 17:08:18
TagTableIsFull ?
Cutch
2014/04/09 20:28:54
Done.
|
| + |
| + private: |
| + static RawUserTag* FindTagInIsolate(Isolate* isolate, const String& label); |
| + static void AddTagToIsolate(Isolate* isolate, const UserTag& tag); |
| + |
| + static intptr_t FindAvailableTagId(Isolate* isolate); |
| + 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_); |