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

Unified Diff: runtime/vm/raw_object.h

Issue 2001713002: - Removed the kWatchedBit and the associated weak property handling (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove residual watched bit. Created 4 years, 7 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
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index ef5924e9f97533018301026464af053e5e5bce07..e0fc9d5bcc1dbfbfdadca98cc97104edf849ae16 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -256,21 +256,19 @@ class RawObject {
// The tags field which is a part of the object header uses the following
// bit fields for storing tags.
enum TagBits {
- kWatchedBit = 0,
- kMarkBit = 1,
- kCanonicalBit = 2,
- kVMHeapObjectBit = 3,
- kRememberedBit = 4,
+ kMarkBit = 0,
+ kCanonicalBit = 1,
+ kVMHeapObjectBit = 2,
+ kRememberedBit = 3,
+ kReservedTagPos = 4, // kReservedBit{100K,1M,10M}
#if defined(ARCH_IS_32_BIT)
- kReservedTagPos = 5, // kReservedBit{100K,1M,10M}
kReservedTagSize = 3,
rmacnak 2016/05/24 20:58:42 = 4
kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 8
kSizeTagSize = 8,
kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 16
kClassIdTagSize = 16,
#elif defined(ARCH_IS_64_BIT)
- kReservedTagPos = 5, // kReservedBit{100K,1M,10M}
- kReservedTagSize = 11,
+ kReservedTagSize = 12,
kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 16
kSizeTagSize = 16,
kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 32
@@ -374,21 +372,6 @@ class RawObject {
return TryAcquireTagBit<MarkBit>();
}
- // Support for GC watched bit.
- // TODO(iposva): Get rid of this.
- bool IsWatched() const {
- return WatchedBit::decode(ptr()->tags_);
- }
- void SetWatchedBitUnsynchronized() {
- ASSERT(!IsWatched());
- uword tags = ptr()->tags_;
- ptr()->tags_ = WatchedBit::update(true, tags);
- }
- void ClearWatchedBitUnsynchronized() {
- uword tags = ptr()->tags_;
- ptr()->tags_ = WatchedBit::update(false, tags);
- }
-
// Support for object tags.
bool IsCanonical() const {
return CanonicalObjectTag::decode(ptr()->tags_);
@@ -521,8 +504,6 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID)
private:
uword tags_; // Various object tags (bits).
- class WatchedBit : public BitField<uword, bool, kWatchedBit, 1> {};
-
class MarkBit : public BitField<uword, bool, kMarkBit, 1> {};
class RememberedBit : public BitField<uword, bool, kRememberedBit, 1> {};
@@ -2183,7 +2164,10 @@ class RawWeakProperty : public RawInstance {
return reinterpret_cast<RawObject**>(&ptr()->value_);
}
- friend class DelaySet;
+ // Linked list is chaining all pending weak properties.
+ // Untyped to make it clear that it is not to be visited by GC.
+ uword next_;
+
friend class GCMarker;
template<bool> friend class MarkingVisitorBase;
friend class Scavenger;
« runtime/vm/gc_marker.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698