diff options
Diffstat (limited to 'deps/v8/src/objects/feedback-vector.h')
-rw-r--r-- | deps/v8/src/objects/feedback-vector.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/deps/v8/src/objects/feedback-vector.h b/deps/v8/src/objects/feedback-vector.h index 89e0b9e6aa..af03bb4130 100644 --- a/deps/v8/src/objects/feedback-vector.h +++ b/deps/v8/src/objects/feedback-vector.h @@ -233,7 +233,9 @@ class FeedbackVector : public HeapObject { // Conversion from an integer index to the underlying array to a slot. static inline FeedbackSlot ToSlot(int index); inline MaybeObject Get(FeedbackSlot slot) const; + inline MaybeObject Get(Isolate* isolate, FeedbackSlot slot) const; inline MaybeObject get(int index) const; + inline MaybeObject get(Isolate* isolate, int index) const; inline void Set(FeedbackSlot slot, MaybeObject value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER); inline void set(int index, MaybeObject value, @@ -322,11 +324,13 @@ class FeedbackVector : public HeapObject { class BodyDescriptor; - // Garbage collection support. - static constexpr int SizeFor(int length) { - return kFeedbackSlotsOffset + length * kTaggedSize; + static constexpr int OffsetOfElementAt(int index) { + return kFeedbackSlotsOffset + index * kTaggedSize; } + // Garbage collection support. + static constexpr int SizeFor(int length) { return OffsetOfElementAt(length); } + private: static void AddToVectorsForProfilingTools(Isolate* isolate, Handle<FeedbackVector> vector); @@ -561,6 +565,7 @@ class FeedbackMetadata : public HeapObject { // Verify that an empty hash field looks like a tagged object, but can't // possibly be confused with a pointer. +// NOLINTNEXTLINE(runtime/references) (false positive) STATIC_ASSERT((Name::kEmptyHashField & kHeapObjectTag) == kHeapObjectTag); STATIC_ASSERT(Name::kEmptyHashField == 0x3); // Verify that a set hash field will not look like a tagged object. @@ -646,8 +651,9 @@ class V8_EXPORT_PRIVATE FeedbackNexus final { Map GetFirstMap() const; int ExtractMaps(MapHandles* maps) const; + int ExtractMapsAndHandlers(MapHandles* maps, + MaybeObjectHandles* handlers) const; MaybeObjectHandle FindHandlerForMap(Handle<Map> map) const; - bool FindHandlers(MaybeObjectHandles* code_list, int length = -1) const; bool IsCleared() const { InlineCacheState state = ic_state(); |