[ubsan] Clean up macro usage in *-inl.h
The incremental migration required several pairs of functionally equivalent macros. This patch consolidates everything onto the respective new version and drops the obsolete versions. Bug: v8:3770 Change-Id: I4fb05ff223e8250c83a13f46840810b0893f410b Reviewed-on: https://chromium-review.googlesource.com/c/1398223 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#58659}
This commit is contained in:
parent
56bed77bd5
commit
ec2f4acf4b
@ -23,7 +23,7 @@ namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(ScriptContextTable, FixedArray)
|
||||
CAST_ACCESSOR2(ScriptContextTable)
|
||||
CAST_ACCESSOR(ScriptContextTable)
|
||||
|
||||
int ScriptContextTable::used() const { return Smi::ToInt(get(kUsedSlotIndex)); }
|
||||
|
||||
@ -42,31 +42,31 @@ Handle<Context> ScriptContextTable::GetContext(Isolate* isolate,
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(Context, HeapObject)
|
||||
NEVER_READ_ONLY_SPACE_IMPL(Context)
|
||||
CAST_ACCESSOR2(Context)
|
||||
CAST_ACCESSOR(Context)
|
||||
SMI_ACCESSORS(Context, length, kLengthOffset)
|
||||
|
||||
CAST_ACCESSOR2(NativeContext)
|
||||
CAST_ACCESSOR(NativeContext)
|
||||
|
||||
Object Context::get(int index) const {
|
||||
DCHECK_LT(static_cast<unsigned>(index),
|
||||
static_cast<unsigned>(this->length()));
|
||||
return RELAXED_READ_FIELD(this, OffsetOfElementAt(index));
|
||||
return RELAXED_READ_FIELD(*this, OffsetOfElementAt(index));
|
||||
}
|
||||
|
||||
void Context::set(int index, Object value) {
|
||||
DCHECK_LT(static_cast<unsigned>(index),
|
||||
static_cast<unsigned>(this->length()));
|
||||
int offset = OffsetOfElementAt(index);
|
||||
RELAXED_WRITE_FIELD(this, offset, value);
|
||||
WRITE_BARRIER(this, offset, value);
|
||||
RELAXED_WRITE_FIELD(*this, offset, value);
|
||||
WRITE_BARRIER(*this, offset, value);
|
||||
}
|
||||
|
||||
void Context::set(int index, Object value, WriteBarrierMode mode) {
|
||||
DCHECK_LT(static_cast<unsigned>(index),
|
||||
static_cast<unsigned>(this->length()));
|
||||
int offset = OffsetOfElementAt(index);
|
||||
RELAXED_WRITE_FIELD(this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, offset, value, mode);
|
||||
RELAXED_WRITE_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
|
||||
}
|
||||
|
||||
void Context::set_scope_info(ScopeInfo scope_info) {
|
||||
|
@ -356,7 +356,7 @@ enum ContextLookupFlags {
|
||||
// the subsequent slots 1..used contain ScriptContexts.
|
||||
class ScriptContextTable : public FixedArray {
|
||||
public:
|
||||
DECL_CAST2(ScriptContextTable)
|
||||
DECL_CAST(ScriptContextTable)
|
||||
|
||||
struct LookupResult {
|
||||
int context_index;
|
||||
@ -441,7 +441,7 @@ class Context : public HeapObject {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
|
||||
DECL_CAST2(Context)
|
||||
DECL_CAST(Context)
|
||||
|
||||
// [length]: length of the context.
|
||||
V8_INLINE int length() const;
|
||||
@ -674,7 +674,7 @@ class Context : public HeapObject {
|
||||
|
||||
class NativeContext : public Context {
|
||||
public:
|
||||
DECL_CAST2(NativeContext)
|
||||
DECL_CAST(NativeContext)
|
||||
// TODO(neis): Move some stuff from Context here.
|
||||
|
||||
// [microtask_queue]: pointer to the MicrotaskQueue object.
|
||||
|
@ -25,8 +25,8 @@ OBJECT_CONSTRUCTORS_IMPL(FeedbackMetadata, HeapObject)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(FeedbackVector)
|
||||
|
||||
CAST_ACCESSOR2(FeedbackVector)
|
||||
CAST_ACCESSOR2(FeedbackMetadata)
|
||||
CAST_ACCESSOR(FeedbackVector)
|
||||
CAST_ACCESSOR(FeedbackMetadata)
|
||||
|
||||
INT32_ACCESSORS(FeedbackMetadata, slot_count, kSlotCountOffset)
|
||||
|
||||
@ -89,8 +89,8 @@ int FeedbackMetadata::GetSlotSize(FeedbackSlotKind kind) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
ACCESSORS2(FeedbackVector, shared_function_info, SharedFunctionInfo,
|
||||
kSharedFunctionInfoOffset)
|
||||
ACCESSORS(FeedbackVector, shared_function_info, SharedFunctionInfo,
|
||||
kSharedFunctionInfoOffset)
|
||||
WEAK_ACCESSORS(FeedbackVector, optimized_code_weak_or_smi, kOptimizedCodeOffset)
|
||||
INT32_ACCESSORS(FeedbackVector, length, kLengthOffset)
|
||||
INT32_ACCESSORS(FeedbackVector, invocation_count, kInvocationCountOffset)
|
||||
@ -150,7 +150,7 @@ MaybeObject FeedbackVector::get(int index) const {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, this->length());
|
||||
int offset = kFeedbackSlotsOffset + index * kPointerSize;
|
||||
return RELAXED_READ_WEAK_FIELD(this, offset);
|
||||
return RELAXED_READ_WEAK_FIELD(*this, offset);
|
||||
}
|
||||
|
||||
void FeedbackVector::Set(FeedbackSlot slot, MaybeObject value,
|
||||
@ -162,8 +162,8 @@ void FeedbackVector::set(int index, MaybeObject value, WriteBarrierMode mode) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, this->length());
|
||||
int offset = kFeedbackSlotsOffset + index * kPointerSize;
|
||||
RELAXED_WRITE_WEAK_FIELD(this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(this, offset, value, mode);
|
||||
RELAXED_WRITE_WEAK_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(*this, offset, value, mode);
|
||||
}
|
||||
|
||||
void FeedbackVector::Set(FeedbackSlot slot, Object value,
|
||||
|
@ -151,7 +151,7 @@ class FeedbackVector : public HeapObject {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
|
||||
DECL_CAST2(FeedbackVector)
|
||||
DECL_CAST(FeedbackVector)
|
||||
|
||||
inline void ComputeCounts(int* with_type_info, int* generic,
|
||||
int* vector_ic_count);
|
||||
@ -162,11 +162,11 @@ class FeedbackVector : public HeapObject {
|
||||
|
||||
// [shared_function_info]: The shared function info for the function with this
|
||||
// feedback vector.
|
||||
DECL_ACCESSORS2(shared_function_info, SharedFunctionInfo)
|
||||
DECL_ACCESSORS(shared_function_info, SharedFunctionInfo)
|
||||
|
||||
// [optimized_code_weak_or_smi]: weak reference to optimized code or a Smi
|
||||
// marker defining optimization behaviour.
|
||||
DECL_ACCESSORS2(optimized_code_weak_or_smi, MaybeObject)
|
||||
DECL_ACCESSORS(optimized_code_weak_or_smi, MaybeObject)
|
||||
|
||||
// [length]: The length of the feedback vector (not including the header, i.e.
|
||||
// the number of feedback slots).
|
||||
@ -453,7 +453,7 @@ class SharedFeedbackSlot {
|
||||
// the number of slots is static once an instance is created.
|
||||
class FeedbackMetadata : public HeapObject {
|
||||
public:
|
||||
DECL_CAST2(FeedbackMetadata)
|
||||
DECL_CAST(FeedbackMetadata)
|
||||
|
||||
// The number of slots that this metadata contains. Stored as an int32.
|
||||
DECL_INT32_ACCESSORS(slot_count)
|
||||
|
@ -389,7 +389,7 @@ bool Heap::InNewSpace(HeapObject heap_object) {
|
||||
// object is in to-space.
|
||||
if (result) {
|
||||
// If the object is in NEW_SPACE, then it's not in RO_SPACE so this is safe.
|
||||
Heap* heap = Heap::FromWritableHeapObject(&heap_object);
|
||||
Heap* heap = Heap::FromWritableHeapObject(heap_object);
|
||||
DCHECK(heap->gc_state_ != NOT_IN_GC || InToSpace(heap_object));
|
||||
}
|
||||
#endif
|
||||
@ -450,11 +450,6 @@ Heap* Heap::FromWritableHeapObject(const HeapObject obj) {
|
||||
return heap;
|
||||
}
|
||||
|
||||
// static
|
||||
Heap* Heap::FromWritableHeapObject(const HeapObject* obj) {
|
||||
return FromWritableHeapObject(*obj);
|
||||
}
|
||||
|
||||
bool Heap::ShouldBePromoted(Address old_address) {
|
||||
Page* page = Page::FromAddress(old_address);
|
||||
Address age_mark = new_space_->age_mark();
|
||||
|
@ -104,16 +104,11 @@ inline void GenerationalBarrier(HeapObject object, ObjectSlot slot,
|
||||
HeapObject::cast(value));
|
||||
}
|
||||
|
||||
inline void GenerationalBarrier(HeapObject* object, ObjectSlot slot,
|
||||
Object value) {
|
||||
GenerationalBarrier(*object, slot, value);
|
||||
}
|
||||
|
||||
inline void GenerationalBarrier(HeapObject* object, MaybeObjectSlot slot,
|
||||
inline void GenerationalBarrier(HeapObject object, MaybeObjectSlot slot,
|
||||
MaybeObject value) {
|
||||
HeapObject value_heap_object;
|
||||
if (!value->GetHeapObject(&value_heap_object)) return;
|
||||
heap_internals::GenerationalBarrierInternal(*object, slot.address(),
|
||||
heap_internals::GenerationalBarrierInternal(object, slot.address(),
|
||||
value_heap_object);
|
||||
}
|
||||
|
||||
@ -142,15 +137,11 @@ inline void MarkingBarrier(HeapObject object, ObjectSlot slot, Object value) {
|
||||
HeapObject::cast(value));
|
||||
}
|
||||
|
||||
inline void MarkingBarrier(HeapObject* object, ObjectSlot slot, Object value) {
|
||||
MarkingBarrier(*object, slot, value);
|
||||
}
|
||||
|
||||
inline void MarkingBarrier(HeapObject* object, MaybeObjectSlot slot,
|
||||
inline void MarkingBarrier(HeapObject object, MaybeObjectSlot slot,
|
||||
MaybeObject value) {
|
||||
HeapObject value_heap_object;
|
||||
if (!value->GetHeapObject(&value_heap_object)) return;
|
||||
heap_internals::MarkingBarrierInternal(*object, slot.address(),
|
||||
heap_internals::MarkingBarrierInternal(object, slot.address(),
|
||||
value_heap_object);
|
||||
}
|
||||
|
||||
|
@ -34,27 +34,16 @@ void WriteBarrierForCode(Code host, RelocInfo* rinfo, Object value);
|
||||
void WriteBarrierForCode(Code host);
|
||||
|
||||
// Generational write barrier.
|
||||
// This takes a HeapObject* (as opposed to a plain HeapObject)
|
||||
// to keep the WRITE_BARRIER macro syntax-compatible to the old HeapObject*
|
||||
// version.
|
||||
// TODO(3770): This should probably take a HeapObject eventually.
|
||||
void GenerationalBarrier(HeapObject* object, ObjectSlot slot, Object value);
|
||||
void GenerationalBarrier(HeapObject object, ObjectSlot slot, Object value);
|
||||
void GenerationalBarrier(HeapObject* object, MaybeObjectSlot slot,
|
||||
void GenerationalBarrier(HeapObject object, MaybeObjectSlot slot,
|
||||
MaybeObject value);
|
||||
void GenerationalBarrierForElements(Heap* heap, FixedArray array, int offset,
|
||||
int length);
|
||||
void GenerationalBarrierForCode(Code host, RelocInfo* rinfo, HeapObject object);
|
||||
|
||||
// Marking write barrier.
|
||||
// This takes a HeapObject* (as opposed to a plain HeapObject)
|
||||
// to keep the WRITE_BARRIER macro syntax-compatible to the old HeapObject*
|
||||
// version.
|
||||
// TODO(3770): This should probably take a HeapObject eventually.
|
||||
void MarkingBarrier(HeapObject* object, ObjectSlot slot, Object value);
|
||||
void MarkingBarrier(HeapObject object, ObjectSlot slot, Object value);
|
||||
void MarkingBarrier(HeapObject* object, MaybeObjectSlot slot,
|
||||
MaybeObject value);
|
||||
void MarkingBarrier(HeapObject object, MaybeObjectSlot slot, MaybeObject value);
|
||||
void MarkingBarrierForElements(Heap* heap, HeapObject object);
|
||||
void MarkingBarrierForCode(Code host, RelocInfo* rinfo, HeapObject object);
|
||||
|
||||
|
@ -5601,7 +5601,7 @@ void Heap::WriteBarrierForCodeSlow(Code code) {
|
||||
|
||||
void Heap::GenerationalBarrierSlow(HeapObject object, Address slot,
|
||||
HeapObject value) {
|
||||
Heap* heap = Heap::FromWritableHeapObject(&object);
|
||||
Heap* heap = Heap::FromWritableHeapObject(object);
|
||||
heap->store_buffer()->InsertEntry(slot);
|
||||
}
|
||||
|
||||
@ -5638,7 +5638,7 @@ void Heap::GenerationalBarrierForCodeSlow(Code host, RelocInfo* rinfo,
|
||||
|
||||
void Heap::MarkingBarrierSlow(HeapObject object, Address slot,
|
||||
HeapObject value) {
|
||||
Heap* heap = Heap::FromWritableHeapObject(&object);
|
||||
Heap* heap = Heap::FromWritableHeapObject(object);
|
||||
heap->incremental_marking()->RecordWriteSlow(object, HeapObjectSlot(slot),
|
||||
value);
|
||||
}
|
||||
@ -5652,7 +5652,7 @@ void Heap::MarkingBarrierForElementsSlow(Heap* heap, HeapObject object) {
|
||||
|
||||
void Heap::MarkingBarrierForCodeSlow(Code host, RelocInfo* rinfo,
|
||||
HeapObject object) {
|
||||
Heap* heap = Heap::FromWritableHeapObject(&host);
|
||||
Heap* heap = Heap::FromWritableHeapObject(host);
|
||||
DCHECK(heap->incremental_marking()->IsMarking());
|
||||
heap->incremental_marking()->RecordWriteIntoCode(host, rinfo, object);
|
||||
}
|
||||
|
@ -937,11 +937,6 @@ class Heap {
|
||||
// with off-heap Addresses.
|
||||
bool InSpaceSlow(Address addr, AllocationSpace space);
|
||||
|
||||
// This takes a HeapObject* (as opposed to a plain HeapObject)
|
||||
// to keep the WRITE_BARRIER macro syntax-compatible to the old HeapObject*
|
||||
// version.
|
||||
// TODO(3770): This should probably take a HeapObject eventually.
|
||||
static inline Heap* FromWritableHeapObject(const HeapObject* obj);
|
||||
static inline Heap* FromWritableHeapObject(const HeapObject obj);
|
||||
|
||||
// ===========================================================================
|
||||
|
@ -21,7 +21,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(LoadHandler, DataHandler)
|
||||
|
||||
CAST_ACCESSOR2(LoadHandler)
|
||||
CAST_ACCESSOR(LoadHandler)
|
||||
|
||||
// Decodes kind from Smi-handler.
|
||||
LoadHandler::Kind LoadHandler::GetHandlerKind(Smi smi_handler) {
|
||||
@ -115,7 +115,7 @@ Handle<Smi> LoadHandler::LoadIndexedString(Isolate* isolate,
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(StoreHandler, DataHandler)
|
||||
|
||||
CAST_ACCESSOR2(StoreHandler)
|
||||
CAST_ACCESSOR(StoreHandler)
|
||||
|
||||
Handle<Smi> StoreHandler::StoreGlobalProxy(Isolate* isolate) {
|
||||
int config = KindBits::encode(kGlobalProxy);
|
||||
|
@ -26,7 +26,7 @@ class JSProxy;
|
||||
// TODO(ishell): move to load-handler.h
|
||||
class LoadHandler final : public DataHandler {
|
||||
public:
|
||||
DECL_CAST2(LoadHandler)
|
||||
DECL_CAST(LoadHandler)
|
||||
|
||||
DECL_PRINTER(LoadHandler)
|
||||
DECL_VERIFIER(LoadHandler)
|
||||
@ -188,7 +188,7 @@ class LoadHandler final : public DataHandler {
|
||||
// TODO(ishell): move to store-handler.h
|
||||
class StoreHandler final : public DataHandler {
|
||||
public:
|
||||
DECL_CAST2(StoreHandler)
|
||||
DECL_CAST(StoreHandler)
|
||||
|
||||
DECL_PRINTER(StoreHandler)
|
||||
DECL_VERIFIER(StoreHandler)
|
||||
|
@ -22,7 +22,7 @@ LayoutDescriptor::LayoutDescriptor(Address ptr)
|
||||
: ByteArray(ptr, AllowInlineSmiStorage::kAllowBeingASmi) {
|
||||
SLOW_DCHECK(IsLayoutDescriptor());
|
||||
}
|
||||
CAST_ACCESSOR2(LayoutDescriptor)
|
||||
CAST_ACCESSOR(LayoutDescriptor)
|
||||
|
||||
LayoutDescriptor LayoutDescriptor::FromSmi(Smi smi) {
|
||||
return LayoutDescriptor::cast(smi);
|
||||
|
@ -46,7 +46,7 @@ class LayoutDescriptor : public ByteArray {
|
||||
// Returns true if the layout descriptor is in non-Smi form.
|
||||
V8_INLINE bool IsSlowLayout();
|
||||
|
||||
DECL_CAST2(LayoutDescriptor)
|
||||
DECL_CAST(LayoutDescriptor)
|
||||
|
||||
V8_INLINE static LayoutDescriptor cast_gc_safe(Object object);
|
||||
|
||||
|
@ -475,17 +475,17 @@ OBJECT_CONSTRUCTORS_IMPL(TemplateObjectDescription, Tuple2)
|
||||
// ------------------------------------
|
||||
// Cast operations
|
||||
|
||||
CAST_ACCESSOR2(BigInt)
|
||||
CAST_ACCESSOR2(ObjectBoilerplateDescription)
|
||||
CAST_ACCESSOR2(EphemeronHashTable)
|
||||
CAST_ACCESSOR2(HeapObject)
|
||||
CAST_ACCESSOR2(NormalizedMapCache)
|
||||
CAST_ACCESSOR2(Object)
|
||||
CAST_ACCESSOR2(ObjectHashSet)
|
||||
CAST_ACCESSOR2(ObjectHashTable)
|
||||
CAST_ACCESSOR2(RegExpMatchInfo)
|
||||
CAST_ACCESSOR2(ScopeInfo)
|
||||
CAST_ACCESSOR2(TemplateObjectDescription)
|
||||
CAST_ACCESSOR(BigInt)
|
||||
CAST_ACCESSOR(ObjectBoilerplateDescription)
|
||||
CAST_ACCESSOR(EphemeronHashTable)
|
||||
CAST_ACCESSOR(HeapObject)
|
||||
CAST_ACCESSOR(NormalizedMapCache)
|
||||
CAST_ACCESSOR(Object)
|
||||
CAST_ACCESSOR(ObjectHashSet)
|
||||
CAST_ACCESSOR(ObjectHashTable)
|
||||
CAST_ACCESSOR(RegExpMatchInfo)
|
||||
CAST_ACCESSOR(ScopeInfo)
|
||||
CAST_ACCESSOR(TemplateObjectDescription)
|
||||
|
||||
bool Object::HasValidElements() {
|
||||
// Dictionary is covered under FixedArray.
|
||||
@ -759,14 +759,14 @@ Map HeapObject::map() const { return map_word().ToMap(); }
|
||||
void HeapObject::set_map(Map value) {
|
||||
if (!value.is_null()) {
|
||||
#ifdef VERIFY_HEAP
|
||||
Heap::FromWritableHeapObject(this)->VerifyObjectLayoutChange(*this, value);
|
||||
Heap::FromWritableHeapObject(*this)->VerifyObjectLayoutChange(*this, value);
|
||||
#endif
|
||||
}
|
||||
set_map_word(MapWord::FromMap(value));
|
||||
if (!value.is_null()) {
|
||||
// TODO(1600) We are passing kNullAddress as a slot because maps can never
|
||||
// be on an evacuation candidate.
|
||||
MarkingBarrier(this, ObjectSlot(kNullAddress), value);
|
||||
MarkingBarrier(*this, ObjectSlot(kNullAddress), value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -777,14 +777,14 @@ Map HeapObject::synchronized_map() const {
|
||||
void HeapObject::synchronized_set_map(Map value) {
|
||||
if (!value.is_null()) {
|
||||
#ifdef VERIFY_HEAP
|
||||
Heap::FromWritableHeapObject(this)->VerifyObjectLayoutChange(*this, value);
|
||||
Heap::FromWritableHeapObject(*this)->VerifyObjectLayoutChange(*this, value);
|
||||
#endif
|
||||
}
|
||||
synchronized_set_map_word(MapWord::FromMap(value));
|
||||
if (!value.is_null()) {
|
||||
// TODO(1600) We are passing kNullAddress as a slot because maps can never
|
||||
// be on an evacuation candidate.
|
||||
MarkingBarrier(this, ObjectSlot(kNullAddress), value);
|
||||
MarkingBarrier(*this, ObjectSlot(kNullAddress), value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -793,7 +793,7 @@ void HeapObject::synchronized_set_map(Map value) {
|
||||
void HeapObject::set_map_no_write_barrier(Map value) {
|
||||
if (!value.is_null()) {
|
||||
#ifdef VERIFY_HEAP
|
||||
Heap::FromWritableHeapObject(this)->VerifyObjectLayoutChange(*this, value);
|
||||
Heap::FromWritableHeapObject(*this)->VerifyObjectLayoutChange(*this, value);
|
||||
#endif
|
||||
}
|
||||
set_map_word(MapWord::FromMap(value));
|
||||
@ -805,12 +805,12 @@ void HeapObject::set_map_after_allocation(Map value, WriteBarrierMode mode) {
|
||||
DCHECK(!value.is_null());
|
||||
// TODO(1600) We are passing kNullAddress as a slot because maps can never
|
||||
// be on an evacuation candidate.
|
||||
MarkingBarrier(this, ObjectSlot(kNullAddress), value);
|
||||
MarkingBarrier(*this, ObjectSlot(kNullAddress), value);
|
||||
}
|
||||
}
|
||||
|
||||
MapWordSlot HeapObject::map_slot() const {
|
||||
return MapWordSlot(FIELD_ADDR(this, kMapOffset));
|
||||
return MapWordSlot(FIELD_ADDR(*this, kMapOffset));
|
||||
}
|
||||
|
||||
MapWord HeapObject::map_word() const {
|
||||
@ -933,7 +933,7 @@ void RegExpMatchInfo::SetCapture(int i, int value) {
|
||||
|
||||
WriteBarrierMode HeapObject::GetWriteBarrierMode(
|
||||
const DisallowHeapAllocation& promise) {
|
||||
Heap* heap = Heap::FromWritableHeapObject(this);
|
||||
Heap* heap = Heap::FromWritableHeapObject(*this);
|
||||
if (heap->incremental_marking()->IsMarking()) return UPDATE_WRITE_BARRIER;
|
||||
if (Heap::InNewSpace(*this)) return SKIP_WRITE_BARRIER;
|
||||
return UPDATE_WRITE_BARRIER;
|
||||
@ -980,16 +980,16 @@ Address HeapObject::GetFieldAddress(int field_offset) const {
|
||||
return FIELD_ADDR(this, field_offset);
|
||||
}
|
||||
|
||||
ACCESSORS2(EnumCache, keys, FixedArray, kKeysOffset)
|
||||
ACCESSORS2(EnumCache, indices, FixedArray, kIndicesOffset)
|
||||
ACCESSORS(EnumCache, keys, FixedArray, kKeysOffset)
|
||||
ACCESSORS(EnumCache, indices, FixedArray, kIndicesOffset)
|
||||
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(TranslationByteArray, ByteArray)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(InlinedFunctionCount, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(LiteralArray, FixedArray)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(OsrBytecodeOffset, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(OsrPcOffset, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(OptimizationId, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS2(InliningPositions, PodArray<InliningPosition>)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(LiteralArray, FixedArray)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(OsrBytecodeOffset, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(OsrPcOffset, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(OptimizationId, Smi)
|
||||
DEFINE_DEOPT_ELEMENT_ACCESSORS(InliningPositions, PodArray<InliningPosition>)
|
||||
|
||||
DEFINE_DEOPT_ENTRY_ACCESSORS(BytecodeOffsetRaw, Smi)
|
||||
DEFINE_DEOPT_ENTRY_ACCESSORS(TranslationIndex, Smi)
|
||||
@ -1094,10 +1094,9 @@ int HeapObject::SizeFromMap(Map map) const {
|
||||
EmbedderDataArray::unchecked_cast(*this)->length());
|
||||
}
|
||||
|
||||
ACCESSORS2(TemplateObjectDescription, raw_strings, FixedArray,
|
||||
kRawStringsOffset)
|
||||
ACCESSORS2(TemplateObjectDescription, cooked_strings, FixedArray,
|
||||
kCookedStringsOffset)
|
||||
ACCESSORS(TemplateObjectDescription, raw_strings, FixedArray, kRawStringsOffset)
|
||||
ACCESSORS(TemplateObjectDescription, cooked_strings, FixedArray,
|
||||
kCookedStringsOffset)
|
||||
|
||||
// static
|
||||
Maybe<bool> Object::GreaterThan(Isolate* isolate, Handle<Object> x,
|
||||
|
@ -928,7 +928,7 @@ class Object {
|
||||
|
||||
void ShortPrint(std::ostream& os) const; // NOLINT
|
||||
|
||||
DECL_CAST2(Object)
|
||||
DECL_CAST(Object)
|
||||
|
||||
// Layout description.
|
||||
static const int kHeaderSize = 0; // Object does not take up any space.
|
||||
|
@ -21,8 +21,8 @@ OBJECT_CONSTRUCTORS_IMPL(AllocationSite, Struct)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(AllocationSite)
|
||||
|
||||
CAST_ACCESSOR2(AllocationMemento)
|
||||
CAST_ACCESSOR2(AllocationSite)
|
||||
CAST_ACCESSOR(AllocationMemento)
|
||||
CAST_ACCESSOR(AllocationSite)
|
||||
|
||||
ACCESSORS(AllocationSite, transition_info_or_boilerplate, Object,
|
||||
kTransitionInfoOrBoilerplateOffset)
|
||||
@ -30,7 +30,7 @@ ACCESSORS(AllocationSite, nested_site, Object, kNestedSiteOffset)
|
||||
INT32_ACCESSORS(AllocationSite, pretenure_data, kPretenureDataOffset)
|
||||
INT32_ACCESSORS(AllocationSite, pretenure_create_count,
|
||||
kPretenureCreateCountOffset)
|
||||
ACCESSORS2(AllocationSite, dependent_code, DependentCode, kDependentCodeOffset)
|
||||
ACCESSORS(AllocationSite, dependent_code, DependentCode, kDependentCodeOffset)
|
||||
ACCESSORS_CHECKED(AllocationSite, weak_next, Object, kWeakNextOffset,
|
||||
HasWeakNext())
|
||||
ACCESSORS(AllocationMemento, allocation_site, Object, kAllocationSiteOffset)
|
||||
|
@ -38,7 +38,7 @@ class AllocationSite : public Struct {
|
||||
// Contains either a Smi-encoded bitfield or a boilerplate. If it's a Smi the
|
||||
// AllocationSite is for a constructed Array.
|
||||
DECL_ACCESSORS(transition_info_or_boilerplate, Object)
|
||||
DECL_ACCESSORS2(boilerplate, JSObject)
|
||||
DECL_ACCESSORS(boilerplate, JSObject)
|
||||
DECL_INT_ACCESSORS(transition_info)
|
||||
|
||||
// nested_site threads a list of sites that represent nested literals
|
||||
@ -50,7 +50,7 @@ class AllocationSite : public Struct {
|
||||
DECL_INT32_ACCESSORS(pretenure_data)
|
||||
|
||||
DECL_INT32_ACCESSORS(pretenure_create_count)
|
||||
DECL_ACCESSORS2(dependent_code, DependentCode)
|
||||
DECL_ACCESSORS(dependent_code, DependentCode)
|
||||
|
||||
// heap->allocation_site_list() points to the last AllocationSite which form
|
||||
// a linked list through the weak_next property. The GC might remove elements
|
||||
@ -129,7 +129,7 @@ class AllocationSite : public Struct {
|
||||
DECL_PRINTER(AllocationSite)
|
||||
DECL_VERIFIER(AllocationSite)
|
||||
|
||||
DECL_CAST2(AllocationSite)
|
||||
DECL_CAST(AllocationSite)
|
||||
static inline bool ShouldTrack(ElementsKind boilerplate_elements_kind);
|
||||
static bool ShouldTrack(ElementsKind from, ElementsKind to);
|
||||
static inline bool CanTrack(InstanceType type);
|
||||
@ -182,7 +182,7 @@ class AllocationMemento : public Struct {
|
||||
DECL_PRINTER(AllocationMemento)
|
||||
DECL_VERIFIER(AllocationMemento)
|
||||
|
||||
DECL_CAST2(AllocationMemento)
|
||||
DECL_CAST(AllocationMemento)
|
||||
|
||||
OBJECT_CONSTRUCTORS(AllocationMemento, Struct);
|
||||
};
|
||||
|
@ -24,12 +24,12 @@ OBJECT_CONSTRUCTORS_IMPL(AccessorInfo, Struct)
|
||||
OBJECT_CONSTRUCTORS_IMPL(InterceptorInfo, Struct)
|
||||
OBJECT_CONSTRUCTORS_IMPL(CallHandlerInfo, Tuple3)
|
||||
|
||||
CAST_ACCESSOR2(AccessorInfo)
|
||||
CAST_ACCESSOR2(AccessCheckInfo)
|
||||
CAST_ACCESSOR2(InterceptorInfo)
|
||||
CAST_ACCESSOR2(CallHandlerInfo)
|
||||
CAST_ACCESSOR(AccessorInfo)
|
||||
CAST_ACCESSOR(AccessCheckInfo)
|
||||
CAST_ACCESSOR(InterceptorInfo)
|
||||
CAST_ACCESSOR(CallHandlerInfo)
|
||||
|
||||
ACCESSORS2(AccessorInfo, name, Name, kNameOffset)
|
||||
ACCESSORS(AccessorInfo, name, Name, kNameOffset)
|
||||
SMI_ACCESSORS(AccessorInfo, flags, kFlagsOffset)
|
||||
ACCESSORS(AccessorInfo, expected_receiver_type, Object,
|
||||
kExpectedReceiverTypeOffset)
|
||||
|
@ -24,7 +24,7 @@ namespace internal {
|
||||
// This shadows the accessor in the prototype.
|
||||
class AccessorInfo : public Struct {
|
||||
public:
|
||||
DECL_ACCESSORS2(name, Name)
|
||||
DECL_ACCESSORS(name, Name)
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
DECL_ACCESSORS(expected_receiver_type, Object)
|
||||
// This directly points at a foreign C function to be used from the runtime.
|
||||
@ -66,7 +66,7 @@ class AccessorInfo : public Struct {
|
||||
Handle<Map> map);
|
||||
inline bool IsCompatibleReceiver(Object receiver);
|
||||
|
||||
DECL_CAST2(AccessorInfo)
|
||||
DECL_CAST(AccessorInfo)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_VERIFIER(AccessorInfo)
|
||||
@ -118,7 +118,7 @@ class AccessCheckInfo : public Struct {
|
||||
DECL_ACCESSORS(indexed_interceptor, Object)
|
||||
DECL_ACCESSORS(data, Object)
|
||||
|
||||
DECL_CAST2(AccessCheckInfo)
|
||||
DECL_CAST(AccessCheckInfo)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(AccessCheckInfo)
|
||||
@ -160,7 +160,7 @@ class InterceptorInfo : public Struct {
|
||||
inline int flags() const;
|
||||
inline void set_flags(int flags);
|
||||
|
||||
DECL_CAST2(InterceptorInfo)
|
||||
DECL_CAST(InterceptorInfo)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(InterceptorInfo)
|
||||
@ -198,7 +198,7 @@ class CallHandlerInfo : public Tuple3 {
|
||||
DECL_ACCESSORS(js_callback, Object)
|
||||
DECL_ACCESSORS(data, Object)
|
||||
|
||||
DECL_CAST2(CallHandlerInfo)
|
||||
DECL_CAST(CallHandlerInfo)
|
||||
|
||||
inline bool IsSideEffectFreeCallHandlerInfo() const;
|
||||
inline bool IsSideEffectCallHandlerInfo() const;
|
||||
|
@ -22,9 +22,9 @@ OBJECT_CONSTRUCTORS_IMPL(SloppyArgumentsElements, FixedArray)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSArgumentsObject, JSObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(AliasedArgumentsEntry, Struct)
|
||||
|
||||
CAST_ACCESSOR2(AliasedArgumentsEntry)
|
||||
CAST_ACCESSOR2(SloppyArgumentsElements)
|
||||
CAST_ACCESSOR2(JSArgumentsObject)
|
||||
CAST_ACCESSOR(AliasedArgumentsEntry)
|
||||
CAST_ACCESSOR(SloppyArgumentsElements)
|
||||
CAST_ACCESSOR(JSArgumentsObject)
|
||||
|
||||
SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot)
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace internal {
|
||||
class JSArgumentsObject : public JSObject {
|
||||
public:
|
||||
DECL_VERIFIER(JSArgumentsObject)
|
||||
DECL_CAST2(JSArgumentsObject)
|
||||
DECL_CAST(JSArgumentsObject)
|
||||
OBJECT_CONSTRUCTORS(JSArgumentsObject, JSObject);
|
||||
};
|
||||
|
||||
@ -117,7 +117,7 @@ class SloppyArgumentsElements : public FixedArray {
|
||||
inline Object get_mapped_entry(uint32_t entry);
|
||||
inline void set_mapped_entry(uint32_t entry, Object object);
|
||||
|
||||
DECL_CAST2(SloppyArgumentsElements)
|
||||
DECL_CAST(SloppyArgumentsElements)
|
||||
#ifdef VERIFY_HEAP
|
||||
void SloppyArgumentsElementsVerify(Isolate* isolate, JSObject holder);
|
||||
#endif
|
||||
@ -138,7 +138,7 @@ class AliasedArgumentsEntry : public Struct {
|
||||
inline int aliased_context_slot() const;
|
||||
inline void set_aliased_context_slot(int count);
|
||||
|
||||
DECL_CAST2(AliasedArgumentsEntry)
|
||||
DECL_CAST(AliasedArgumentsEntry)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(AliasedArgumentsEntry)
|
||||
|
@ -204,7 +204,7 @@ class V8_EXPORT_PRIVATE BigInt : public BigIntBase {
|
||||
int Words64Count();
|
||||
void ToWordsArray64(int* sign_bit, int* words64_count, uint64_t* words);
|
||||
|
||||
DECL_CAST2(BigInt)
|
||||
DECL_CAST(BigInt)
|
||||
DECL_VERIFIER(BigInt)
|
||||
DECL_PRINTER(BigInt)
|
||||
void BigIntShortPrint(std::ostream& os);
|
||||
|
@ -17,7 +17,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(Cell, HeapObject)
|
||||
|
||||
CAST_ACCESSOR2(Cell)
|
||||
CAST_ACCESSOR(Cell)
|
||||
|
||||
ACCESSORS(Cell, value, Object, kValueOffset)
|
||||
|
||||
|
@ -18,7 +18,7 @@ class Cell : public HeapObject {
|
||||
// [value]: value of the cell.
|
||||
DECL_ACCESSORS(value, Object)
|
||||
|
||||
DECL_CAST2(Cell)
|
||||
DECL_CAST(Cell)
|
||||
|
||||
static inline Cell FromValueAddress(Address value);
|
||||
|
||||
|
@ -31,18 +31,18 @@ OBJECT_CONSTRUCTORS_IMPL(SourcePositionTableWithFrameCache, Tuple2)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(AbstractCode)
|
||||
|
||||
CAST_ACCESSOR2(AbstractCode)
|
||||
CAST_ACCESSOR2(BytecodeArray)
|
||||
CAST_ACCESSOR2(Code)
|
||||
CAST_ACCESSOR2(CodeDataContainer)
|
||||
CAST_ACCESSOR2(DependentCode)
|
||||
CAST_ACCESSOR2(DeoptimizationData)
|
||||
CAST_ACCESSOR2(SourcePositionTableWithFrameCache)
|
||||
CAST_ACCESSOR(AbstractCode)
|
||||
CAST_ACCESSOR(BytecodeArray)
|
||||
CAST_ACCESSOR(Code)
|
||||
CAST_ACCESSOR(CodeDataContainer)
|
||||
CAST_ACCESSOR(DependentCode)
|
||||
CAST_ACCESSOR(DeoptimizationData)
|
||||
CAST_ACCESSOR(SourcePositionTableWithFrameCache)
|
||||
|
||||
ACCESSORS2(SourcePositionTableWithFrameCache, source_position_table, ByteArray,
|
||||
kSourcePositionTableIndex)
|
||||
ACCESSORS2(SourcePositionTableWithFrameCache, stack_frame_cache,
|
||||
SimpleNumberDictionary, kStackFrameCacheIndex)
|
||||
ACCESSORS(SourcePositionTableWithFrameCache, source_position_table, ByteArray,
|
||||
kSourcePositionTableIndex)
|
||||
ACCESSORS(SourcePositionTableWithFrameCache, stack_frame_cache,
|
||||
SimpleNumberDictionary, kStackFrameCacheIndex)
|
||||
|
||||
int AbstractCode::raw_instruction_size() {
|
||||
if (IsCode()) {
|
||||
@ -197,20 +197,17 @@ INT_ACCESSORS(Code, raw_instruction_size, kInstructionSizeOffset)
|
||||
INT_ACCESSORS(Code, handler_table_offset, kHandlerTableOffsetOffset)
|
||||
#define CODE_ACCESSORS(name, type, offset) \
|
||||
ACCESSORS_CHECKED2(Code, name, type, offset, true, !Heap::InNewSpace(value))
|
||||
#define CODE_ACCESSORS2(name, type, offset) \
|
||||
ACCESSORS_CHECKED3(Code, name, type, offset, true, !Heap::InNewSpace(value))
|
||||
#define SYNCHRONIZED_CODE_ACCESSORS(name, type, offset) \
|
||||
SYNCHRONIZED_ACCESSORS_CHECKED2(Code, name, type, offset, true, \
|
||||
!Heap::InNewSpace(value))
|
||||
|
||||
CODE_ACCESSORS2(relocation_info, ByteArray, kRelocationInfoOffset)
|
||||
CODE_ACCESSORS2(deoptimization_data, FixedArray, kDeoptimizationDataOffset)
|
||||
CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset)
|
||||
CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset)
|
||||
CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset)
|
||||
// Concurrent marker needs to access kind specific flags in code data container.
|
||||
SYNCHRONIZED_CODE_ACCESSORS(code_data_container, CodeDataContainer,
|
||||
kCodeDataContainerOffset)
|
||||
#undef CODE_ACCESSORS
|
||||
#undef CODE_ACCESSORS2
|
||||
#undef SYNCHRONIZED_CODE_ACCESSORS
|
||||
|
||||
void Code::WipeOutHeader() {
|
||||
@ -732,8 +729,8 @@ int BytecodeArray::parameter_count() const {
|
||||
return READ_INT_FIELD(this, kParameterSizeOffset) >> kSystemPointerSizeLog2;
|
||||
}
|
||||
|
||||
ACCESSORS2(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
|
||||
ACCESSORS2(BytecodeArray, handler_table, ByteArray, kHandlerTableOffset)
|
||||
ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
|
||||
ACCESSORS(BytecodeArray, handler_table, ByteArray, kHandlerTableOffset)
|
||||
ACCESSORS(BytecodeArray, source_position_table, Object,
|
||||
kSourcePositionTableOffset)
|
||||
|
||||
|
@ -76,13 +76,13 @@ class Code : public HeapObject {
|
||||
int OffHeapInstructionSize() const;
|
||||
|
||||
// [relocation_info]: Code relocation information
|
||||
DECL_ACCESSORS2(relocation_info, ByteArray)
|
||||
DECL_ACCESSORS(relocation_info, ByteArray)
|
||||
|
||||
// This function should be called only from GC.
|
||||
void ClearEmbeddedObjects(Heap* heap);
|
||||
|
||||
// [deoptimization_data]: Array containing data for deopt.
|
||||
DECL_ACCESSORS2(deoptimization_data, FixedArray)
|
||||
DECL_ACCESSORS(deoptimization_data, FixedArray)
|
||||
|
||||
// [source_position_table]: ByteArray for the source positions table or
|
||||
// SourcePositionTableWithFrameCache.
|
||||
@ -90,7 +90,7 @@ class Code : public HeapObject {
|
||||
inline ByteArray SourcePositionTable() const;
|
||||
|
||||
// [code_data_container]: A container indirection for all mutable fields.
|
||||
DECL_ACCESSORS2(code_data_container, CodeDataContainer)
|
||||
DECL_ACCESSORS(code_data_container, CodeDataContainer)
|
||||
|
||||
// [next_code_link]: Link for lists of optimized or deoptimized code.
|
||||
// Note that this field is stored in the {CodeDataContainer} to be mutable.
|
||||
@ -330,7 +330,7 @@ class Code : public HeapObject {
|
||||
// the layout of the code object into account.
|
||||
inline int ExecutableSize() const;
|
||||
|
||||
DECL_CAST2(Code)
|
||||
DECL_CAST(Code)
|
||||
|
||||
// Dispatched behavior.
|
||||
inline int CodeSize() const;
|
||||
@ -488,7 +488,7 @@ class CodeDataContainer : public HeapObject {
|
||||
// is deterministic.
|
||||
inline void clear_padding();
|
||||
|
||||
DECL_CAST2(CodeDataContainer)
|
||||
DECL_CAST(CodeDataContainer)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(CodeDataContainer)
|
||||
@ -578,7 +578,7 @@ class AbstractCode : public HeapObject {
|
||||
// the layout of the code object into account.
|
||||
inline int ExecutableSize();
|
||||
|
||||
DECL_CAST2(AbstractCode)
|
||||
DECL_CAST(AbstractCode)
|
||||
inline Code GetCode();
|
||||
inline BytecodeArray GetBytecodeArray();
|
||||
|
||||
@ -610,7 +610,7 @@ class AbstractCode : public HeapObject {
|
||||
|
||||
class DependentCode : public WeakFixedArray {
|
||||
public:
|
||||
DECL_CAST2(DependentCode)
|
||||
DECL_CAST(DependentCode)
|
||||
|
||||
enum DependencyGroup {
|
||||
// Group of code that embed a transition to this map, and depend on being
|
||||
@ -759,10 +759,10 @@ class BytecodeArray : public FixedArrayBase {
|
||||
inline void set_bytecode_age(Age age);
|
||||
|
||||
// Accessors for the constant pool.
|
||||
DECL_ACCESSORS2(constant_pool, FixedArray)
|
||||
DECL_ACCESSORS(constant_pool, FixedArray)
|
||||
|
||||
// Accessors for handler table containing offsets of exception handlers.
|
||||
DECL_ACCESSORS2(handler_table, ByteArray)
|
||||
DECL_ACCESSORS(handler_table, ByteArray)
|
||||
|
||||
// Accessors for source position table containing mappings between byte code
|
||||
// offset and source position or SourcePositionTableWithFrameCache.
|
||||
@ -771,7 +771,7 @@ class BytecodeArray : public FixedArrayBase {
|
||||
inline ByteArray SourcePositionTable();
|
||||
inline void ClearFrameCacheFromSourcePositionTable();
|
||||
|
||||
DECL_CAST2(BytecodeArray)
|
||||
DECL_CAST(BytecodeArray)
|
||||
|
||||
// Dispatched behavior.
|
||||
inline int BytecodeArraySize();
|
||||
@ -900,7 +900,7 @@ class DeoptimizationData : public FixedArray {
|
||||
// Return an empty DeoptimizationData.
|
||||
static Handle<DeoptimizationData> Empty(Isolate* isolate);
|
||||
|
||||
DECL_CAST2(DeoptimizationData)
|
||||
DECL_CAST(DeoptimizationData)
|
||||
|
||||
#ifdef ENABLE_DISASSEMBLER
|
||||
void DeoptimizationDataPrint(std::ostream& os); // NOLINT
|
||||
@ -918,10 +918,10 @@ class DeoptimizationData : public FixedArray {
|
||||
|
||||
class SourcePositionTableWithFrameCache : public Tuple2 {
|
||||
public:
|
||||
DECL_ACCESSORS2(source_position_table, ByteArray)
|
||||
DECL_ACCESSORS2(stack_frame_cache, SimpleNumberDictionary)
|
||||
DECL_ACCESSORS(source_position_table, ByteArray)
|
||||
DECL_ACCESSORS(stack_frame_cache, SimpleNumberDictionary)
|
||||
|
||||
DECL_CAST2(SourcePositionTableWithFrameCache)
|
||||
DECL_CAST(SourcePositionTableWithFrameCache)
|
||||
|
||||
// Layout description.
|
||||
#define SOURCE_POSITION_TABLE_WITH_FRAME_FIELDS(V) \
|
||||
|
@ -25,7 +25,7 @@ CompilationCacheTable::CompilationCacheTable(Address ptr)
|
||||
}
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(CompilationCacheTable)
|
||||
CAST_ACCESSOR2(CompilationCacheTable)
|
||||
CAST_ACCESSOR(CompilationCacheTable)
|
||||
|
||||
uint32_t CompilationCacheShape::RegExpHash(String string, Smi flags) {
|
||||
return string->Hash() + flags->value();
|
||||
|
@ -109,7 +109,7 @@ class CompilationCacheTable
|
||||
void Age();
|
||||
static const int kHashGenerations = 10;
|
||||
|
||||
DECL_CAST2(CompilationCacheTable)
|
||||
DECL_CAST(CompilationCacheTable)
|
||||
|
||||
private:
|
||||
OBJECT_CONSTRUCTORS(CompilationCacheTable,
|
||||
|
@ -16,7 +16,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(DataHandler, Struct)
|
||||
|
||||
CAST_ACCESSOR2(DataHandler)
|
||||
CAST_ACCESSOR(DataHandler)
|
||||
|
||||
ACCESSORS(DataHandler, smi_handler, Object, kSmiHandlerOffset)
|
||||
ACCESSORS(DataHandler, validity_cell, Object, kValidityCellOffset)
|
||||
|
@ -31,9 +31,9 @@ class DataHandler : public Struct {
|
||||
|
||||
// [data1-3]: These are optional general-purpose fields whose content and
|
||||
// presence depends on the handler kind.
|
||||
DECL_ACCESSORS2(data1, MaybeObject)
|
||||
DECL_ACCESSORS2(data2, MaybeObject)
|
||||
DECL_ACCESSORS2(data3, MaybeObject)
|
||||
DECL_ACCESSORS(data1, MaybeObject)
|
||||
DECL_ACCESSORS(data2, MaybeObject)
|
||||
DECL_ACCESSORS(data3, MaybeObject)
|
||||
|
||||
// Layout description.
|
||||
#define DATA_HANDLER_FIELDS(V) \
|
||||
@ -50,7 +50,7 @@ class DataHandler : public Struct {
|
||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, DATA_HANDLER_FIELDS)
|
||||
#undef DATA_HANDLER_FIELDS
|
||||
|
||||
DECL_CAST2(DataHandler)
|
||||
DECL_CAST(DataHandler)
|
||||
|
||||
DECL_VERIFIER(DataHandler)
|
||||
|
||||
|
@ -25,19 +25,19 @@ OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
|
||||
|
||||
CAST_ACCESSOR2(BreakPointInfo)
|
||||
CAST_ACCESSOR2(DebugInfo)
|
||||
CAST_ACCESSOR2(CoverageInfo)
|
||||
CAST_ACCESSOR2(BreakPoint)
|
||||
CAST_ACCESSOR(BreakPointInfo)
|
||||
CAST_ACCESSOR(DebugInfo)
|
||||
CAST_ACCESSOR(CoverageInfo)
|
||||
CAST_ACCESSOR(BreakPoint)
|
||||
|
||||
SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
|
||||
ACCESSORS2(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
|
||||
ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
|
||||
SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
|
||||
ACCESSORS(DebugInfo, script, Object, kScriptOffset)
|
||||
ACCESSORS(DebugInfo, original_bytecode_array, Object,
|
||||
kOriginalBytecodeArrayOffset)
|
||||
ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
|
||||
ACCESSORS2(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
|
||||
ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
|
||||
ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
|
||||
|
||||
BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
|
||||
@ -53,7 +53,7 @@ SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
|
||||
ACCESSORS(BreakPointInfo, break_points, Object, kBreakPointsOffset)
|
||||
|
||||
SMI_ACCESSORS(BreakPoint, id, kIdOffset)
|
||||
ACCESSORS2(BreakPoint, condition, String, kConditionOffset)
|
||||
ACCESSORS(BreakPoint, condition, String, kConditionOffset)
|
||||
|
||||
bool DebugInfo::HasInstrumentedBytecodeArray() {
|
||||
DCHECK_EQ(debug_bytecode_array()->IsBytecodeArray(),
|
||||
|
@ -39,7 +39,7 @@ class DebugInfo : public Struct {
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
|
||||
// The shared function info for the source being debugged.
|
||||
DECL_ACCESSORS2(shared, SharedFunctionInfo)
|
||||
DECL_ACCESSORS(shared, SharedFunctionInfo)
|
||||
|
||||
// Bit field containing various information collected for debugging.
|
||||
DECL_INT_ACCESSORS(debugger_hints)
|
||||
@ -92,7 +92,7 @@ class DebugInfo : public Struct {
|
||||
DECL_ACCESSORS(debug_bytecode_array, Object)
|
||||
|
||||
// Fixed array holding status information for each active break point.
|
||||
DECL_ACCESSORS2(break_points, FixedArray)
|
||||
DECL_ACCESSORS(break_points, FixedArray)
|
||||
|
||||
// Check if there is a break point at a source position.
|
||||
bool HasBreakPoint(Isolate* isolate, int source_position);
|
||||
@ -162,7 +162,7 @@ class DebugInfo : public Struct {
|
||||
void ClearCoverageInfo(Isolate* isolate);
|
||||
DECL_ACCESSORS(coverage_info, Object)
|
||||
|
||||
DECL_CAST2(DebugInfo)
|
||||
DECL_CAST(DebugInfo)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(DebugInfo)
|
||||
@ -217,7 +217,7 @@ class BreakPointInfo : public Tuple2 {
|
||||
|
||||
int GetStatementPosition(Handle<DebugInfo> debug_info);
|
||||
|
||||
DECL_CAST2(BreakPointInfo)
|
||||
DECL_CAST(BreakPointInfo)
|
||||
|
||||
static const int kSourcePositionOffset = kValue1Offset;
|
||||
static const int kBreakPointsOffset = kValue2Offset;
|
||||
@ -242,7 +242,7 @@ class CoverageInfo : public FixedArray {
|
||||
return slot_count * kSlotIndexCount + kFirstSlotIndex;
|
||||
}
|
||||
|
||||
DECL_CAST2(CoverageInfo)
|
||||
DECL_CAST(CoverageInfo)
|
||||
|
||||
// Print debug info.
|
||||
void Print(std::unique_ptr<char[]> function_name);
|
||||
@ -268,9 +268,9 @@ class CoverageInfo : public FixedArray {
|
||||
class BreakPoint : public Tuple2 {
|
||||
public:
|
||||
DECL_INT_ACCESSORS(id)
|
||||
DECL_ACCESSORS2(condition, String)
|
||||
DECL_ACCESSORS(condition, String)
|
||||
|
||||
DECL_CAST2(BreakPoint)
|
||||
DECL_CAST(BreakPoint)
|
||||
|
||||
static const int kIdOffset = kValue1Offset;
|
||||
static const int kConditionOffset = kValue2Offset;
|
||||
|
@ -26,10 +26,10 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(DescriptorArray, HeapObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(EnumCache, Tuple2)
|
||||
|
||||
CAST_ACCESSOR2(DescriptorArray)
|
||||
CAST_ACCESSOR2(EnumCache)
|
||||
CAST_ACCESSOR(DescriptorArray)
|
||||
CAST_ACCESSOR(EnumCache)
|
||||
|
||||
ACCESSORS2(DescriptorArray, enum_cache, EnumCache, kEnumCacheOffset)
|
||||
ACCESSORS(DescriptorArray, enum_cache, EnumCache, kEnumCacheOffset)
|
||||
RELAXED_INT16_ACCESSORS(DescriptorArray, number_of_all_descriptors,
|
||||
kNumberOfAllDescriptorsOffset)
|
||||
RELAXED_INT16_ACCESSORS(DescriptorArray, number_of_descriptors,
|
||||
@ -209,13 +209,13 @@ int DescriptorArray::length() const {
|
||||
|
||||
MaybeObject DescriptorArray::get(int index) const {
|
||||
DCHECK(index >= 0 && index < this->length());
|
||||
return RELAXED_READ_WEAK_FIELD(this, offset(index));
|
||||
return RELAXED_READ_WEAK_FIELD(*this, offset(index));
|
||||
}
|
||||
|
||||
void DescriptorArray::set(int index, MaybeObject value) {
|
||||
DCHECK(index >= 0 && index < this->length());
|
||||
RELAXED_WRITE_WEAK_FIELD(this, offset(index), value);
|
||||
WEAK_WRITE_BARRIER(this, offset(index), value);
|
||||
RELAXED_WRITE_WEAK_FIELD(*this, offset(index), value);
|
||||
WEAK_WRITE_BARRIER(*this, offset(index), value);
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
@ -24,10 +24,10 @@ class Isolate;
|
||||
// An EnumCache is a pair used to hold keys and indices caches.
|
||||
class EnumCache : public Tuple2 {
|
||||
public:
|
||||
DECL_ACCESSORS2(keys, FixedArray)
|
||||
DECL_ACCESSORS2(indices, FixedArray)
|
||||
DECL_ACCESSORS(keys, FixedArray)
|
||||
DECL_ACCESSORS(indices, FixedArray)
|
||||
|
||||
DECL_CAST2(EnumCache)
|
||||
DECL_CAST(EnumCache)
|
||||
|
||||
// Layout description.
|
||||
static const int kKeysOffset = kValue1Offset;
|
||||
@ -59,7 +59,7 @@ class DescriptorArray : public HeapObject {
|
||||
DECL_INT16_ACCESSORS(number_of_descriptors)
|
||||
inline int16_t number_of_slack_descriptors() const;
|
||||
inline int number_of_entries() const;
|
||||
DECL_ACCESSORS2(enum_cache, EnumCache)
|
||||
DECL_ACCESSORS(enum_cache, EnumCache)
|
||||
|
||||
void ClearEnumCache();
|
||||
inline void CopyEnumCacheFrom(DescriptorArray array);
|
||||
@ -130,7 +130,7 @@ class DescriptorArray : public HeapObject {
|
||||
void Initialize(EnumCache enum_cache, HeapObject undefined_value,
|
||||
int nof_descriptors, int slack);
|
||||
|
||||
DECL_CAST2(DescriptorArray)
|
||||
DECL_CAST(DescriptorArray)
|
||||
|
||||
// Constant for denoting key was not found.
|
||||
static const int kNotFound = -1;
|
||||
|
@ -16,10 +16,10 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
CAST_ACCESSOR2(GlobalDictionary)
|
||||
CAST_ACCESSOR2(NameDictionary)
|
||||
CAST_ACCESSOR2(NumberDictionary)
|
||||
CAST_ACCESSOR2(SimpleNumberDictionary)
|
||||
CAST_ACCESSOR(GlobalDictionary)
|
||||
CAST_ACCESSOR(NameDictionary)
|
||||
CAST_ACCESSOR(NumberDictionary)
|
||||
CAST_ACCESSOR(SimpleNumberDictionary)
|
||||
|
||||
template <typename Derived, typename Shape>
|
||||
Dictionary<Derived, Shape>::Dictionary(Address ptr)
|
||||
|
@ -194,7 +194,7 @@ class BaseNameDictionary : public Dictionary<Derived, Shape> {
|
||||
class NameDictionary
|
||||
: public BaseNameDictionary<NameDictionary, NameDictionaryShape> {
|
||||
public:
|
||||
DECL_CAST2(NameDictionary)
|
||||
DECL_CAST(NameDictionary)
|
||||
|
||||
static const int kEntryDetailsIndex = 2;
|
||||
static const int kInitialCapacity = 2;
|
||||
@ -230,7 +230,7 @@ class GlobalDictionaryShape : public NameDictionaryShape {
|
||||
class GlobalDictionary
|
||||
: public BaseNameDictionary<GlobalDictionary, GlobalDictionaryShape> {
|
||||
public:
|
||||
DECL_CAST2(GlobalDictionary)
|
||||
DECL_CAST(GlobalDictionary)
|
||||
|
||||
inline Object ValueAt(int entry);
|
||||
inline PropertyCell CellAt(int entry);
|
||||
@ -291,7 +291,7 @@ extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
|
||||
class SimpleNumberDictionary
|
||||
: public Dictionary<SimpleNumberDictionary, SimpleNumberDictionaryShape> {
|
||||
public:
|
||||
DECL_CAST2(SimpleNumberDictionary)
|
||||
DECL_CAST(SimpleNumberDictionary)
|
||||
// Type specific at put (default NONE attributes is used when adding).
|
||||
V8_WARN_UNUSED_RESULT static Handle<SimpleNumberDictionary> Set(
|
||||
Isolate* isolate, Handle<SimpleNumberDictionary> dictionary, uint32_t key,
|
||||
@ -315,7 +315,7 @@ extern template class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
|
||||
class NumberDictionary
|
||||
: public Dictionary<NumberDictionary, NumberDictionaryShape> {
|
||||
public:
|
||||
DECL_CAST2(NumberDictionary)
|
||||
DECL_CAST(NumberDictionary)
|
||||
DECL_PRINTER(NumberDictionary)
|
||||
|
||||
// Type specific at put (default NONE attributes is used when adding).
|
||||
|
@ -17,7 +17,7 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
CAST_ACCESSOR2(EmbedderDataArray)
|
||||
CAST_ACCESSOR(EmbedderDataArray)
|
||||
|
||||
SMI_ACCESSORS(EmbedderDataArray, length, kLengthOffset)
|
||||
|
||||
|
@ -25,7 +25,7 @@ class EmbedderDataArray : public HeapObject {
|
||||
V8_INLINE int length() const;
|
||||
V8_INLINE void set_length(int value);
|
||||
|
||||
DECL_CAST2(EmbedderDataArray)
|
||||
DECL_CAST(EmbedderDataArray)
|
||||
|
||||
// Layout description.
|
||||
#define EMBEDDER_DATA_ARRAY_FIELDS(V) \
|
||||
|
@ -17,9 +17,9 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(FeedbackCell, Struct)
|
||||
|
||||
CAST_ACCESSOR2(FeedbackCell)
|
||||
CAST_ACCESSOR(FeedbackCell)
|
||||
|
||||
ACCESSORS2(FeedbackCell, value, HeapObject, kValueOffset)
|
||||
ACCESSORS(FeedbackCell, value, HeapObject, kValueOffset)
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -21,9 +21,9 @@ namespace internal {
|
||||
class FeedbackCell : public Struct {
|
||||
public:
|
||||
// [value]: value of the cell.
|
||||
DECL_ACCESSORS2(value, HeapObject)
|
||||
DECL_ACCESSORS(value, HeapObject)
|
||||
|
||||
DECL_CAST2(FeedbackCell)
|
||||
DECL_CAST(FeedbackCell)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(FeedbackCell)
|
||||
|
@ -49,15 +49,15 @@ ByteArray::ByteArray(Address ptr, AllowInlineSmiStorage allow_smi)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(WeakArrayList)
|
||||
|
||||
CAST_ACCESSOR2(ArrayList)
|
||||
CAST_ACCESSOR2(ByteArray)
|
||||
CAST_ACCESSOR2(FixedArray)
|
||||
CAST_ACCESSOR2(FixedArrayBase)
|
||||
CAST_ACCESSOR2(FixedDoubleArray)
|
||||
CAST_ACCESSOR2(FixedTypedArrayBase)
|
||||
CAST_ACCESSOR2(TemplateList)
|
||||
CAST_ACCESSOR2(WeakFixedArray)
|
||||
CAST_ACCESSOR2(WeakArrayList)
|
||||
CAST_ACCESSOR(ArrayList)
|
||||
CAST_ACCESSOR(ByteArray)
|
||||
CAST_ACCESSOR(FixedArray)
|
||||
CAST_ACCESSOR(FixedArrayBase)
|
||||
CAST_ACCESSOR(FixedDoubleArray)
|
||||
CAST_ACCESSOR(FixedTypedArrayBase)
|
||||
CAST_ACCESSOR(TemplateList)
|
||||
CAST_ACCESSOR(WeakFixedArray)
|
||||
CAST_ACCESSOR(WeakArrayList)
|
||||
|
||||
SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
|
||||
SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset)
|
||||
@ -129,8 +129,8 @@ void FixedArray::set(int index, Object value) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, this->length());
|
||||
int offset = kHeaderSize + index * kTaggedSize;
|
||||
RELAXED_WRITE_FIELD(this, offset, value);
|
||||
WRITE_BARRIER(this, offset, value);
|
||||
RELAXED_WRITE_FIELD(*this, offset, value);
|
||||
WRITE_BARRIER(*this, offset, value);
|
||||
}
|
||||
|
||||
void FixedArray::set(int index, Object value, WriteBarrierMode mode) {
|
||||
@ -138,8 +138,8 @@ void FixedArray::set(int index, Object value, WriteBarrierMode mode) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, this->length());
|
||||
int offset = kHeaderSize + index * kTaggedSize;
|
||||
RELAXED_WRITE_FIELD(this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, offset, value, mode);
|
||||
RELAXED_WRITE_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
|
||||
}
|
||||
|
||||
void FixedArray::NoWriteBarrierSet(FixedArray array, int index, Object value) {
|
||||
@ -364,7 +364,8 @@ bool FixedDoubleArray::is_the_hole(int index) {
|
||||
void FixedDoubleArray::MoveElements(Heap* heap, int dst_index, int src_index,
|
||||
int len, WriteBarrierMode mode) {
|
||||
DCHECK_EQ(SKIP_WRITE_BARRIER, mode);
|
||||
double* data_start = reinterpret_cast<double*>(FIELD_ADDR(this, kHeaderSize));
|
||||
double* data_start =
|
||||
reinterpret_cast<double*>(FIELD_ADDR(*this, kHeaderSize));
|
||||
MemMove(data_start + dst_index, data_start + src_index, len * kDoubleSize);
|
||||
}
|
||||
|
||||
@ -376,23 +377,23 @@ void FixedDoubleArray::FillWithHoles(int from, int to) {
|
||||
|
||||
MaybeObject WeakFixedArray::Get(int index) const {
|
||||
DCHECK(index >= 0 && index < this->length());
|
||||
return RELAXED_READ_WEAK_FIELD(this, OffsetOfElementAt(index));
|
||||
return RELAXED_READ_WEAK_FIELD(*this, OffsetOfElementAt(index));
|
||||
}
|
||||
|
||||
void WeakFixedArray::Set(int index, MaybeObject value) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, length());
|
||||
int offset = OffsetOfElementAt(index);
|
||||
RELAXED_WRITE_WEAK_FIELD(this, offset, value);
|
||||
WEAK_WRITE_BARRIER(this, offset, value);
|
||||
RELAXED_WRITE_WEAK_FIELD(*this, offset, value);
|
||||
WEAK_WRITE_BARRIER(*this, offset, value);
|
||||
}
|
||||
|
||||
void WeakFixedArray::Set(int index, MaybeObject value, WriteBarrierMode mode) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, length());
|
||||
int offset = OffsetOfElementAt(index);
|
||||
RELAXED_WRITE_WEAK_FIELD(this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(this, offset, value, mode);
|
||||
RELAXED_WRITE_WEAK_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(*this, offset, value, mode);
|
||||
}
|
||||
|
||||
MaybeObjectSlot WeakFixedArray::data_start() {
|
||||
@ -405,15 +406,15 @@ MaybeObjectSlot WeakFixedArray::RawFieldOfElementAt(int index) {
|
||||
|
||||
MaybeObject WeakArrayList::Get(int index) const {
|
||||
DCHECK(index >= 0 && index < this->capacity());
|
||||
return RELAXED_READ_WEAK_FIELD(this, OffsetOfElementAt(index));
|
||||
return RELAXED_READ_WEAK_FIELD(*this, OffsetOfElementAt(index));
|
||||
}
|
||||
|
||||
void WeakArrayList::Set(int index, MaybeObject value, WriteBarrierMode mode) {
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, this->capacity());
|
||||
int offset = OffsetOfElementAt(index);
|
||||
RELAXED_WRITE_WEAK_FIELD(this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(this, offset, value, mode);
|
||||
RELAXED_WRITE_WEAK_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WEAK_WRITE_BARRIER(*this, offset, value, mode);
|
||||
}
|
||||
|
||||
MaybeObjectSlot WeakArrayList::data_start() {
|
||||
|
@ -81,7 +81,7 @@ class FixedArrayBase : public HeapObject {
|
||||
|
||||
inline Object unchecked_synchronized_length() const;
|
||||
|
||||
DECL_CAST2(FixedArrayBase)
|
||||
DECL_CAST(FixedArrayBase)
|
||||
|
||||
static int GetMaxLengthForNewSpaceAllocation(ElementsKind kind);
|
||||
|
||||
@ -185,7 +185,7 @@ class FixedArray : public FixedArrayBase {
|
||||
// Garbage collection support.
|
||||
inline ObjectSlot RawFieldOfElementAt(int index);
|
||||
|
||||
DECL_CAST2(FixedArray)
|
||||
DECL_CAST(FixedArray)
|
||||
// Maximally allowed length of a FixedArray.
|
||||
static const int kMaxLength = (kMaxSize - kHeaderSize) / kTaggedSize;
|
||||
static_assert(Internals::IsValidSmi(kMaxLength),
|
||||
@ -252,7 +252,7 @@ class FixedDoubleArray : public FixedArrayBase {
|
||||
// Code Generation support.
|
||||
static int OffsetOfElementAt(int index) { return SizeFor(index); }
|
||||
|
||||
DECL_CAST2(FixedDoubleArray)
|
||||
DECL_CAST(FixedDoubleArray)
|
||||
|
||||
// Maximally allowed length of a FixedArray.
|
||||
static const int kMaxLength = (kMaxSize - kHeaderSize) / kDoubleSize;
|
||||
@ -272,7 +272,7 @@ class FixedDoubleArray : public FixedArrayBase {
|
||||
// MaybeObject.
|
||||
class WeakFixedArray : public HeapObject {
|
||||
public:
|
||||
DECL_CAST2(WeakFixedArray)
|
||||
DECL_CAST(WeakFixedArray)
|
||||
|
||||
inline MaybeObject Get(int index) const;
|
||||
|
||||
@ -338,7 +338,7 @@ class WeakFixedArray : public HeapObject {
|
||||
class WeakArrayList : public HeapObject {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
DECL_CAST2(WeakArrayList)
|
||||
DECL_CAST(WeakArrayList)
|
||||
DECL_VERIFIER(WeakArrayList)
|
||||
DECL_PRINTER(WeakArrayList)
|
||||
|
||||
@ -460,7 +460,7 @@ class ArrayList : public FixedArray {
|
||||
// Return a copy of the list of size Length() without the first entry. The
|
||||
// number returned by Length() is stored in the first entry.
|
||||
static Handle<FixedArray> Elements(Isolate* isolate, Handle<ArrayList> array);
|
||||
DECL_CAST2(ArrayList)
|
||||
DECL_CAST(ArrayList)
|
||||
|
||||
private:
|
||||
static Handle<ArrayList> EnsureSpace(Isolate* isolate,
|
||||
@ -524,7 +524,7 @@ class ByteArray : public FixedArrayBase {
|
||||
// Returns a pointer to the ByteArray object for a given data start address.
|
||||
static inline ByteArray FromDataStartAddress(Address address);
|
||||
|
||||
DECL_CAST2(ByteArray)
|
||||
DECL_CAST(ByteArray)
|
||||
|
||||
// Dispatched behavior.
|
||||
inline int ByteArraySize();
|
||||
@ -570,7 +570,7 @@ class PodArray : public ByteArray {
|
||||
sizeof(T));
|
||||
}
|
||||
inline int length() const;
|
||||
DECL_CAST2(PodArray<T>)
|
||||
DECL_CAST(PodArray<T>)
|
||||
|
||||
OBJECT_CONSTRUCTORS(PodArray<T>, ByteArray);
|
||||
};
|
||||
@ -586,7 +586,7 @@ class FixedTypedArrayBase : public FixedArrayBase {
|
||||
DECL_ACCESSORS(external_pointer, void*)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_CAST2(FixedTypedArrayBase)
|
||||
DECL_CAST(FixedTypedArrayBase)
|
||||
|
||||
#define FIXED_TYPED_ARRAY_BASE_FIELDS(V) \
|
||||
V(kBasePointerOffset, kTaggedSize) \
|
||||
@ -641,7 +641,7 @@ class FixedTypedArray : public FixedTypedArrayBase {
|
||||
typedef typename Traits::ElementType ElementType;
|
||||
static const InstanceType kInstanceType = Traits::kInstanceType;
|
||||
|
||||
DECL_CAST2(FixedTypedArray<Traits>)
|
||||
DECL_CAST(FixedTypedArray<Traits>)
|
||||
|
||||
static inline ElementType get_scalar_from_data_ptr(void* data_ptr, int index);
|
||||
inline ElementType get_scalar(int index);
|
||||
@ -695,7 +695,7 @@ class TemplateList : public FixedArray {
|
||||
inline void set(int index, Object value);
|
||||
static Handle<TemplateList> Add(Isolate* isolate, Handle<TemplateList> list,
|
||||
Handle<Object> value);
|
||||
DECL_CAST2(TemplateList)
|
||||
DECL_CAST(TemplateList)
|
||||
private:
|
||||
static const int kLengthIndex = 0;
|
||||
static const int kFirstElementIndex = kLengthIndex + 1;
|
||||
|
@ -17,7 +17,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(Foreign, HeapObject)
|
||||
|
||||
CAST_ACCESSOR2(Foreign)
|
||||
CAST_ACCESSOR(Foreign)
|
||||
|
||||
// static
|
||||
bool Foreign::IsNormalized(Object value) {
|
||||
|
@ -21,7 +21,7 @@ class Foreign : public HeapObject {
|
||||
|
||||
static inline bool IsNormalized(Object object);
|
||||
|
||||
DECL_CAST2(Foreign)
|
||||
DECL_CAST(Foreign)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(Foreign)
|
||||
|
@ -17,7 +17,7 @@ namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(FrameArray, FixedArray)
|
||||
CAST_ACCESSOR2(FrameArray)
|
||||
CAST_ACCESSOR(FrameArray)
|
||||
|
||||
#define DEFINE_FRAME_ARRAY_ACCESSORS(name, type) \
|
||||
type FrameArray::name(int frame_ix) const { \
|
||||
|
@ -64,7 +64,7 @@ class FrameArray : public FixedArray {
|
||||
Handle<FrameArray> in, Handle<WasmInstanceObject> wasm_instance,
|
||||
int wasm_function_index, wasm::WasmCode* code, int offset, int flags);
|
||||
|
||||
DECL_CAST2(FrameArray)
|
||||
DECL_CAST(FrameArray)
|
||||
|
||||
private:
|
||||
// The underlying fixed array embodies a captured stack trace. Frame i
|
||||
|
@ -24,7 +24,7 @@ int FreeSpace::Size() { return size(); }
|
||||
|
||||
FreeSpace FreeSpace::next() {
|
||||
#ifdef DEBUG
|
||||
Heap* heap = Heap::FromWritableHeapObject(this);
|
||||
Heap* heap = Heap::FromWritableHeapObject(*this);
|
||||
Object free_space_map = heap->isolate()->root(RootIndex::kFreeSpaceMap);
|
||||
DCHECK_IMPLIES(!map_slot().contains_value(free_space_map->ptr()),
|
||||
!heap->deserialization_complete() &&
|
||||
@ -36,7 +36,7 @@ FreeSpace FreeSpace::next() {
|
||||
|
||||
void FreeSpace::set_next(FreeSpace next) {
|
||||
#ifdef DEBUG
|
||||
Heap* heap = Heap::FromWritableHeapObject(this);
|
||||
Heap* heap = Heap::FromWritableHeapObject(*this);
|
||||
Object free_space_map = heap->isolate()->root(RootIndex::kFreeSpaceMap);
|
||||
DCHECK_IMPLIES(!map_slot().contains_value(free_space_map->ptr()),
|
||||
!heap->deserialization_complete() &&
|
||||
@ -47,7 +47,7 @@ void FreeSpace::set_next(FreeSpace next) {
|
||||
}
|
||||
|
||||
FreeSpace FreeSpace::cast(HeapObject o) {
|
||||
SLOW_DCHECK(!Heap::FromWritableHeapObject(&o)->deserialization_complete() ||
|
||||
SLOW_DCHECK(!Heap::FromWritableHeapObject(o)->deserialization_complete() ||
|
||||
o->IsFreeSpace());
|
||||
return bit_cast<FreeSpace>(o);
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ class ObjectHashTableBase : public HashTable<Derived, Shape> {
|
||||
class ObjectHashTable
|
||||
: public ObjectHashTableBase<ObjectHashTable, ObjectHashTableShape> {
|
||||
public:
|
||||
DECL_CAST2(ObjectHashTable)
|
||||
DECL_CAST(ObjectHashTable)
|
||||
DECL_PRINTER(ObjectHashTable)
|
||||
|
||||
OBJECT_CONSTRUCTORS(
|
||||
@ -346,7 +346,7 @@ class EphemeronHashTableShape : public ObjectHashTableShape {
|
||||
class EphemeronHashTable
|
||||
: public ObjectHashTableBase<EphemeronHashTable, EphemeronHashTableShape> {
|
||||
public:
|
||||
DECL_CAST2(EphemeronHashTable)
|
||||
DECL_CAST(EphemeronHashTable)
|
||||
DECL_PRINTER(EphemeronHashTable)
|
||||
|
||||
protected:
|
||||
@ -371,7 +371,7 @@ class ObjectHashSet : public HashTable<ObjectHashSet, ObjectHashSetShape> {
|
||||
inline bool Has(Isolate* isolate, Handle<Object> key, int32_t hash);
|
||||
inline bool Has(Isolate* isolate, Handle<Object> key);
|
||||
|
||||
DECL_CAST2(ObjectHashSet)
|
||||
DECL_CAST(ObjectHashSet)
|
||||
|
||||
OBJECT_CONSTRUCTORS(ObjectHashSet,
|
||||
HashTable<ObjectHashSet, ObjectHashSetShape>)
|
||||
|
@ -19,8 +19,8 @@ OBJECT_CONSTRUCTORS_IMPL(HeapNumberBase, HeapObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(HeapNumber, HeapNumberBase)
|
||||
OBJECT_CONSTRUCTORS_IMPL(MutableHeapNumber, HeapNumberBase)
|
||||
|
||||
CAST_ACCESSOR2(HeapNumber)
|
||||
CAST_ACCESSOR2(MutableHeapNumber)
|
||||
CAST_ACCESSOR(HeapNumber)
|
||||
CAST_ACCESSOR(MutableHeapNumber)
|
||||
|
||||
double HeapNumberBase::value() const {
|
||||
return READ_DOUBLE_FIELD(this, kValueOffset);
|
||||
|
@ -67,7 +67,7 @@ class HeapNumberBase : public HeapObject {
|
||||
|
||||
class HeapNumber : public HeapNumberBase {
|
||||
public:
|
||||
DECL_CAST2(HeapNumber)
|
||||
DECL_CAST(HeapNumber)
|
||||
V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os);
|
||||
|
||||
OBJECT_CONSTRUCTORS(HeapNumber, HeapNumberBase);
|
||||
@ -75,7 +75,7 @@ class HeapNumber : public HeapNumberBase {
|
||||
|
||||
class MutableHeapNumber : public HeapNumberBase {
|
||||
public:
|
||||
DECL_CAST2(MutableHeapNumber)
|
||||
DECL_CAST(MutableHeapNumber)
|
||||
V8_EXPORT_PRIVATE void MutableHeapNumberPrint(std::ostream& os);
|
||||
|
||||
OBJECT_CONSTRUCTORS(MutableHeapNumber, HeapNumberBase);
|
||||
|
@ -132,7 +132,7 @@ class HeapObject : public Object {
|
||||
inline MaybeObjectSlot RawMaybeWeakField(int byte_offset) const;
|
||||
static inline MaybeObjectSlot RawMaybeWeakField(HeapObject obj, int offset);
|
||||
|
||||
DECL_CAST2(HeapObject)
|
||||
DECL_CAST(HeapObject)
|
||||
|
||||
// Return the write barrier mode for this. Callers of this function
|
||||
// must be able to present a reference to an DisallowHeapAllocation
|
||||
|
@ -21,10 +21,10 @@ OBJECT_CONSTRUCTORS_IMPL(JSArrayBufferView, JSObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSTypedArray, JSArrayBufferView)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSDataView, JSArrayBufferView)
|
||||
|
||||
CAST_ACCESSOR2(JSArrayBuffer)
|
||||
CAST_ACCESSOR2(JSArrayBufferView)
|
||||
CAST_ACCESSOR2(JSTypedArray)
|
||||
CAST_ACCESSOR2(JSDataView)
|
||||
CAST_ACCESSOR(JSArrayBuffer)
|
||||
CAST_ACCESSOR(JSArrayBufferView)
|
||||
CAST_ACCESSOR(JSTypedArray)
|
||||
CAST_ACCESSOR(JSDataView)
|
||||
|
||||
size_t JSArrayBuffer::byte_length() const {
|
||||
return READ_UINTPTR_FIELD(this, kByteLengthOffset);
|
||||
@ -149,7 +149,7 @@ size_t JSTypedArray::length_value() const {
|
||||
|
||||
void JSTypedArray::set_length(Object value, WriteBarrierMode mode) {
|
||||
WRITE_FIELD(this, kLengthOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, kLengthOffset, value, mode);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, kLengthOffset, value, mode);
|
||||
}
|
||||
|
||||
bool JSTypedArray::is_on_heap() const {
|
||||
|
@ -77,7 +77,7 @@ class JSArrayBuffer : public JSObject {
|
||||
// [is_wasm_memory]: whether the buffer is tracked by the WasmMemoryTracker.
|
||||
DECL_BOOLEAN_ACCESSORS(is_wasm_memory)
|
||||
|
||||
DECL_CAST2(JSArrayBuffer)
|
||||
DECL_CAST(JSArrayBuffer)
|
||||
|
||||
void Detach();
|
||||
|
||||
@ -155,7 +155,7 @@ class JSArrayBufferView : public JSObject {
|
||||
// [byte_length]: length of typed array in bytes.
|
||||
DECL_PRIMITIVE_ACCESSORS(byte_length, size_t)
|
||||
|
||||
DECL_CAST2(JSArrayBufferView)
|
||||
DECL_CAST(JSArrayBufferView)
|
||||
|
||||
DECL_VERIFIER(JSArrayBufferView)
|
||||
|
||||
@ -191,7 +191,7 @@ class JSTypedArray : public JSArrayBufferView {
|
||||
Isolate* isolate, Handle<JSTypedArray> o, Handle<Object> key,
|
||||
PropertyDescriptor* desc, ShouldThrow should_throw);
|
||||
|
||||
DECL_CAST2(JSTypedArray)
|
||||
DECL_CAST(JSTypedArray)
|
||||
|
||||
ExternalArrayType type();
|
||||
V8_EXPORT_PRIVATE size_t element_size();
|
||||
@ -236,7 +236,7 @@ class JSTypedArray : public JSArrayBufferView {
|
||||
|
||||
class JSDataView : public JSArrayBufferView {
|
||||
public:
|
||||
DECL_CAST2(JSDataView)
|
||||
DECL_CAST(JSDataView)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSDataView)
|
||||
|
@ -18,8 +18,8 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSArray, JSObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSArrayIterator, JSObject)
|
||||
|
||||
CAST_ACCESSOR2(JSArray)
|
||||
CAST_ACCESSOR2(JSArrayIterator)
|
||||
CAST_ACCESSOR(JSArray)
|
||||
CAST_ACCESSOR(JSArrayIterator)
|
||||
|
||||
ACCESSORS(JSArray, length, Object, kLengthOffset)
|
||||
|
||||
|
@ -95,7 +95,7 @@ class JSArray : public JSObject {
|
||||
// to Proxies and objects with a hidden prototype.
|
||||
inline bool HasArrayPrototype(Isolate* isolate);
|
||||
|
||||
DECL_CAST2(JSArray)
|
||||
DECL_CAST(JSArray)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSArray)
|
||||
@ -145,7 +145,7 @@ class JSArrayIterator : public JSObject {
|
||||
DECL_PRINTER(JSArrayIterator)
|
||||
DECL_VERIFIER(JSArrayIterator)
|
||||
|
||||
DECL_CAST2(JSArrayIterator)
|
||||
DECL_CAST(JSArrayIterator)
|
||||
|
||||
// [iterated_object]: the [[IteratedObject]] inobject property.
|
||||
DECL_ACCESSORS(iterated_object, Object)
|
||||
|
@ -30,18 +30,18 @@ inline JSV8BreakIterator::Type JSV8BreakIterator::type() const {
|
||||
return static_cast<JSV8BreakIterator::Type>(Smi::ToInt(value));
|
||||
}
|
||||
|
||||
ACCESSORS2(JSV8BreakIterator, locale, String, kLocaleOffset)
|
||||
ACCESSORS2(JSV8BreakIterator, break_iterator, Managed<icu::BreakIterator>,
|
||||
kBreakIteratorOffset)
|
||||
ACCESSORS2(JSV8BreakIterator, unicode_string, Managed<icu::UnicodeString>,
|
||||
kUnicodeStringOffset)
|
||||
ACCESSORS(JSV8BreakIterator, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSV8BreakIterator, break_iterator, Managed<icu::BreakIterator>,
|
||||
kBreakIteratorOffset)
|
||||
ACCESSORS(JSV8BreakIterator, unicode_string, Managed<icu::UnicodeString>,
|
||||
kUnicodeStringOffset)
|
||||
ACCESSORS(JSV8BreakIterator, bound_adopt_text, Object, kBoundAdoptTextOffset)
|
||||
ACCESSORS(JSV8BreakIterator, bound_first, Object, kBoundFirstOffset)
|
||||
ACCESSORS(JSV8BreakIterator, bound_next, Object, kBoundNextOffset)
|
||||
ACCESSORS(JSV8BreakIterator, bound_current, Object, kBoundCurrentOffset)
|
||||
ACCESSORS(JSV8BreakIterator, bound_break_type, Object, kBoundBreakTypeOffset)
|
||||
|
||||
CAST_ACCESSOR2(JSV8BreakIterator)
|
||||
CAST_ACCESSOR(JSV8BreakIterator)
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -56,13 +56,13 @@ class JSV8BreakIterator : public JSObject {
|
||||
|
||||
Handle<String> TypeAsString() const;
|
||||
|
||||
DECL_CAST2(JSV8BreakIterator)
|
||||
DECL_CAST(JSV8BreakIterator)
|
||||
DECL_PRINTER(JSV8BreakIterator)
|
||||
DECL_VERIFIER(JSV8BreakIterator)
|
||||
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS2(break_iterator, Managed<icu::BreakIterator>)
|
||||
DECL_ACCESSORS2(unicode_string, Managed<icu::UnicodeString>)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
DECL_ACCESSORS(break_iterator, Managed<icu::BreakIterator>)
|
||||
DECL_ACCESSORS(unicode_string, Managed<icu::UnicodeString>)
|
||||
DECL_ACCESSORS(bound_adopt_text, Object)
|
||||
DECL_ACCESSORS(bound_first, Object)
|
||||
DECL_ACCESSORS(bound_next, Object)
|
||||
|
@ -20,10 +20,10 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSCollator, JSObject)
|
||||
|
||||
ACCESSORS2(JSCollator, icu_collator, Managed<icu::Collator>, kICUCollatorOffset)
|
||||
ACCESSORS(JSCollator, icu_collator, Managed<icu::Collator>, kICUCollatorOffset)
|
||||
ACCESSORS(JSCollator, bound_compare, Object, kBoundCompareOffset);
|
||||
|
||||
CAST_ACCESSOR2(JSCollator);
|
||||
CAST_ACCESSOR(JSCollator);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -42,7 +42,7 @@ class JSCollator : public JSObject {
|
||||
|
||||
static std::set<std::string> GetAvailableLocales();
|
||||
|
||||
DECL_CAST2(JSCollator)
|
||||
DECL_CAST(JSCollator)
|
||||
DECL_PRINTER(JSCollator)
|
||||
DECL_VERIFIER(JSCollator)
|
||||
|
||||
@ -56,7 +56,7 @@ class JSCollator : public JSObject {
|
||||
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_COLLATOR_FIELDS)
|
||||
#undef JS_COLLATOR_FIELDS
|
||||
|
||||
DECL_ACCESSORS2(icu_collator, Managed<icu::Collator>)
|
||||
DECL_ACCESSORS(icu_collator, Managed<icu::Collator>)
|
||||
DECL_ACCESSORS(bound_compare, Object);
|
||||
|
||||
OBJECT_CONSTRUCTORS(JSCollator, JSObject);
|
||||
|
@ -47,13 +47,13 @@ ACCESSORS(JSCollectionIterator, index, Object, kIndexOffset)
|
||||
|
||||
ACCESSORS(JSWeakCollection, table, Object, kTableOffset)
|
||||
|
||||
CAST_ACCESSOR2(JSSet)
|
||||
CAST_ACCESSOR2(JSSetIterator)
|
||||
CAST_ACCESSOR2(JSMap)
|
||||
CAST_ACCESSOR2(JSMapIterator)
|
||||
CAST_ACCESSOR2(JSWeakCollection)
|
||||
CAST_ACCESSOR2(JSWeakMap)
|
||||
CAST_ACCESSOR2(JSWeakSet)
|
||||
CAST_ACCESSOR(JSSet)
|
||||
CAST_ACCESSOR(JSSetIterator)
|
||||
CAST_ACCESSOR(JSMap)
|
||||
CAST_ACCESSOR(JSMapIterator)
|
||||
CAST_ACCESSOR(JSWeakCollection)
|
||||
CAST_ACCESSOR(JSWeakMap)
|
||||
CAST_ACCESSOR(JSWeakSet)
|
||||
|
||||
Object JSMapIterator::CurrentValue() {
|
||||
OrderedHashMap table = OrderedHashMap::cast(this->table());
|
||||
|
@ -36,7 +36,7 @@ class JSCollection : public JSObject {
|
||||
// The JSSet describes EcmaScript Harmony sets
|
||||
class JSSet : public JSCollection {
|
||||
public:
|
||||
DECL_CAST2(JSSet)
|
||||
DECL_CAST(JSSet)
|
||||
|
||||
static void Initialize(Handle<JSSet> set, Isolate* isolate);
|
||||
static void Clear(Isolate* isolate, Handle<JSSet> set);
|
||||
@ -55,7 +55,7 @@ class JSSetIterator
|
||||
DECL_PRINTER(JSSetIterator)
|
||||
DECL_VERIFIER(JSSetIterator)
|
||||
|
||||
DECL_CAST2(JSSetIterator)
|
||||
DECL_CAST(JSSetIterator)
|
||||
|
||||
OBJECT_CONSTRUCTORS(JSSetIterator,
|
||||
OrderedHashTableIterator<JSSetIterator, OrderedHashSet>);
|
||||
@ -64,7 +64,7 @@ class JSSetIterator
|
||||
// The JSMap describes EcmaScript Harmony maps
|
||||
class JSMap : public JSCollection {
|
||||
public:
|
||||
DECL_CAST2(JSMap)
|
||||
DECL_CAST(JSMap)
|
||||
|
||||
static void Initialize(Handle<JSMap> map, Isolate* isolate);
|
||||
static void Clear(Isolate* isolate, Handle<JSMap> map);
|
||||
@ -83,7 +83,7 @@ class JSMapIterator
|
||||
DECL_PRINTER(JSMapIterator)
|
||||
DECL_VERIFIER(JSMapIterator)
|
||||
|
||||
DECL_CAST2(JSMapIterator)
|
||||
DECL_CAST(JSMapIterator)
|
||||
|
||||
// Returns the current value of the iterator. This should only be called when
|
||||
// |HasMore| returns true.
|
||||
@ -96,7 +96,7 @@ class JSMapIterator
|
||||
// Base class for both JSWeakMap and JSWeakSet
|
||||
class JSWeakCollection : public JSObject {
|
||||
public:
|
||||
DECL_CAST2(JSWeakCollection)
|
||||
DECL_CAST(JSWeakCollection)
|
||||
|
||||
// [table]: the backing hash table mapping keys to values.
|
||||
DECL_ACCESSORS(table, Object)
|
||||
@ -133,7 +133,7 @@ class JSWeakCollection : public JSObject {
|
||||
// The JSWeakMap describes EcmaScript Harmony weak maps
|
||||
class JSWeakMap : public JSWeakCollection {
|
||||
public:
|
||||
DECL_CAST2(JSWeakMap)
|
||||
DECL_CAST(JSWeakMap)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSWeakMap)
|
||||
@ -145,7 +145,7 @@ class JSWeakMap : public JSWeakCollection {
|
||||
// The JSWeakSet describes EcmaScript Harmony weak sets
|
||||
class JSWeakSet : public JSWeakCollection {
|
||||
public:
|
||||
DECL_CAST2(JSWeakSet)
|
||||
DECL_CAST(JSWeakSet)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSWeakSet)
|
||||
|
@ -20,10 +20,9 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSDateTimeFormat, JSObject)
|
||||
|
||||
ACCESSORS2(JSDateTimeFormat, icu_locale, Managed<icu::Locale>,
|
||||
kICULocaleOffset);
|
||||
ACCESSORS2(JSDateTimeFormat, icu_simple_date_format,
|
||||
Managed<icu::SimpleDateFormat>, kICUSimpleDateFormatOffset)
|
||||
ACCESSORS(JSDateTimeFormat, icu_locale, Managed<icu::Locale>, kICULocaleOffset);
|
||||
ACCESSORS(JSDateTimeFormat, icu_simple_date_format,
|
||||
Managed<icu::SimpleDateFormat>, kICUSimpleDateFormatOffset)
|
||||
ACCESSORS(JSDateTimeFormat, bound_format, Object, kBoundFormatOffset);
|
||||
SMI_ACCESSORS(JSDateTimeFormat, flags, kFlagsOffset)
|
||||
|
||||
@ -37,7 +36,7 @@ inline Intl::HourCycle JSDateTimeFormat::hour_cycle() const {
|
||||
return HourCycleBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSDateTimeFormat);
|
||||
CAST_ACCESSOR(JSDateTimeFormat);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -74,7 +74,7 @@ class JSDateTimeFormat : public JSObject {
|
||||
static std::set<std::string> GetAvailableLocales();
|
||||
|
||||
Handle<String> HourCycleAsString() const;
|
||||
DECL_CAST2(JSDateTimeFormat)
|
||||
DECL_CAST(JSDateTimeFormat)
|
||||
|
||||
// Layout description.
|
||||
#define JS_DATE_TIME_FORMAT_FIELDS(V) \
|
||||
@ -104,8 +104,8 @@ class JSDateTimeFormat : public JSObject {
|
||||
STATIC_ASSERT(Intl::HourCycle::kH23 <= HourCycleBits::kMax);
|
||||
STATIC_ASSERT(Intl::HourCycle::kH24 <= HourCycleBits::kMax);
|
||||
|
||||
DECL_ACCESSORS2(icu_locale, Managed<icu::Locale>)
|
||||
DECL_ACCESSORS2(icu_simple_date_format, Managed<icu::SimpleDateFormat>)
|
||||
DECL_ACCESSORS(icu_locale, Managed<icu::Locale>)
|
||||
DECL_ACCESSORS(icu_simple_date_format, Managed<icu::SimpleDateFormat>)
|
||||
DECL_ACCESSORS(bound_format, Object)
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
|
||||
|
@ -21,19 +21,19 @@ OBJECT_CONSTRUCTORS_IMPL(JSAsyncFunctionObject, JSGeneratorObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSAsyncGeneratorObject, JSGeneratorObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(AsyncGeneratorRequest, Struct)
|
||||
|
||||
CAST_ACCESSOR2(JSAsyncFunctionObject)
|
||||
CAST_ACCESSOR2(JSAsyncGeneratorObject)
|
||||
CAST_ACCESSOR2(JSGeneratorObject)
|
||||
CAST_ACCESSOR2(AsyncGeneratorRequest)
|
||||
CAST_ACCESSOR(JSAsyncFunctionObject)
|
||||
CAST_ACCESSOR(JSAsyncGeneratorObject)
|
||||
CAST_ACCESSOR(JSGeneratorObject)
|
||||
CAST_ACCESSOR(AsyncGeneratorRequest)
|
||||
|
||||
ACCESSORS2(JSGeneratorObject, function, JSFunction, kFunctionOffset)
|
||||
ACCESSORS2(JSGeneratorObject, context, Context, kContextOffset)
|
||||
ACCESSORS(JSGeneratorObject, function, JSFunction, kFunctionOffset)
|
||||
ACCESSORS(JSGeneratorObject, context, Context, kContextOffset)
|
||||
ACCESSORS(JSGeneratorObject, receiver, Object, kReceiverOffset)
|
||||
ACCESSORS(JSGeneratorObject, input_or_debug_pos, Object, kInputOrDebugPosOffset)
|
||||
SMI_ACCESSORS(JSGeneratorObject, resume_mode, kResumeModeOffset)
|
||||
SMI_ACCESSORS(JSGeneratorObject, continuation, kContinuationOffset)
|
||||
ACCESSORS2(JSGeneratorObject, parameters_and_registers, FixedArray,
|
||||
kParametersAndRegistersOffset)
|
||||
ACCESSORS(JSGeneratorObject, parameters_and_registers, FixedArray,
|
||||
kParametersAndRegistersOffset)
|
||||
|
||||
ACCESSORS(AsyncGeneratorRequest, next, Object, kNextOffset)
|
||||
SMI_ACCESSORS(AsyncGeneratorRequest, resume_mode, kResumeModeOffset)
|
||||
@ -54,9 +54,9 @@ bool JSGeneratorObject::is_executing() const {
|
||||
return continuation() == kGeneratorExecuting;
|
||||
}
|
||||
|
||||
ACCESSORS2(JSAsyncFunctionObject, promise, JSPromise, kPromiseOffset)
|
||||
ACCESSORS(JSAsyncFunctionObject, promise, JSPromise, kPromiseOffset)
|
||||
|
||||
ACCESSORS2(JSAsyncGeneratorObject, queue, HeapObject, kQueueOffset)
|
||||
ACCESSORS(JSAsyncGeneratorObject, queue, HeapObject, kQueueOffset)
|
||||
SMI_ACCESSORS(JSAsyncGeneratorObject, is_awaiting, kIsAwaitingOffset)
|
||||
|
||||
} // namespace internal
|
||||
|
@ -20,10 +20,10 @@ class JSPromise;
|
||||
class JSGeneratorObject : public JSObject {
|
||||
public:
|
||||
// [function]: The function corresponding to this generator object.
|
||||
DECL_ACCESSORS2(function, JSFunction)
|
||||
DECL_ACCESSORS(function, JSFunction)
|
||||
|
||||
// [context]: The context of the suspended computation.
|
||||
DECL_ACCESSORS2(context, Context)
|
||||
DECL_ACCESSORS(context, Context)
|
||||
|
||||
// [receiver]: The receiver of the suspended computation.
|
||||
DECL_ACCESSORS(receiver, Object)
|
||||
@ -55,9 +55,9 @@ class JSGeneratorObject : public JSObject {
|
||||
int source_position() const;
|
||||
|
||||
// [parameters_and_registers]: Saved interpreter register file.
|
||||
DECL_ACCESSORS2(parameters_and_registers, FixedArray)
|
||||
DECL_ACCESSORS(parameters_and_registers, FixedArray)
|
||||
|
||||
DECL_CAST2(JSGeneratorObject)
|
||||
DECL_CAST(JSGeneratorObject)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSGeneratorObject)
|
||||
@ -87,13 +87,13 @@ class JSGeneratorObject : public JSObject {
|
||||
|
||||
class JSAsyncFunctionObject : public JSGeneratorObject {
|
||||
public:
|
||||
DECL_CAST2(JSAsyncFunctionObject)
|
||||
DECL_CAST(JSAsyncFunctionObject)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_VERIFIER(JSAsyncFunctionObject)
|
||||
|
||||
// [promise]: The promise of the async function.
|
||||
DECL_ACCESSORS2(promise, JSPromise)
|
||||
DECL_ACCESSORS(promise, JSPromise)
|
||||
|
||||
// Layout description.
|
||||
#define JS_ASYNC_FUNCTION_FIELDS(V) \
|
||||
@ -110,7 +110,7 @@ class JSAsyncFunctionObject : public JSGeneratorObject {
|
||||
|
||||
class JSAsyncGeneratorObject : public JSGeneratorObject {
|
||||
public:
|
||||
DECL_CAST2(JSAsyncGeneratorObject)
|
||||
DECL_CAST(JSAsyncGeneratorObject)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_VERIFIER(JSAsyncGeneratorObject)
|
||||
@ -118,7 +118,7 @@ class JSAsyncGeneratorObject : public JSGeneratorObject {
|
||||
// [queue]
|
||||
// Pointer to the head of a singly linked list of AsyncGeneratorRequest, or
|
||||
// undefined.
|
||||
DECL_ACCESSORS2(queue, HeapObject)
|
||||
DECL_ACCESSORS(queue, HeapObject)
|
||||
|
||||
// [is_awaiting]
|
||||
// Whether or not the generator is currently awaiting.
|
||||
@ -159,7 +159,7 @@ class AsyncGeneratorRequest : public Struct {
|
||||
ASYNC_GENERATOR_REQUEST_FIELDS)
|
||||
#undef ASYNC_GENERATOR_REQUEST_FIELDS
|
||||
|
||||
DECL_CAST2(AsyncGeneratorRequest)
|
||||
DECL_CAST(AsyncGeneratorRequest)
|
||||
DECL_PRINTER(AsyncGeneratorRequest)
|
||||
DECL_VERIFIER(AsyncGeneratorRequest)
|
||||
|
||||
|
@ -21,9 +21,9 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSListFormat, JSObject)
|
||||
|
||||
// Base list format accessors.
|
||||
ACCESSORS2(JSListFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS2(JSListFormat, icu_formatter, Managed<icu::ListFormatter>,
|
||||
kICUFormatterOffset)
|
||||
ACCESSORS(JSListFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSListFormat, icu_formatter, Managed<icu::ListFormatter>,
|
||||
kICUFormatterOffset)
|
||||
SMI_ACCESSORS(JSListFormat, flags, kFlagsOffset)
|
||||
|
||||
inline void JSListFormat::set_style(Style style) {
|
||||
@ -48,7 +48,7 @@ inline JSListFormat::Type JSListFormat::type() const {
|
||||
return TypeBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSListFormat);
|
||||
CAST_ACCESSOR(JSListFormat);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -54,11 +54,11 @@ class JSListFormat : public JSObject {
|
||||
Handle<String> StyleAsString() const;
|
||||
Handle<String> TypeAsString() const;
|
||||
|
||||
DECL_CAST2(JSListFormat)
|
||||
DECL_CAST(JSListFormat)
|
||||
|
||||
// ListFormat accessors.
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS2(icu_formatter, Managed<icu::ListFormatter>)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
DECL_ACCESSORS(icu_formatter, Managed<icu::ListFormatter>)
|
||||
|
||||
// Style: identifying the relative time format style used.
|
||||
//
|
||||
|
@ -21,9 +21,9 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSLocale, JSObject)
|
||||
|
||||
ACCESSORS2(JSLocale, icu_locale, Managed<icu::Locale>, kICULocaleOffset);
|
||||
ACCESSORS(JSLocale, icu_locale, Managed<icu::Locale>, kICULocaleOffset);
|
||||
|
||||
CAST_ACCESSOR2(JSLocale);
|
||||
CAST_ACCESSOR(JSLocale);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -49,9 +49,9 @@ class JSLocale : public JSObject {
|
||||
Handle<JSLocale> locale);
|
||||
static Handle<String> ToString(Isolate* isolate, Handle<JSLocale> locale);
|
||||
|
||||
DECL_CAST2(JSLocale)
|
||||
DECL_CAST(JSLocale)
|
||||
|
||||
DECL_ACCESSORS2(icu_locale, Managed<icu::Locale>)
|
||||
DECL_ACCESSORS(icu_locale, Managed<icu::Locale>)
|
||||
|
||||
DECL_PRINTER(JSLocale)
|
||||
DECL_VERIFIER(JSLocale)
|
||||
|
@ -20,9 +20,9 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSNumberFormat, JSObject)
|
||||
|
||||
ACCESSORS2(JSNumberFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS2(JSNumberFormat, icu_number_format, Managed<icu::NumberFormat>,
|
||||
kICUNumberFormatOffset)
|
||||
ACCESSORS(JSNumberFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSNumberFormat, icu_number_format, Managed<icu::NumberFormat>,
|
||||
kICUNumberFormatOffset)
|
||||
ACCESSORS(JSNumberFormat, bound_format, Object, kBoundFormatOffset)
|
||||
SMI_ACCESSORS(JSNumberFormat, flags, kFlagsOffset)
|
||||
|
||||
@ -50,7 +50,7 @@ inline JSNumberFormat::CurrencyDisplay JSNumberFormat::currency_display()
|
||||
return CurrencyDisplayBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSNumberFormat);
|
||||
CAST_ACCESSOR(JSNumberFormat);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -66,7 +66,7 @@ class JSNumberFormat : public JSObject {
|
||||
Handle<String> StyleAsString() const;
|
||||
Handle<String> CurrencyDisplayAsString() const;
|
||||
|
||||
DECL_CAST2(JSNumberFormat)
|
||||
DECL_CAST(JSNumberFormat)
|
||||
DECL_PRINTER(JSNumberFormat)
|
||||
DECL_VERIFIER(JSNumberFormat)
|
||||
|
||||
@ -122,8 +122,8 @@ class JSNumberFormat : public JSObject {
|
||||
STATIC_ASSERT(CurrencyDisplay::SYMBOL <= CurrencyDisplayBits::kMax);
|
||||
STATIC_ASSERT(CurrencyDisplay::NAME <= CurrencyDisplayBits::kMax);
|
||||
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS2(icu_number_format, Managed<icu::NumberFormat>)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
DECL_ACCESSORS(icu_number_format, Managed<icu::NumberFormat>)
|
||||
DECL_ACCESSORS(bound_format, Object)
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
|
||||
|
@ -41,18 +41,18 @@ OBJECT_CONSTRUCTORS_IMPL(JSValue, JSObject)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(JSReceiver)
|
||||
|
||||
CAST_ACCESSOR2(JSAsyncFromSyncIterator)
|
||||
CAST_ACCESSOR2(JSBoundFunction)
|
||||
CAST_ACCESSOR2(JSDate)
|
||||
CAST_ACCESSOR2(JSFunction)
|
||||
CAST_ACCESSOR2(JSGlobalObject)
|
||||
CAST_ACCESSOR2(JSGlobalProxy)
|
||||
CAST_ACCESSOR2(JSIteratorResult)
|
||||
CAST_ACCESSOR2(JSMessageObject)
|
||||
CAST_ACCESSOR2(JSObject)
|
||||
CAST_ACCESSOR2(JSReceiver)
|
||||
CAST_ACCESSOR2(JSStringIterator)
|
||||
CAST_ACCESSOR2(JSValue)
|
||||
CAST_ACCESSOR(JSAsyncFromSyncIterator)
|
||||
CAST_ACCESSOR(JSBoundFunction)
|
||||
CAST_ACCESSOR(JSDate)
|
||||
CAST_ACCESSOR(JSFunction)
|
||||
CAST_ACCESSOR(JSGlobalObject)
|
||||
CAST_ACCESSOR(JSGlobalProxy)
|
||||
CAST_ACCESSOR(JSIteratorResult)
|
||||
CAST_ACCESSOR(JSMessageObject)
|
||||
CAST_ACCESSOR(JSObject)
|
||||
CAST_ACCESSOR(JSReceiver)
|
||||
CAST_ACCESSOR(JSStringIterator)
|
||||
CAST_ACCESSOR(JSValue)
|
||||
|
||||
MaybeHandle<Object> JSReceiver::GetProperty(Isolate* isolate,
|
||||
Handle<JSReceiver> receiver,
|
||||
@ -236,13 +236,13 @@ void JSObject::SetMapAndElements(Handle<JSObject> object, Handle<Map> new_map,
|
||||
}
|
||||
|
||||
void JSObject::set_elements(FixedArrayBase value, WriteBarrierMode mode) {
|
||||
WRITE_FIELD(this, kElementsOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, kElementsOffset, value, mode);
|
||||
WRITE_FIELD(*this, kElementsOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, kElementsOffset, value, mode);
|
||||
}
|
||||
|
||||
void JSObject::initialize_elements() {
|
||||
FixedArrayBase elements = map()->GetInitialElements();
|
||||
WRITE_FIELD(this, kElementsOffset, elements);
|
||||
WRITE_FIELD(*this, kElementsOffset, elements);
|
||||
}
|
||||
|
||||
InterceptorInfo JSObject::GetIndexedInterceptor() {
|
||||
@ -349,8 +349,8 @@ uint64_t JSObject::RawFastDoublePropertyAsBitsAt(FieldIndex index) {
|
||||
void JSObject::RawFastPropertyAtPut(FieldIndex index, Object value) {
|
||||
if (index.is_inobject()) {
|
||||
int offset = index.offset();
|
||||
WRITE_FIELD(this, offset, value);
|
||||
WRITE_BARRIER(this, offset, value);
|
||||
WRITE_FIELD(*this, offset, value);
|
||||
WRITE_BARRIER(*this, offset, value);
|
||||
} else {
|
||||
property_array()->set(index.outobject_array_index(), value);
|
||||
}
|
||||
@ -361,7 +361,7 @@ void JSObject::RawFastDoublePropertyAsBitsAtPut(FieldIndex index,
|
||||
// Double unboxing is enabled only on 64-bit platforms without pointer
|
||||
// compression.
|
||||
DCHECK_EQ(kDoubleSize, kTaggedSize);
|
||||
Address field_addr = FIELD_ADDR(this, index.offset());
|
||||
Address field_addr = FIELD_ADDR(*this, index.offset());
|
||||
base::Relaxed_Store(reinterpret_cast<base::AtomicWord*>(field_addr),
|
||||
static_cast<base::AtomicWord>(bits));
|
||||
}
|
||||
@ -416,15 +416,15 @@ int JSObject::GetInObjectPropertyOffset(int index) {
|
||||
|
||||
Object JSObject::InObjectPropertyAt(int index) {
|
||||
int offset = GetInObjectPropertyOffset(index);
|
||||
return READ_FIELD(this, offset);
|
||||
return READ_FIELD(*this, offset);
|
||||
}
|
||||
|
||||
Object JSObject::InObjectPropertyAtPut(int index, Object value,
|
||||
WriteBarrierMode mode) {
|
||||
// Adjust for the number of properties stored in the object.
|
||||
int offset = GetInObjectPropertyOffset(index);
|
||||
WRITE_FIELD(this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, offset, value, mode);
|
||||
WRITE_FIELD(*this, offset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -440,12 +440,12 @@ void JSObject::InitializeBody(Map map, int start_offset,
|
||||
size - (map->UnusedPropertyFields() * kTaggedSize);
|
||||
DCHECK_LE(kHeaderSize, end_of_pre_allocated_offset);
|
||||
while (offset < end_of_pre_allocated_offset) {
|
||||
WRITE_FIELD(this, offset, pre_allocated_value);
|
||||
WRITE_FIELD(*this, offset, pre_allocated_value);
|
||||
offset += kTaggedSize;
|
||||
}
|
||||
}
|
||||
while (offset < size) {
|
||||
WRITE_FIELD(this, offset, filler_value);
|
||||
WRITE_FIELD(*this, offset, filler_value);
|
||||
offset += kTaggedSize;
|
||||
}
|
||||
}
|
||||
@ -454,16 +454,16 @@ Object JSBoundFunction::raw_bound_target_function() const {
|
||||
return READ_FIELD(this, kBoundTargetFunctionOffset);
|
||||
}
|
||||
|
||||
ACCESSORS2(JSBoundFunction, bound_target_function, JSReceiver,
|
||||
kBoundTargetFunctionOffset)
|
||||
ACCESSORS(JSBoundFunction, bound_target_function, JSReceiver,
|
||||
kBoundTargetFunctionOffset)
|
||||
ACCESSORS(JSBoundFunction, bound_this, Object, kBoundThisOffset)
|
||||
ACCESSORS2(JSBoundFunction, bound_arguments, FixedArray, kBoundArgumentsOffset)
|
||||
ACCESSORS(JSBoundFunction, bound_arguments, FixedArray, kBoundArgumentsOffset)
|
||||
|
||||
ACCESSORS2(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
|
||||
ACCESSORS2(JSFunction, raw_feedback_cell, FeedbackCell, kFeedbackCellOffset)
|
||||
ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
|
||||
ACCESSORS(JSFunction, raw_feedback_cell, FeedbackCell, kFeedbackCellOffset)
|
||||
|
||||
ACCESSORS2(JSGlobalObject, native_context, Context, kNativeContextOffset)
|
||||
ACCESSORS2(JSGlobalObject, global_proxy, JSObject, kGlobalProxyOffset)
|
||||
ACCESSORS(JSGlobalObject, native_context, Context, kNativeContextOffset)
|
||||
ACCESSORS(JSGlobalObject, global_proxy, JSObject, kGlobalProxyOffset)
|
||||
|
||||
ACCESSORS(JSGlobalProxy, native_context, Object, kNativeContextOffset)
|
||||
|
||||
@ -542,18 +542,18 @@ AbstractCode JSFunction::abstract_code() {
|
||||
}
|
||||
|
||||
Code JSFunction::code() const {
|
||||
return Code::cast(READ_FIELD(this, kCodeOffset));
|
||||
return Code::cast(READ_FIELD(*this, kCodeOffset));
|
||||
}
|
||||
|
||||
void JSFunction::set_code(Code value) {
|
||||
DCHECK(!Heap::InNewSpace(value));
|
||||
WRITE_FIELD(this, kCodeOffset, value);
|
||||
MarkingBarrier(this, RawField(kCodeOffset), value);
|
||||
WRITE_FIELD(*this, kCodeOffset, value);
|
||||
MarkingBarrier(*this, RawField(kCodeOffset), value);
|
||||
}
|
||||
|
||||
void JSFunction::set_code_no_write_barrier(Code value) {
|
||||
DCHECK(!Heap::InNewSpace(value));
|
||||
WRITE_FIELD(this, kCodeOffset, value);
|
||||
WRITE_FIELD(*this, kCodeOffset, value);
|
||||
}
|
||||
|
||||
void JSFunction::ClearOptimizedCodeSlot(const char* reason) {
|
||||
@ -582,11 +582,11 @@ bool JSFunction::has_feedback_vector() const {
|
||||
}
|
||||
|
||||
Context JSFunction::context() {
|
||||
return Context::cast(READ_FIELD(this, kContextOffset));
|
||||
return Context::cast(READ_FIELD(*this, kContextOffset));
|
||||
}
|
||||
|
||||
bool JSFunction::has_context() const {
|
||||
return READ_FIELD(this, kContextOffset)->IsContext();
|
||||
return READ_FIELD(*this, kContextOffset)->IsContext();
|
||||
}
|
||||
|
||||
JSGlobalProxy JSFunction::global_proxy() { return context()->global_proxy(); }
|
||||
@ -595,8 +595,8 @@ Context JSFunction::native_context() { return context()->native_context(); }
|
||||
|
||||
void JSFunction::set_context(Object value) {
|
||||
DCHECK(value->IsUndefined() || value->IsContext());
|
||||
WRITE_FIELD(this, kContextOffset, value);
|
||||
WRITE_BARRIER(this, kContextOffset, value);
|
||||
WRITE_FIELD(*this, kContextOffset, value);
|
||||
WRITE_BARRIER(*this, kContextOffset, value);
|
||||
}
|
||||
|
||||
ACCESSORS_CHECKED(JSFunction, prototype_or_initial_map, Object,
|
||||
@ -693,7 +693,7 @@ void JSMessageObject::set_type(MessageTemplate value) {
|
||||
WRITE_FIELD(this, kTypeOffset, Smi::FromInt(static_cast<int>(value)));
|
||||
}
|
||||
ACCESSORS(JSMessageObject, argument, Object, kArgumentsOffset)
|
||||
ACCESSORS2(JSMessageObject, script, Script, kScriptOffset)
|
||||
ACCESSORS(JSMessageObject, script, Script, kScriptOffset)
|
||||
ACCESSORS(JSMessageObject, stack_frames, Object, kStackFramesOffset)
|
||||
SMI_ACCESSORS(JSMessageObject, start_position, kStartPositionOffset)
|
||||
SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset)
|
||||
@ -943,11 +943,11 @@ inline int JSGlobalProxy::SizeWithEmbedderFields(int embedder_field_count) {
|
||||
ACCESSORS(JSIteratorResult, value, Object, kValueOffset)
|
||||
ACCESSORS(JSIteratorResult, done, Object, kDoneOffset)
|
||||
|
||||
ACCESSORS2(JSAsyncFromSyncIterator, sync_iterator, JSReceiver,
|
||||
kSyncIteratorOffset)
|
||||
ACCESSORS(JSAsyncFromSyncIterator, sync_iterator, JSReceiver,
|
||||
kSyncIteratorOffset)
|
||||
ACCESSORS(JSAsyncFromSyncIterator, next, Object, kNextOffset)
|
||||
|
||||
ACCESSORS2(JSStringIterator, string, String, kStringOffset)
|
||||
ACCESSORS(JSStringIterator, string, String, kStringOffset)
|
||||
SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset)
|
||||
|
||||
} // namespace internal
|
||||
|
@ -65,7 +65,7 @@ class JSReceiver : public HeapObject {
|
||||
// Deletes an existing named property in a normalized object.
|
||||
static void DeleteNormalizedProperty(Handle<JSReceiver> object, int entry);
|
||||
|
||||
DECL_CAST2(JSReceiver)
|
||||
DECL_CAST(JSReceiver)
|
||||
|
||||
// ES6 section 7.1.1 ToPrimitive
|
||||
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ToPrimitive(
|
||||
@ -308,7 +308,7 @@ class JSObject : public JSReceiver {
|
||||
//
|
||||
// In the slow mode the elements is either a NumberDictionary, a
|
||||
// FixedArray parameter map for a (sloppy) arguments object.
|
||||
DECL_ACCESSORS2(elements, FixedArrayBase)
|
||||
DECL_ACCESSORS(elements, FixedArrayBase)
|
||||
inline void initialize_elements();
|
||||
static inline void SetMapAndElements(Handle<JSObject> object, Handle<Map> map,
|
||||
Handle<FixedArrayBase> elements);
|
||||
@ -666,7 +666,7 @@ class JSObject : public JSReceiver {
|
||||
|
||||
static bool IsExtensible(Handle<JSObject> object);
|
||||
|
||||
DECL_CAST2(JSObject)
|
||||
DECL_CAST(JSObject)
|
||||
|
||||
// Dispatched behavior.
|
||||
void JSObjectShortPrint(StringStream* accumulator);
|
||||
@ -898,7 +898,7 @@ class JSIteratorResult : public JSObject {
|
||||
static const int kValueIndex = 0;
|
||||
static const int kDoneIndex = 1;
|
||||
|
||||
DECL_CAST2(JSIteratorResult)
|
||||
DECL_CAST(JSIteratorResult)
|
||||
|
||||
OBJECT_CONSTRUCTORS(JSIteratorResult, JSObject);
|
||||
};
|
||||
@ -908,7 +908,7 @@ class JSBoundFunction : public JSObject {
|
||||
public:
|
||||
// [bound_target_function]: The wrapped function object.
|
||||
inline Object raw_bound_target_function() const;
|
||||
DECL_ACCESSORS2(bound_target_function, JSReceiver)
|
||||
DECL_ACCESSORS(bound_target_function, JSReceiver)
|
||||
|
||||
// [bound_this]: The value that is always passed as the this value when
|
||||
// calling the wrapped function.
|
||||
@ -916,7 +916,7 @@ class JSBoundFunction : public JSObject {
|
||||
|
||||
// [bound_arguments]: A list of values whose elements are used as the first
|
||||
// arguments to any call to the wrapped function.
|
||||
DECL_ACCESSORS2(bound_arguments, FixedArray)
|
||||
DECL_ACCESSORS(bound_arguments, FixedArray)
|
||||
|
||||
static MaybeHandle<String> GetName(Isolate* isolate,
|
||||
Handle<JSBoundFunction> function);
|
||||
@ -925,7 +925,7 @@ class JSBoundFunction : public JSObject {
|
||||
static MaybeHandle<Context> GetFunctionRealm(
|
||||
Handle<JSBoundFunction> function);
|
||||
|
||||
DECL_CAST2(JSBoundFunction)
|
||||
DECL_CAST(JSBoundFunction)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSBoundFunction)
|
||||
@ -957,7 +957,7 @@ class JSFunction : public JSObject {
|
||||
|
||||
// [shared]: The information about the function that
|
||||
// can be shared by instances.
|
||||
DECL_ACCESSORS2(shared, SharedFunctionInfo)
|
||||
DECL_ACCESSORS(shared, SharedFunctionInfo)
|
||||
|
||||
static const int kLengthDescriptorIndex = 0;
|
||||
static const int kNameDescriptorIndex = 1;
|
||||
@ -1044,7 +1044,7 @@ class JSFunction : public JSObject {
|
||||
/// FeedbackVector eventually. Generally this shouldn't be used to get the
|
||||
// feedback_vector, instead use feedback_vector() which correctly deals with
|
||||
// the JSFunction's bytecode being flushed.
|
||||
DECL_ACCESSORS2(raw_feedback_cell, FeedbackCell)
|
||||
DECL_ACCESSORS(raw_feedback_cell, FeedbackCell)
|
||||
|
||||
// feedback_vector() can be used once the function is compiled.
|
||||
inline FeedbackVector feedback_vector() const;
|
||||
@ -1096,7 +1096,7 @@ class JSFunction : public JSObject {
|
||||
// Prints the name of the function using PrintF.
|
||||
void PrintName(FILE* out = stdout);
|
||||
|
||||
DECL_CAST2(JSFunction)
|
||||
DECL_CAST(JSFunction)
|
||||
|
||||
// Calculate the instance size and in-object properties count.
|
||||
static bool CalculateInstanceSizeForDerivedClass(
|
||||
@ -1171,7 +1171,7 @@ class JSGlobalProxy : public JSObject {
|
||||
// It is null value if this object is not used by any context.
|
||||
DECL_ACCESSORS(native_context, Object)
|
||||
|
||||
DECL_CAST2(JSGlobalProxy)
|
||||
DECL_CAST(JSGlobalProxy)
|
||||
|
||||
inline bool IsDetachedFrom(JSGlobalObject global) const;
|
||||
|
||||
@ -1197,10 +1197,10 @@ class JSGlobalProxy : public JSObject {
|
||||
class JSGlobalObject : public JSObject {
|
||||
public:
|
||||
// [native context]: the natives corresponding to this global object.
|
||||
DECL_ACCESSORS2(native_context, Context)
|
||||
DECL_ACCESSORS(native_context, Context)
|
||||
|
||||
// [global proxy]: the global proxy object of the context
|
||||
DECL_ACCESSORS2(global_proxy, JSObject)
|
||||
DECL_ACCESSORS(global_proxy, JSObject)
|
||||
|
||||
// Gets global object properties.
|
||||
inline GlobalDictionary global_dictionary();
|
||||
@ -1213,7 +1213,7 @@ class JSGlobalObject : public JSObject {
|
||||
Handle<JSGlobalObject> global, Handle<Name> name,
|
||||
PropertyCellType cell_type, int* entry_out = nullptr);
|
||||
|
||||
DECL_CAST2(JSGlobalObject)
|
||||
DECL_CAST(JSGlobalObject)
|
||||
|
||||
inline bool IsDetached();
|
||||
|
||||
@ -1241,7 +1241,7 @@ class JSValue : public JSObject {
|
||||
// [value]: the object being wrapped.
|
||||
DECL_ACCESSORS(value, Object)
|
||||
|
||||
DECL_CAST2(JSValue)
|
||||
DECL_CAST(JSValue)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSValue)
|
||||
@ -1288,7 +1288,7 @@ class JSDate : public JSObject {
|
||||
// moment when chached fields were cached.
|
||||
DECL_ACCESSORS(cache_stamp, Object)
|
||||
|
||||
DECL_CAST2(JSDate)
|
||||
DECL_CAST(JSDate)
|
||||
|
||||
// Returns the time value (UTC) identifying the current time.
|
||||
static double CurrentTimeValue(Isolate* isolate);
|
||||
@ -1383,7 +1383,7 @@ class JSMessageObject : public JSObject {
|
||||
DECL_ACCESSORS(argument, Object)
|
||||
|
||||
// [script]: the script from which the error message originated.
|
||||
DECL_ACCESSORS2(script, Script)
|
||||
DECL_ACCESSORS(script, Script)
|
||||
|
||||
// [stack_frames]: an array of stack frames for this error object.
|
||||
DECL_ACCESSORS(stack_frames, Object)
|
||||
@ -1410,7 +1410,7 @@ class JSMessageObject : public JSObject {
|
||||
inline int error_level() const;
|
||||
inline void set_error_level(int level);
|
||||
|
||||
DECL_CAST2(JSMessageObject)
|
||||
DECL_CAST(JSMessageObject)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSMessageObject)
|
||||
@ -1449,7 +1449,7 @@ class JSMessageObject : public JSObject {
|
||||
// (See https://tc39.github.io/proposal-async-iteration/#sec-iteration)
|
||||
class JSAsyncFromSyncIterator : public JSObject {
|
||||
public:
|
||||
DECL_CAST2(JSAsyncFromSyncIterator)
|
||||
DECL_CAST(JSAsyncFromSyncIterator)
|
||||
DECL_PRINTER(JSAsyncFromSyncIterator)
|
||||
DECL_VERIFIER(JSAsyncFromSyncIterator)
|
||||
|
||||
@ -1458,7 +1458,7 @@ class JSAsyncFromSyncIterator : public JSObject {
|
||||
// Async-from-Sync Iterator instances are initially created with the internal
|
||||
// slots listed in Table 4.
|
||||
// (proposal-async-iteration/#table-async-from-sync-iterator-internal-slots)
|
||||
DECL_ACCESSORS2(sync_iterator, JSReceiver)
|
||||
DECL_ACCESSORS(sync_iterator, JSReceiver)
|
||||
|
||||
// The "next" method is loaded during GetIterator, and is not reloaded for
|
||||
// subsequent "next" invocations.
|
||||
@ -1484,10 +1484,10 @@ class JSStringIterator : public JSObject {
|
||||
DECL_PRINTER(JSStringIterator)
|
||||
DECL_VERIFIER(JSStringIterator)
|
||||
|
||||
DECL_CAST2(JSStringIterator)
|
||||
DECL_CAST(JSStringIterator)
|
||||
|
||||
// [string]: the [[IteratedString]] inobject property.
|
||||
DECL_ACCESSORS2(string, String)
|
||||
DECL_ACCESSORS(string, String)
|
||||
|
||||
// [index]: The [[StringIteratorNextIndex]] inobject property.
|
||||
inline int index() const;
|
||||
|
@ -21,12 +21,12 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSPluralRules, JSObject)
|
||||
|
||||
ACCESSORS2(JSPluralRules, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSPluralRules, locale, String, kLocaleOffset)
|
||||
SMI_ACCESSORS(JSPluralRules, flags, kFlagsOffset)
|
||||
ACCESSORS2(JSPluralRules, icu_plural_rules, Managed<icu::PluralRules>,
|
||||
kICUPluralRulesOffset)
|
||||
ACCESSORS2(JSPluralRules, icu_decimal_format, Managed<icu::DecimalFormat>,
|
||||
kICUDecimalFormatOffset)
|
||||
ACCESSORS(JSPluralRules, icu_plural_rules, Managed<icu::PluralRules>,
|
||||
kICUPluralRulesOffset)
|
||||
ACCESSORS(JSPluralRules, icu_decimal_format, Managed<icu::DecimalFormat>,
|
||||
kICUDecimalFormatOffset)
|
||||
|
||||
inline void JSPluralRules::set_type(Type type) {
|
||||
DCHECK_LT(type, Type::COUNT);
|
||||
@ -39,7 +39,7 @@ inline JSPluralRules::Type JSPluralRules::type() const {
|
||||
return TypeBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSPluralRules);
|
||||
CAST_ACCESSOR(JSPluralRules);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -55,7 +55,7 @@ class JSPluralRules : public JSObject {
|
||||
|
||||
Handle<String> TypeAsString() const;
|
||||
|
||||
DECL_CAST2(JSPluralRules)
|
||||
DECL_CAST(JSPluralRules)
|
||||
DECL_PRINTER(JSPluralRules)
|
||||
DECL_VERIFIER(JSPluralRules)
|
||||
|
||||
@ -80,10 +80,10 @@ class JSPluralRules : public JSObject {
|
||||
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_PLURAL_RULES_FIELDS)
|
||||
#undef JS_PLURAL_RULES_FIELDS
|
||||
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
DECL_ACCESSORS2(icu_plural_rules, Managed<icu::PluralRules>)
|
||||
DECL_ACCESSORS2(icu_decimal_format, Managed<icu::DecimalFormat>)
|
||||
DECL_ACCESSORS(icu_plural_rules, Managed<icu::PluralRules>)
|
||||
DECL_ACCESSORS(icu_decimal_format, Managed<icu::DecimalFormat>)
|
||||
|
||||
OBJECT_CONSTRUCTORS(JSPluralRules, JSObject);
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSPromise, JSObject)
|
||||
CAST_ACCESSOR2(JSPromise)
|
||||
CAST_ACCESSOR(JSPromise)
|
||||
|
||||
ACCESSORS(JSPromise, reactions_or_result, Object, kReactionsOrResultOffset)
|
||||
SMI_ACCESSORS(JSPromise, flags, kFlagsOffset)
|
||||
|
@ -62,7 +62,7 @@ class JSPromise : public JSObject {
|
||||
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> Resolve(
|
||||
Handle<JSPromise> promise, Handle<Object> resolution);
|
||||
|
||||
DECL_CAST2(JSPromise)
|
||||
DECL_CAST(JSPromise)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSPromise)
|
||||
|
@ -17,7 +17,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSProxy, JSReceiver)
|
||||
|
||||
CAST_ACCESSOR2(JSProxy)
|
||||
CAST_ACCESSOR(JSProxy)
|
||||
|
||||
ACCESSORS(JSProxy, target, Object, kTargetOffset)
|
||||
ACCESSORS(JSProxy, handler, Object, kHandlerOffset)
|
||||
|
@ -27,7 +27,7 @@ class JSProxy : public JSReceiver {
|
||||
|
||||
static MaybeHandle<Context> GetFunctionRealm(Handle<JSProxy> proxy);
|
||||
|
||||
DECL_CAST2(JSProxy)
|
||||
DECL_CAST(JSProxy)
|
||||
|
||||
V8_INLINE bool IsRevoked() const;
|
||||
static void Revoke(Handle<JSProxy> proxy);
|
||||
|
@ -19,7 +19,7 @@ namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSRegExp, JSObject)
|
||||
|
||||
CAST_ACCESSOR2(JSRegExp)
|
||||
CAST_ACCESSOR(JSRegExp)
|
||||
|
||||
ACCESSORS(JSRegExp, data, Object, kDataOffset)
|
||||
ACCESSORS(JSRegExp, flags, Object, kFlagsOffset)
|
||||
|
@ -19,15 +19,15 @@ OBJECT_CONSTRUCTORS_IMPL(JSRegExpStringIterator, JSObject)
|
||||
|
||||
ACCESSORS(JSRegExpStringIterator, iterating_regexp, Object,
|
||||
kIteratingRegExpOffset)
|
||||
ACCESSORS2(JSRegExpStringIterator, iterating_string, String,
|
||||
kIteratedStringOffset)
|
||||
ACCESSORS(JSRegExpStringIterator, iterating_string, String,
|
||||
kIteratedStringOffset)
|
||||
|
||||
SMI_ACCESSORS(JSRegExpStringIterator, flags, kFlagsOffset)
|
||||
BOOL_ACCESSORS(JSRegExpStringIterator, flags, done, kDoneBit)
|
||||
BOOL_ACCESSORS(JSRegExpStringIterator, flags, global, kGlobalBit)
|
||||
BOOL_ACCESSORS(JSRegExpStringIterator, flags, unicode, kUnicodeBit)
|
||||
|
||||
CAST_ACCESSOR2(JSRegExpStringIterator)
|
||||
CAST_ACCESSOR(JSRegExpStringIterator)
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -19,7 +19,7 @@ class JSRegExpStringIterator : public JSObject {
|
||||
DECL_ACCESSORS(iterating_regexp, Object)
|
||||
|
||||
// [string]: The [[IteratedString]] internal property.
|
||||
DECL_ACCESSORS2(iterating_string, String)
|
||||
DECL_ACCESSORS(iterating_string, String)
|
||||
|
||||
DECL_INT_ACCESSORS(flags)
|
||||
|
||||
@ -32,7 +32,7 @@ class JSRegExpStringIterator : public JSObject {
|
||||
// [boolean]: The [[Unicode]] internal property.
|
||||
DECL_BOOLEAN_ACCESSORS(unicode)
|
||||
|
||||
DECL_CAST2(JSRegExpStringIterator)
|
||||
DECL_CAST(JSRegExpStringIterator)
|
||||
DECL_PRINTER(JSRegExpStringIterator)
|
||||
DECL_VERIFIER(JSRegExpStringIterator)
|
||||
|
||||
|
@ -116,7 +116,7 @@ class JSRegExp : public JSObject {
|
||||
inline bool HasCompiledCode() const;
|
||||
inline void DiscardCompiledCodeForSerialization();
|
||||
|
||||
DECL_CAST2(JSRegExp)
|
||||
DECL_CAST(JSRegExp)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(JSRegExp)
|
||||
|
@ -21,9 +21,9 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSRelativeTimeFormat, JSObject)
|
||||
|
||||
// Base relative time format accessors.
|
||||
ACCESSORS2(JSRelativeTimeFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS2(JSRelativeTimeFormat, icu_formatter,
|
||||
Managed<icu::RelativeDateTimeFormatter>, kICUFormatterOffset)
|
||||
ACCESSORS(JSRelativeTimeFormat, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSRelativeTimeFormat, icu_formatter,
|
||||
Managed<icu::RelativeDateTimeFormatter>, kICUFormatterOffset)
|
||||
SMI_ACCESSORS(JSRelativeTimeFormat, flags, kFlagsOffset)
|
||||
|
||||
inline void JSRelativeTimeFormat::set_style(Style style) {
|
||||
@ -48,7 +48,7 @@ inline JSRelativeTimeFormat::Numeric JSRelativeTimeFormat::numeric() const {
|
||||
return NumericBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSRelativeTimeFormat);
|
||||
CAST_ACCESSOR(JSRelativeTimeFormat);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -52,12 +52,12 @@ class JSRelativeTimeFormat : public JSObject {
|
||||
|
||||
static std::set<std::string> GetAvailableLocales();
|
||||
|
||||
DECL_CAST2(JSRelativeTimeFormat)
|
||||
DECL_CAST(JSRelativeTimeFormat)
|
||||
|
||||
// RelativeTimeFormat accessors.
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
|
||||
DECL_ACCESSORS2(icu_formatter, Managed<icu::RelativeDateTimeFormatter>)
|
||||
DECL_ACCESSORS(icu_formatter, Managed<icu::RelativeDateTimeFormatter>)
|
||||
|
||||
// Style: identifying the relative time format style used.
|
||||
//
|
||||
|
@ -21,17 +21,17 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSSegmentIterator, JSObject)
|
||||
|
||||
// Base segment iterator accessors.
|
||||
ACCESSORS2(JSSegmentIterator, icu_break_iterator, Managed<icu::BreakIterator>,
|
||||
kICUBreakIteratorOffset)
|
||||
ACCESSORS2(JSSegmentIterator, unicode_string, Managed<icu::UnicodeString>,
|
||||
kUnicodeStringOffset)
|
||||
ACCESSORS(JSSegmentIterator, icu_break_iterator, Managed<icu::BreakIterator>,
|
||||
kICUBreakIteratorOffset)
|
||||
ACCESSORS(JSSegmentIterator, unicode_string, Managed<icu::UnicodeString>,
|
||||
kUnicodeStringOffset)
|
||||
|
||||
BIT_FIELD_ACCESSORS(JSSegmentIterator, flags, is_break_type_set,
|
||||
JSSegmentIterator::BreakTypeSetBits)
|
||||
|
||||
SMI_ACCESSORS(JSSegmentIterator, flags, kFlagsOffset)
|
||||
|
||||
CAST_ACCESSOR2(JSSegmentIterator);
|
||||
CAST_ACCESSOR(JSSegmentIterator);
|
||||
|
||||
inline void JSSegmentIterator::set_granularity(
|
||||
JSSegmenter::Granularity granularity) {
|
||||
|
@ -63,11 +63,11 @@ class JSSegmentIterator : public JSObject {
|
||||
int32_t start,
|
||||
int32_t end) const;
|
||||
|
||||
DECL_CAST2(JSSegmentIterator)
|
||||
DECL_CAST(JSSegmentIterator)
|
||||
|
||||
// SegmentIterator accessors.
|
||||
DECL_ACCESSORS2(icu_break_iterator, Managed<icu::BreakIterator>)
|
||||
DECL_ACCESSORS2(unicode_string, Managed<icu::UnicodeString>)
|
||||
DECL_ACCESSORS(icu_break_iterator, Managed<icu::BreakIterator>)
|
||||
DECL_ACCESSORS(unicode_string, Managed<icu::UnicodeString>)
|
||||
|
||||
DECL_PRINTER(JSSegmentIterator)
|
||||
DECL_VERIFIER(JSSegmentIterator)
|
||||
|
@ -21,9 +21,9 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSSegmenter, JSObject)
|
||||
|
||||
// Base segmenter accessors.
|
||||
ACCESSORS2(JSSegmenter, locale, String, kLocaleOffset)
|
||||
ACCESSORS2(JSSegmenter, icu_break_iterator, Managed<icu::BreakIterator>,
|
||||
kICUBreakIteratorOffset)
|
||||
ACCESSORS(JSSegmenter, locale, String, kLocaleOffset)
|
||||
ACCESSORS(JSSegmenter, icu_break_iterator, Managed<icu::BreakIterator>,
|
||||
kICUBreakIteratorOffset)
|
||||
SMI_ACCESSORS(JSSegmenter, flags, kFlagsOffset)
|
||||
|
||||
inline void JSSegmenter::set_line_break_style(LineBreakStyle line_break_style) {
|
||||
@ -48,7 +48,7 @@ inline JSSegmenter::Granularity JSSegmenter::granularity() const {
|
||||
return GranularityBits::decode(flags());
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSSegmenter);
|
||||
CAST_ACCESSOR(JSSegmenter);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -45,12 +45,12 @@ class JSSegmenter : public JSObject {
|
||||
const char* LineBreakStyleAsCString() const;
|
||||
Handle<String> GranularityAsString() const;
|
||||
|
||||
DECL_CAST2(JSSegmenter)
|
||||
DECL_CAST(JSSegmenter)
|
||||
|
||||
// Segmenter accessors.
|
||||
DECL_ACCESSORS2(locale, String)
|
||||
DECL_ACCESSORS(locale, String)
|
||||
|
||||
DECL_ACCESSORS2(icu_break_iterator, Managed<icu::BreakIterator>)
|
||||
DECL_ACCESSORS(icu_break_iterator, Managed<icu::BreakIterator>)
|
||||
|
||||
// LineBreakStyle: identifying the style used for line break.
|
||||
//
|
||||
|
@ -24,29 +24,29 @@ OBJECT_CONSTRUCTORS_IMPL(JSWeakFactory, JSObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(JSWeakFactoryCleanupIterator, JSObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(WeakFactoryCleanupJobTask, Microtask)
|
||||
|
||||
ACCESSORS2(JSWeakFactory, native_context, NativeContext, kNativeContextOffset)
|
||||
ACCESSORS(JSWeakFactory, native_context, NativeContext, kNativeContextOffset)
|
||||
ACCESSORS(JSWeakFactory, cleanup, Object, kCleanupOffset)
|
||||
ACCESSORS(JSWeakFactory, active_cells, Object, kActiveCellsOffset)
|
||||
ACCESSORS(JSWeakFactory, cleared_cells, Object, kClearedCellsOffset)
|
||||
SMI_ACCESSORS(JSWeakFactory, flags, kFlagsOffset)
|
||||
ACCESSORS(JSWeakFactory, next, Object, kNextOffset)
|
||||
CAST_ACCESSOR2(JSWeakFactory)
|
||||
CAST_ACCESSOR(JSWeakFactory)
|
||||
|
||||
ACCESSORS(JSWeakCell, factory, Object, kFactoryOffset)
|
||||
ACCESSORS(JSWeakCell, target, Object, kTargetOffset)
|
||||
ACCESSORS(JSWeakCell, holdings, Object, kHoldingsOffset)
|
||||
ACCESSORS(JSWeakCell, next, Object, kNextOffset)
|
||||
ACCESSORS(JSWeakCell, prev, Object, kPrevOffset)
|
||||
CAST_ACCESSOR2(JSWeakCell)
|
||||
CAST_ACCESSOR(JSWeakCell)
|
||||
|
||||
CAST_ACCESSOR2(JSWeakRef)
|
||||
CAST_ACCESSOR(JSWeakRef)
|
||||
ACCESSORS(JSWeakRef, target, Object, kTargetOffset)
|
||||
|
||||
ACCESSORS2(JSWeakFactoryCleanupIterator, factory, JSWeakFactory, kFactoryOffset)
|
||||
CAST_ACCESSOR2(JSWeakFactoryCleanupIterator)
|
||||
ACCESSORS(JSWeakFactoryCleanupIterator, factory, JSWeakFactory, kFactoryOffset)
|
||||
CAST_ACCESSOR(JSWeakFactoryCleanupIterator)
|
||||
|
||||
ACCESSORS2(WeakFactoryCleanupJobTask, factory, JSWeakFactory, kFactoryOffset)
|
||||
CAST_ACCESSOR2(WeakFactoryCleanupJobTask)
|
||||
ACCESSORS(WeakFactoryCleanupJobTask, factory, JSWeakFactory, kFactoryOffset)
|
||||
CAST_ACCESSOR(WeakFactoryCleanupJobTask)
|
||||
|
||||
void JSWeakFactory::AddWeakCell(JSWeakCell weak_cell) {
|
||||
weak_cell->set_factory(*this);
|
||||
|
@ -23,9 +23,9 @@ class JSWeakFactory : public JSObject {
|
||||
public:
|
||||
DECL_PRINTER(JSWeakFactory)
|
||||
DECL_VERIFIER(JSWeakFactory)
|
||||
DECL_CAST2(JSWeakFactory)
|
||||
DECL_CAST(JSWeakFactory)
|
||||
|
||||
DECL_ACCESSORS2(native_context, NativeContext)
|
||||
DECL_ACCESSORS(native_context, NativeContext)
|
||||
DECL_ACCESSORS(cleanup, Object)
|
||||
DECL_ACCESSORS(active_cells, Object)
|
||||
DECL_ACCESSORS(cleared_cells, Object)
|
||||
@ -77,7 +77,7 @@ class JSWeakCell : public JSObject {
|
||||
public:
|
||||
DECL_PRINTER(JSWeakCell)
|
||||
DECL_VERIFIER(JSWeakCell)
|
||||
DECL_CAST2(JSWeakCell)
|
||||
DECL_CAST(JSWeakCell)
|
||||
|
||||
DECL_ACCESSORS(factory, Object)
|
||||
DECL_ACCESSORS(target, Object)
|
||||
@ -120,7 +120,7 @@ class JSWeakRef : public JSObject {
|
||||
public:
|
||||
DECL_PRINTER(JSWeakRef)
|
||||
DECL_VERIFIER(JSWeakRef)
|
||||
DECL_CAST2(JSWeakRef)
|
||||
DECL_CAST(JSWeakRef)
|
||||
|
||||
DECL_ACCESSORS(target, Object)
|
||||
|
||||
@ -134,9 +134,9 @@ class JSWeakRef : public JSObject {
|
||||
|
||||
class WeakFactoryCleanupJobTask : public Microtask {
|
||||
public:
|
||||
DECL_ACCESSORS2(factory, JSWeakFactory)
|
||||
DECL_ACCESSORS(factory, JSWeakFactory)
|
||||
|
||||
DECL_CAST2(WeakFactoryCleanupJobTask)
|
||||
DECL_CAST(WeakFactoryCleanupJobTask)
|
||||
DECL_VERIFIER(WeakFactoryCleanupJobTask)
|
||||
DECL_PRINTER(WeakFactoryCleanupJobTask)
|
||||
|
||||
@ -157,9 +157,9 @@ class JSWeakFactoryCleanupIterator : public JSObject {
|
||||
public:
|
||||
DECL_PRINTER(JSWeakFactoryCleanupIterator)
|
||||
DECL_VERIFIER(JSWeakFactoryCleanupIterator)
|
||||
DECL_CAST2(JSWeakFactoryCleanupIterator)
|
||||
DECL_CAST(JSWeakFactoryCleanupIterator)
|
||||
|
||||
DECL_ACCESSORS2(factory, JSWeakFactory)
|
||||
DECL_ACCESSORS(factory, JSWeakFactory)
|
||||
|
||||
// Layout description.
|
||||
#define JS_WEAK_FACTORY_CLEANUP_ITERATOR_FIELDS(V) \
|
||||
|
@ -21,7 +21,7 @@ SMI_ACCESSORS(ObjectBoilerplateDescription, flags,
|
||||
FixedArray::OffsetOfElementAt(kLiteralTypeOffset));
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(ClassBoilerplate, FixedArray)
|
||||
CAST_ACCESSOR2(ClassBoilerplate)
|
||||
CAST_ACCESSOR(ClassBoilerplate)
|
||||
|
||||
BIT_FIELD_ACCESSORS(ClassBoilerplate, flags, install_class_name_accessor,
|
||||
ClassBoilerplate::Flags::InstallClassNameAccessorBit)
|
||||
@ -38,8 +38,8 @@ ACCESSORS(ClassBoilerplate, static_properties_template, Object,
|
||||
ACCESSORS(ClassBoilerplate, static_elements_template, Object,
|
||||
FixedArray::OffsetOfElementAt(kClassElementsTemplateIndex));
|
||||
|
||||
ACCESSORS2(ClassBoilerplate, static_computed_properties, FixedArray,
|
||||
FixedArray::OffsetOfElementAt(kClassComputedPropertiesIndex));
|
||||
ACCESSORS(ClassBoilerplate, static_computed_properties, FixedArray,
|
||||
FixedArray::OffsetOfElementAt(kClassComputedPropertiesIndex));
|
||||
|
||||
ACCESSORS(ClassBoilerplate, instance_properties_template, Object,
|
||||
FixedArray::OffsetOfElementAt(kPrototypePropertiesTemplateIndex));
|
||||
@ -47,17 +47,17 @@ ACCESSORS(ClassBoilerplate, instance_properties_template, Object,
|
||||
ACCESSORS(ClassBoilerplate, instance_elements_template, Object,
|
||||
FixedArray::OffsetOfElementAt(kPrototypeElementsTemplateIndex));
|
||||
|
||||
ACCESSORS2(ClassBoilerplate, instance_computed_properties, FixedArray,
|
||||
FixedArray::OffsetOfElementAt(kPrototypeComputedPropertiesIndex));
|
||||
ACCESSORS(ClassBoilerplate, instance_computed_properties, FixedArray,
|
||||
FixedArray::OffsetOfElementAt(kPrototypeComputedPropertiesIndex));
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(ArrayBoilerplateDescription, Struct)
|
||||
|
||||
CAST_ACCESSOR2(ArrayBoilerplateDescription)
|
||||
CAST_ACCESSOR(ArrayBoilerplateDescription)
|
||||
|
||||
SMI_ACCESSORS(ArrayBoilerplateDescription, flags, kFlagsOffset);
|
||||
|
||||
ACCESSORS2(ArrayBoilerplateDescription, constant_elements, FixedArrayBase,
|
||||
kConstantElementsOffset);
|
||||
ACCESSORS(ArrayBoilerplateDescription, constant_elements, FixedArrayBase,
|
||||
kConstantElementsOffset);
|
||||
|
||||
ElementsKind ArrayBoilerplateDescription::elements_kind() const {
|
||||
return static_cast<ElementsKind>(flags());
|
||||
|
@ -42,7 +42,7 @@ class ObjectBoilerplateDescription : public FixedArray {
|
||||
static const int kLiteralTypeOffset = 0;
|
||||
static const int kDescriptionStartIndex = 1;
|
||||
|
||||
DECL_CAST2(ObjectBoilerplateDescription)
|
||||
DECL_CAST(ObjectBoilerplateDescription)
|
||||
DECL_VERIFIER(ObjectBoilerplateDescription)
|
||||
DECL_PRINTER(ObjectBoilerplateDescription)
|
||||
|
||||
@ -55,14 +55,14 @@ class ObjectBoilerplateDescription : public FixedArray {
|
||||
class ArrayBoilerplateDescription : public Struct {
|
||||
public:
|
||||
// store constant_elements of a fixed array
|
||||
DECL_ACCESSORS2(constant_elements, FixedArrayBase)
|
||||
DECL_ACCESSORS(constant_elements, FixedArrayBase)
|
||||
|
||||
inline ElementsKind elements_kind() const;
|
||||
inline void set_elements_kind(ElementsKind kind);
|
||||
|
||||
inline bool is_empty() const;
|
||||
|
||||
DECL_CAST2(ArrayBoilerplateDescription)
|
||||
DECL_CAST(ArrayBoilerplateDescription)
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(ArrayBoilerplateDescription)
|
||||
DECL_VERIFIER(ArrayBoilerplateDescription)
|
||||
@ -115,16 +115,16 @@ class ClassBoilerplate : public FixedArray {
|
||||
static const int kMinimumClassPropertiesCount = 6;
|
||||
static const int kMinimumPrototypePropertiesCount = 1;
|
||||
|
||||
DECL_CAST2(ClassBoilerplate)
|
||||
DECL_CAST(ClassBoilerplate)
|
||||
|
||||
DECL_BOOLEAN_ACCESSORS(install_class_name_accessor)
|
||||
DECL_INT_ACCESSORS(arguments_count)
|
||||
DECL_ACCESSORS(static_properties_template, Object)
|
||||
DECL_ACCESSORS(static_elements_template, Object)
|
||||
DECL_ACCESSORS2(static_computed_properties, FixedArray)
|
||||
DECL_ACCESSORS(static_computed_properties, FixedArray)
|
||||
DECL_ACCESSORS(instance_properties_template, Object)
|
||||
DECL_ACCESSORS(instance_elements_template, Object)
|
||||
DECL_ACCESSORS2(instance_computed_properties, FixedArray)
|
||||
DECL_ACCESSORS(instance_computed_properties, FixedArray)
|
||||
|
||||
static void AddToPropertiesTemplate(Isolate* isolate,
|
||||
Handle<NameDictionary> dictionary,
|
||||
|
@ -28,20 +28,20 @@ namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(Map, HeapObject)
|
||||
CAST_ACCESSOR2(Map)
|
||||
CAST_ACCESSOR(Map)
|
||||
|
||||
DescriptorArray Map::instance_descriptors() const {
|
||||
return DescriptorArray::cast(READ_FIELD(this, kDescriptorsOffset));
|
||||
return DescriptorArray::cast(READ_FIELD(*this, kDescriptorsOffset));
|
||||
}
|
||||
|
||||
DescriptorArray Map::synchronized_instance_descriptors() const {
|
||||
return DescriptorArray::cast(ACQUIRE_READ_FIELD(this, kDescriptorsOffset));
|
||||
return DescriptorArray::cast(ACQUIRE_READ_FIELD(*this, kDescriptorsOffset));
|
||||
}
|
||||
|
||||
void Map::set_synchronized_instance_descriptors(DescriptorArray value,
|
||||
WriteBarrierMode mode) {
|
||||
RELEASE_WRITE_FIELD(this, kDescriptorsOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, kDescriptorsOffset, value, mode);
|
||||
RELEASE_WRITE_FIELD(*this, kDescriptorsOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, kDescriptorsOffset, value, mode);
|
||||
}
|
||||
|
||||
// A freshly allocated layout descriptor can be set on an existing map.
|
||||
@ -569,8 +569,8 @@ Object Map::prototype() const { return READ_FIELD(this, kPrototypeOffset); }
|
||||
|
||||
void Map::set_prototype(Object value, WriteBarrierMode mode) {
|
||||
DCHECK(value->IsNull() || value->IsJSReceiver());
|
||||
WRITE_FIELD(this, kPrototypeOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, kPrototypeOffset, value, mode);
|
||||
WRITE_FIELD(*this, kPrototypeOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, kPrototypeOffset, value, mode);
|
||||
}
|
||||
|
||||
LayoutDescriptor Map::layout_descriptor_gc_safe() const {
|
||||
@ -578,7 +578,7 @@ LayoutDescriptor Map::layout_descriptor_gc_safe() const {
|
||||
// The loaded value can be dereferenced on background thread to load the
|
||||
// bitmap. We need acquire load in order to ensure that the bitmap
|
||||
// initializing stores are also visible to the background thread.
|
||||
Object layout_desc = ACQUIRE_READ_FIELD(this, kLayoutDescriptorOffset);
|
||||
Object layout_desc = ACQUIRE_READ_FIELD(*this, kLayoutDescriptorOffset);
|
||||
return LayoutDescriptor::cast_gc_safe(layout_desc);
|
||||
}
|
||||
|
||||
@ -586,7 +586,7 @@ bool Map::HasFastPointerLayout() const {
|
||||
DCHECK(FLAG_unbox_double_fields);
|
||||
// The loaded value is used for SMI check only and is not dereferenced,
|
||||
// so relaxed load is safe.
|
||||
Object layout_desc = RELAXED_READ_FIELD(this, kLayoutDescriptorOffset);
|
||||
Object layout_desc = RELAXED_READ_FIELD(*this, kLayoutDescriptorOffset);
|
||||
return LayoutDescriptor::IsFastPointerLayout(layout_desc);
|
||||
}
|
||||
|
||||
@ -699,9 +699,9 @@ Object Map::prototype_info() const {
|
||||
|
||||
void Map::set_prototype_info(Object value, WriteBarrierMode mode) {
|
||||
CHECK(is_prototype_map());
|
||||
WRITE_FIELD(this, Map::kTransitionsOrPrototypeInfoOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(this, Map::kTransitionsOrPrototypeInfoOffset, value,
|
||||
mode);
|
||||
WRITE_FIELD(*this, Map::kTransitionsOrPrototypeInfoOffset, value);
|
||||
CONDITIONAL_WRITE_BARRIER(*this, Map::kTransitionsOrPrototypeInfoOffset,
|
||||
value, mode);
|
||||
}
|
||||
|
||||
void Map::SetBackPointer(Object value, WriteBarrierMode mode) {
|
||||
@ -713,7 +713,7 @@ void Map::SetBackPointer(Object value, WriteBarrierMode mode) {
|
||||
set_constructor_or_backpointer(value, mode);
|
||||
}
|
||||
|
||||
ACCESSORS2(Map, dependent_code, DependentCode, kDependentCodeOffset)
|
||||
ACCESSORS(Map, dependent_code, DependentCode, kDependentCodeOffset)
|
||||
ACCESSORS(Map, prototype_validity_cell, Object, kPrototypeValidityCellOffset)
|
||||
ACCESSORS(Map, constructor_or_backpointer, Object,
|
||||
kConstructorOrBackPointerOffset)
|
||||
|
@ -423,7 +423,7 @@ class Map : public HeapObject {
|
||||
// [raw_transitions]: Provides access to the transitions storage field.
|
||||
// Don't call set_raw_transitions() directly to overwrite transitions, use
|
||||
// the TransitionArray::ReplaceTransitions() wrapper instead!
|
||||
DECL_ACCESSORS2(raw_transitions, MaybeObject)
|
||||
DECL_ACCESSORS(raw_transitions, MaybeObject)
|
||||
// [prototype_info]: Per-prototype metadata. Aliased with transitions
|
||||
// (which prototype maps don't have).
|
||||
DECL_ACCESSORS(prototype_info, Object)
|
||||
@ -580,7 +580,7 @@ class Map : public HeapObject {
|
||||
int number_of_own_descriptors);
|
||||
|
||||
// [layout descriptor]: describes the object layout.
|
||||
DECL_ACCESSORS2(layout_descriptor, LayoutDescriptor)
|
||||
DECL_ACCESSORS(layout_descriptor, LayoutDescriptor)
|
||||
// |layout descriptor| accessor which can be used from GC.
|
||||
inline LayoutDescriptor layout_descriptor_gc_safe() const;
|
||||
inline bool HasFastPointerLayout() const;
|
||||
@ -598,7 +598,7 @@ class Map : public HeapObject {
|
||||
LayoutDescriptor layout_descriptor);
|
||||
|
||||
// [dependent code]: list of optimized codes that weakly embed this map.
|
||||
DECL_ACCESSORS2(dependent_code, DependentCode)
|
||||
DECL_ACCESSORS(dependent_code, DependentCode)
|
||||
|
||||
// [prototype_validity_cell]: Cell containing the validity bit for prototype
|
||||
// chains or Smi(0) if uninitialized.
|
||||
@ -756,7 +756,7 @@ class Map : public HeapObject {
|
||||
// Returns the number of enumerable properties.
|
||||
int NumberOfEnumerableProperties() const;
|
||||
|
||||
DECL_CAST2(Map)
|
||||
DECL_CAST(Map)
|
||||
|
||||
static inline int SlackForArraySize(int old_size, int size_limit);
|
||||
|
||||
@ -995,7 +995,7 @@ class NormalizedMapCache : public WeakFixedArray {
|
||||
PropertyNormalizationMode mode);
|
||||
void Set(Handle<Map> fast_map, Handle<Map> normalized_map);
|
||||
|
||||
DECL_CAST2(NormalizedMapCache)
|
||||
DECL_CAST(NormalizedMapCache)
|
||||
|
||||
static inline bool IsNormalizedMapCache(const HeapObject obj);
|
||||
|
||||
|
@ -20,15 +20,15 @@ OBJECT_CONSTRUCTORS_IMPL(Microtask, Struct)
|
||||
OBJECT_CONSTRUCTORS_IMPL(CallbackTask, Microtask)
|
||||
OBJECT_CONSTRUCTORS_IMPL(CallableTask, Microtask)
|
||||
|
||||
CAST_ACCESSOR2(Microtask)
|
||||
CAST_ACCESSOR2(CallbackTask)
|
||||
CAST_ACCESSOR2(CallableTask)
|
||||
CAST_ACCESSOR(Microtask)
|
||||
CAST_ACCESSOR(CallbackTask)
|
||||
CAST_ACCESSOR(CallableTask)
|
||||
|
||||
ACCESSORS2(CallableTask, callable, JSReceiver, kCallableOffset)
|
||||
ACCESSORS2(CallableTask, context, Context, kContextOffset)
|
||||
ACCESSORS(CallableTask, callable, JSReceiver, kCallableOffset)
|
||||
ACCESSORS(CallableTask, context, Context, kContextOffset)
|
||||
|
||||
ACCESSORS2(CallbackTask, callback, Foreign, kCallbackOffset)
|
||||
ACCESSORS2(CallbackTask, data, Foreign, kDataOffset)
|
||||
ACCESSORS(CallbackTask, callback, Foreign, kCallbackOffset)
|
||||
ACCESSORS(CallbackTask, data, Foreign, kDataOffset)
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
@ -20,7 +20,7 @@ namespace internal {
|
||||
class Microtask : public Struct {
|
||||
public:
|
||||
// Dispatched behavior.
|
||||
DECL_CAST2(Microtask)
|
||||
DECL_CAST(Microtask)
|
||||
DECL_VERIFIER(Microtask)
|
||||
|
||||
OBJECT_CONSTRUCTORS(Microtask, Struct);
|
||||
@ -31,8 +31,8 @@ class Microtask : public Struct {
|
||||
// used by Blink for example.
|
||||
class CallbackTask : public Microtask {
|
||||
public:
|
||||
DECL_ACCESSORS2(callback, Foreign)
|
||||
DECL_ACCESSORS2(data, Foreign)
|
||||
DECL_ACCESSORS(callback, Foreign)
|
||||
DECL_ACCESSORS(data, Foreign)
|
||||
|
||||
// Layout description.
|
||||
#define CALLBACK_TASK_FIELDS(V) \
|
||||
@ -45,7 +45,7 @@ class CallbackTask : public Microtask {
|
||||
#undef CALLBACK_TASK_FIELDS
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_CAST2(CallbackTask)
|
||||
DECL_CAST(CallbackTask)
|
||||
DECL_PRINTER(CallbackTask)
|
||||
DECL_VERIFIER(CallbackTask)
|
||||
|
||||
@ -57,8 +57,8 @@ class CallbackTask : public Microtask {
|
||||
// for various tests of the microtask queue.
|
||||
class CallableTask : public Microtask {
|
||||
public:
|
||||
DECL_ACCESSORS2(callable, JSReceiver)
|
||||
DECL_ACCESSORS2(context, Context)
|
||||
DECL_ACCESSORS(callable, JSReceiver)
|
||||
DECL_ACCESSORS(context, Context)
|
||||
|
||||
// Layout description.
|
||||
#define CALLABLE_TASK_FIELDS(V) \
|
||||
@ -71,7 +71,7 @@ class CallableTask : public Microtask {
|
||||
#undef CALLABLE_TASK_FIELDS
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_CAST2(CallableTask)
|
||||
DECL_CAST(CallableTask)
|
||||
DECL_PRINTER(CallableTask)
|
||||
DECL_VERIFIER(CallableTask)
|
||||
void BriefPrintDetails(std::ostream& os);
|
||||
|
@ -22,14 +22,14 @@ OBJECT_CONSTRUCTORS_IMPL(JSModuleNamespace, JSObject)
|
||||
|
||||
NEVER_READ_ONLY_SPACE_IMPL(Module)
|
||||
|
||||
CAST_ACCESSOR2(Module)
|
||||
CAST_ACCESSOR(Module)
|
||||
ACCESSORS(Module, code, Object, kCodeOffset)
|
||||
ACCESSORS2(Module, exports, ObjectHashTable, kExportsOffset)
|
||||
ACCESSORS2(Module, regular_exports, FixedArray, kRegularExportsOffset)
|
||||
ACCESSORS2(Module, regular_imports, FixedArray, kRegularImportsOffset)
|
||||
ACCESSORS2(Module, module_namespace, HeapObject, kModuleNamespaceOffset)
|
||||
ACCESSORS2(Module, requested_modules, FixedArray, kRequestedModulesOffset)
|
||||
ACCESSORS2(Module, script, Script, kScriptOffset)
|
||||
ACCESSORS(Module, exports, ObjectHashTable, kExportsOffset)
|
||||
ACCESSORS(Module, regular_exports, FixedArray, kRegularExportsOffset)
|
||||
ACCESSORS(Module, regular_imports, FixedArray, kRegularImportsOffset)
|
||||
ACCESSORS(Module, module_namespace, HeapObject, kModuleNamespaceOffset)
|
||||
ACCESSORS(Module, requested_modules, FixedArray, kRequestedModulesOffset)
|
||||
ACCESSORS(Module, script, Script, kScriptOffset)
|
||||
ACCESSORS(Module, exception, Object, kExceptionOffset)
|
||||
ACCESSORS(Module, import_meta, Object, kImportMetaOffset)
|
||||
SMI_ACCESSORS(Module, status, kStatusOffset)
|
||||
@ -43,10 +43,10 @@ ModuleInfo Module::info() const {
|
||||
: GetSharedFunctionInfo()->scope_info()->ModuleDescriptorInfo();
|
||||
}
|
||||
|
||||
CAST_ACCESSOR2(JSModuleNamespace)
|
||||
ACCESSORS2(JSModuleNamespace, module, Module, kModuleOffset)
|
||||
CAST_ACCESSOR(JSModuleNamespace)
|
||||
ACCESSORS(JSModuleNamespace, module, Module, kModuleOffset)
|
||||
|
||||
CAST_ACCESSOR2(ModuleInfoEntry)
|
||||
CAST_ACCESSOR(ModuleInfoEntry)
|
||||
ACCESSORS(ModuleInfoEntry, export_name, Object, kExportNameOffset)
|
||||
ACCESSORS(ModuleInfoEntry, local_name, Object, kLocalNameOffset)
|
||||
ACCESSORS(ModuleInfoEntry, import_name, Object, kImportNameOffset)
|
||||
@ -56,7 +56,7 @@ SMI_ACCESSORS(ModuleInfoEntry, beg_pos, kBegPosOffset)
|
||||
SMI_ACCESSORS(ModuleInfoEntry, end_pos, kEndPosOffset)
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(ModuleInfo, FixedArray)
|
||||
CAST_ACCESSOR2(ModuleInfo)
|
||||
CAST_ACCESSOR(ModuleInfo)
|
||||
|
||||
FixedArray ModuleInfo::module_requests() const {
|
||||
return FixedArray::cast(get(kModuleRequestsIndex));
|
||||
|
@ -30,7 +30,7 @@ class Zone;
|
||||
class Module : public Struct {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
DECL_CAST2(Module)
|
||||
DECL_CAST(Module)
|
||||
DECL_VERIFIER(Module)
|
||||
DECL_PRINTER(Module)
|
||||
|
||||
@ -44,12 +44,12 @@ class Module : public Struct {
|
||||
// A cell's position in the array is determined by the cell index of the
|
||||
// associated module entry (which coincides with the variable index of the
|
||||
// associated variable).
|
||||
DECL_ACCESSORS2(regular_exports, FixedArray)
|
||||
DECL_ACCESSORS2(regular_imports, FixedArray)
|
||||
DECL_ACCESSORS(regular_exports, FixedArray)
|
||||
DECL_ACCESSORS(regular_imports, FixedArray)
|
||||
|
||||
// The complete export table, mapping an export name to its cell.
|
||||
// TODO(neis): We may want to remove the regular exports from the table.
|
||||
DECL_ACCESSORS2(exports, ObjectHashTable)
|
||||
DECL_ACCESSORS(exports, ObjectHashTable)
|
||||
|
||||
// Hash for this object (a random non-zero Smi).
|
||||
DECL_INT_ACCESSORS(hash)
|
||||
@ -75,15 +75,15 @@ class Module : public Struct {
|
||||
SharedFunctionInfo GetSharedFunctionInfo() const;
|
||||
|
||||
// The namespace object (or undefined).
|
||||
DECL_ACCESSORS2(module_namespace, HeapObject)
|
||||
DECL_ACCESSORS(module_namespace, HeapObject)
|
||||
|
||||
// Modules imported or re-exported by this module.
|
||||
// Corresponds 1-to-1 to the module specifier strings in
|
||||
// ModuleInfo::module_requests.
|
||||
DECL_ACCESSORS2(requested_modules, FixedArray)
|
||||
DECL_ACCESSORS(requested_modules, FixedArray)
|
||||
|
||||
// [script]: Script from which the module originates.
|
||||
DECL_ACCESSORS2(script, Script)
|
||||
DECL_ACCESSORS(script, Script)
|
||||
|
||||
// The value of import.meta inside of this module.
|
||||
// Lazily initialized on first access. It's the hole before first access and
|
||||
@ -225,12 +225,12 @@ class Module : public Struct {
|
||||
// the declared variable (foo). A module can have at most one namespace object.
|
||||
class JSModuleNamespace : public JSObject {
|
||||
public:
|
||||
DECL_CAST2(JSModuleNamespace)
|
||||
DECL_CAST(JSModuleNamespace)
|
||||
DECL_PRINTER(JSModuleNamespace)
|
||||
DECL_VERIFIER(JSModuleNamespace)
|
||||
|
||||
// The actual module whose namespace is being represented.
|
||||
DECL_ACCESSORS2(module, Module)
|
||||
DECL_ACCESSORS(module, Module)
|
||||
|
||||
// Retrieve the value exported by [module] under the given [name]. If there is
|
||||
// no such export, return Just(undefined). If the export is uninitialized,
|
||||
@ -269,7 +269,7 @@ class JSModuleNamespace : public JSObject {
|
||||
// ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope.
|
||||
class ModuleInfo : public FixedArray {
|
||||
public:
|
||||
DECL_CAST2(ModuleInfo)
|
||||
DECL_CAST(ModuleInfo)
|
||||
|
||||
static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone,
|
||||
ModuleDescriptor* descr);
|
||||
@ -314,7 +314,7 @@ class ModuleInfo : public FixedArray {
|
||||
|
||||
class ModuleInfoEntry : public Struct {
|
||||
public:
|
||||
DECL_CAST2(ModuleInfoEntry)
|
||||
DECL_CAST(ModuleInfoEntry)
|
||||
DECL_PRINTER(ModuleInfoEntry)
|
||||
DECL_VERIFIER(ModuleInfoEntry)
|
||||
|
||||
|
@ -20,8 +20,8 @@ namespace internal {
|
||||
OBJECT_CONSTRUCTORS_IMPL(Name, HeapObject)
|
||||
OBJECT_CONSTRUCTORS_IMPL(Symbol, Name)
|
||||
|
||||
CAST_ACCESSOR2(Name)
|
||||
CAST_ACCESSOR2(Symbol)
|
||||
CAST_ACCESSOR(Name)
|
||||
CAST_ACCESSOR(Symbol)
|
||||
|
||||
ACCESSORS(Symbol, name, Object, kNameOffset)
|
||||
INT_ACCESSORS(Symbol, flags, kFlagsOffset)
|
||||
@ -92,7 +92,7 @@ uint32_t Name::Hash() {
|
||||
// Also the string must be writable, because read-only strings will have their
|
||||
// hash values precomputed.
|
||||
return String::cast(*this)->ComputeAndSetHash(
|
||||
Heap::FromWritableHeapObject(this)->isolate());
|
||||
Heap::FromWritableHeapObject(*this)->isolate());
|
||||
}
|
||||
|
||||
bool Name::IsInterestingSymbol() const {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user