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

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: 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scavenger.h » ('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 977ba55040acdc93904c958016db44714e6dce62..e86840f83e6bf997188826329287c621dda8f8cd 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -256,7 +256,7 @@ 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,
+ kTheBitFormerlyKnownAsTheWatchedBit = 0,
Ivan Posva 2016/05/20 18:13:35 I am planning to move the bits up by one separatel
kMarkBit = 1,
kCanonicalBit = 2,
kVMHeapObjectBit = 3,
@@ -374,21 +374,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 +506,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> {};
@@ -2174,7 +2157,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;
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698