Index: runtime/vm/object.h |
diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
index 8df34c1cb0a9bde6b7348ca5698d90bdd53a36c0..8d3ef5ed66909c3decd135ee913e2f07ba3a321c 100644 |
--- a/runtime/vm/object.h |
+++ b/runtime/vm/object.h |
@@ -249,23 +249,6 @@ class Object { |
return AtomicOperations::CompareAndSwapWord( |
&raw()->ptr()->tags_, old_tags, new_tags); |
} |
- void set_tags(intptr_t value) const { |
- ASSERT(!IsNull()); |
- // TODO(asiva): Remove the capability of setting tags in general. The mask |
- // here only allows for canonical and from_snapshot flags to be set. |
- value = value & 0x0000000c; |
- uword tags = raw()->ptr()->tags_; |
- uword old_tags; |
- do { |
- old_tags = tags; |
- uword new_tags = (old_tags & ~0x0000000c) | value; |
- tags = CompareAndSwapTags(old_tags, new_tags); |
- } while (tags != old_tags); |
- } |
- void SetCreatedFromSnapshot() const { |
- ASSERT(!IsNull()); |
- raw()->SetCreatedFromSnapshot(); |
- } |
bool IsCanonical() const { |
ASSERT(!IsNull()); |
return raw()->IsCanonical(); |
@@ -728,7 +711,10 @@ class Object { |
return -kWordSize; |
} |
- static void InitializeObject(uword address, intptr_t id, intptr_t size); |
+ static void InitializeObject(uword address, |
+ intptr_t id, |
+ intptr_t size, |
+ bool is_vm_object); |
static void RegisterClass(const Class& cls, |
const String& name, |
@@ -945,6 +931,7 @@ class Class : public Object { |
RawString* Name() const; |
RawString* PrettyName() const; |
RawString* UserVisibleName() const; |
+ bool IsInFullSnapshot() const; |
virtual RawString* DictionaryName() const { return Name(); } |
@@ -1115,6 +1102,10 @@ class Class : public Object { |
static bool IsSignatureClass(RawClass* cls) { |
return cls->ptr()->signature_function_ != Object::null(); |
} |
+ static bool IsInFullSnapshot(RawClass* cls) { |
+ NoSafepointScope no_safepoint; |
+ return cls->ptr()->library_->ptr()->is_in_fullsnapshot_; |
+ } |
// Check if this class represents a canonical signature class, i.e. not an |
// alias as defined in a typedef. |
@@ -3392,6 +3383,11 @@ class Library : public Object { |
native_symbol_resolver); |
} |
+ bool is_in_fullsnapshot() const { return raw_ptr()->is_in_fullsnapshot_; } |
+ void set_is_in_fullsnapshot(bool value) const { |
+ StoreNonPointer(&raw_ptr()->is_in_fullsnapshot_, value); |
+ } |
+ |
RawError* Patch(const Script& script) const; |
RawString* PrivateName(const String& name) const; |