Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Unified Diff: runtime/vm/raw_object.h

Issue 1221503004: Reclaim the CreatedFromSnapshot bit and use it to indicate VM Heap object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address-code-review-comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 9976c936fa37ca79874cb846117ecbd5f30e5064..517379b64db8ea0dbd90a704ce051e78de4d0e8a 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -236,7 +236,7 @@ class RawObject {
kWatchedBit = 0,
kMarkBit = 1,
kCanonicalBit = 2,
- kFromSnapshotBit = 3,
+ kVMHeapObjectBit = 3,
kRememberedBit = 4,
#if defined(ARCH_IS_32_BIT)
kReservedTagPos = 5, // kReservedBit{100K,1M,10M}
@@ -315,8 +315,6 @@ class RawObject {
uword addr = reinterpret_cast<uword>(this);
return (addr & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
}
- // Assumes this is a heap object.
- bool IsVMHeapObject() const;
// Like !IsHeapObject() || IsOldObject(), but compiles to a single branch.
bool IsSmiOrOldObject() const {
@@ -372,11 +370,11 @@ class RawObject {
void ClearCanonical() {
UpdateTagBit<CanonicalObjectTag>(false);
}
- bool IsCreatedFromSnapshot() const {
- return CreatedFromSnapshotTag::decode(ptr()->tags_);
+ bool IsVMHeapObject() const {
+ return VMHeapObjectTag::decode(ptr()->tags_);
}
- void SetCreatedFromSnapshot() {
- UpdateTagBit<CreatedFromSnapshotTag>(true);
+ void SetVMHeapObject() {
+ UpdateTagBit<VMHeapObjectTag>(true);
}
// Support for GC remembered bit.
@@ -445,8 +443,8 @@ class RawObject {
return reinterpret_cast<uword>(raw_obj->ptr());
}
- static bool IsCreatedFromSnapshot(intptr_t value) {
- return CreatedFromSnapshotTag::decode(value);
+ static bool IsVMHeapObject(intptr_t value) {
+ return VMHeapObjectTag::decode(value);
}
static bool IsCanonical(intptr_t value) {
@@ -482,7 +480,7 @@ class RawObject {
class CanonicalObjectTag : public BitField<bool, kCanonicalBit, 1> {};
- class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {};
+ class VMHeapObjectTag : public BitField<bool, kVMHeapObjectBit, 1> {};
class ReservedBits : public
BitField<intptr_t, kReservedTagPos, kReservedTagSize> {}; // NOLINT
@@ -950,7 +948,9 @@ class RawLibrary : public RawObject {
bool corelib_imported_;
bool is_dart_scheme_;
bool debuggable_; // True if debugger can stop in library.
+ bool is_in_fullsnapshot_; // True if library is in a full snapshot.
+ friend class Class;
friend class Isolate;
};
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698