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

Unified Diff: src/objects.h

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 10 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 | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index b49efaa1feb9eb6eb18d01870813954a9c919434..6bf42aff0eec43374a0bd1ec49d410eff70bb531 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2577,7 +2577,7 @@ class WeakFixedArray : public FixedArray {
void Remove(Handle<HeapObject> value);
- inline Object* Get(int index) const;
+ inline Object* Get(Heap* heap, int index) const;
inline int Length() const;
DECLARE_CAST(WeakFixedArray)
@@ -2591,6 +2591,7 @@ class WeakFixedArray : public FixedArray {
static void Set(Handle<WeakFixedArray> array, int index,
Handle<HeapObject> value);
+ inline bool EqualAt(int index, Object* object) const;
inline void clear(int index);
inline bool IsEmptySlot(int index) const;
@@ -9747,7 +9748,8 @@ class PropertyCell: public Cell {
class WeakCell : public HeapObject {
public:
- inline Object* value() const;
+ inline Object* value(Heap* heap);
+ inline Object* ValueNoReadBarrier();
// This should not be called by anyone except GC.
inline void clear();
@@ -9765,11 +9767,16 @@ class WeakCell : public HeapObject {
DECLARE_VERIFIER(WeakCell)
// Layout description.
- static const int kValueOffset = HeapObject::kHeaderSize;
- static const int kNextOffset = kValueOffset + kPointerSize;
+ static const int kValueOffsetDontForgetTheReadBarrier =
+ HeapObject::kHeaderSize;
+ static const int kNextOffset =
+ kValueOffsetDontForgetTheReadBarrier + kPointerSize;
static const int kSize = kNextOffset + kPointerSize;
- typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor;
+ static inline void TriggerReadBarrier(Object* possible_weak_cell);
+
+ typedef FixedBodyDescriptor<kValueOffsetDontForgetTheReadBarrier, kSize,
+ kSize> BodyDescriptor;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(WeakCell);
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698