[cleanup][torque] Use @generateCppClass in some simple cases, part 3
Just mechanical conversion to remove boilerplate code. When .tq and .h files didn't agree on what a field is named, I used the name from the .h file. In a couple of cases the generated accessor became slightly more specific (HeapObject instead of Object), and I had to update the code that uses those accessors accordingly. Change-Id: Ie3af1590e3889887b167c9d045b07860b01f7d15 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776479 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#64142}
This commit is contained in:
parent
0cbbb88dfa
commit
07fc96c0a8
@ -678,10 +678,11 @@ extern class EmbedderDataArray extends HeapObject {
|
|||||||
|
|
||||||
type ScopeInfo extends HeapObject generates 'TNode<ScopeInfo>';
|
type ScopeInfo extends HeapObject generates 'TNode<ScopeInfo>';
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class PreparseData extends HeapObject {
|
extern class PreparseData extends HeapObject {
|
||||||
// TODO(v8:8983): Add declaration for variable-sized region.
|
// TODO(v8:8983): Add declaration for variable-sized region.
|
||||||
data_length: int32;
|
data_length: int32;
|
||||||
inner_length: int32;
|
children_length: int32;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern class InterpreterData extends Struct {
|
extern class InterpreterData extends Struct {
|
||||||
@ -873,9 +874,12 @@ extern class JSAsyncFromSyncIterator extends JSObject {
|
|||||||
next: Object;
|
next: Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class JSStringIterator extends JSObject {
|
extern class JSStringIterator extends JSObject {
|
||||||
|
// The [[IteratedString]] inobject property.
|
||||||
string: String;
|
string: String;
|
||||||
next_index: Smi;
|
// The [[StringIteratorNextIndex]] inobject property.
|
||||||
|
index: Smi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@abstract
|
@abstract
|
||||||
@ -1532,6 +1536,7 @@ extern class AccessorInfo extends Struct {
|
|||||||
data: Object;
|
data: Object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class AccessorPair extends Struct {
|
extern class AccessorPair extends Struct {
|
||||||
getter: Object;
|
getter: Object;
|
||||||
setter: Object;
|
setter: Object;
|
||||||
@ -1541,12 +1546,19 @@ extern class BreakPoint extends Tuple2 {}
|
|||||||
extern class BreakPointInfo extends Tuple2 {}
|
extern class BreakPointInfo extends Tuple2 {}
|
||||||
type CoverageInfo extends FixedArray;
|
type CoverageInfo extends FixedArray;
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class DebugInfo extends Struct {
|
extern class DebugInfo extends Struct {
|
||||||
shared_function_info: SharedFunctionInfo;
|
shared: SharedFunctionInfo;
|
||||||
debugger_hints: Smi;
|
debugger_hints: Smi;
|
||||||
|
// Script field from shared function info.
|
||||||
script: Undefined | Script;
|
script: Undefined | Script;
|
||||||
|
// The original uninstrumented bytecode array for functions with break
|
||||||
|
// points - the instrumented bytecode is held in the shared function info.
|
||||||
original_bytecode_array: Undefined | BytecodeArray;
|
original_bytecode_array: Undefined | BytecodeArray;
|
||||||
|
// The debug instrumented bytecode array for functions with break points
|
||||||
|
// - also pointed to by the shared function info.
|
||||||
debug_bytecode_array: Undefined | BytecodeArray;
|
debug_bytecode_array: Undefined | BytecodeArray;
|
||||||
|
// Fixed array holding status information for each active break point.
|
||||||
break_points: FixedArray;
|
break_points: FixedArray;
|
||||||
flags: Smi;
|
flags: Smi;
|
||||||
coverage_info: CoverageInfo | Undefined;
|
coverage_info: CoverageInfo | Undefined;
|
||||||
@ -1566,6 +1578,7 @@ extern class FeedbackVector extends HeapObject {
|
|||||||
padding: uint32;
|
padding: uint32;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class FeedbackCell extends Struct {
|
extern class FeedbackCell extends Struct {
|
||||||
value: Undefined | FeedbackVector | FixedArray;
|
value: Undefined | FeedbackVector | FixedArray;
|
||||||
interrupt_budget: int32;
|
interrupt_budget: int32;
|
||||||
@ -1629,22 +1642,35 @@ extern class JSFinalizationGroup extends JSObject {
|
|||||||
flags: Smi;
|
flags: Smi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class JSFinalizationGroupCleanupIterator extends JSObject {
|
extern class JSFinalizationGroupCleanupIterator extends JSObject {
|
||||||
finalization_group: JSFinalizationGroup;
|
finalization_group: JSFinalizationGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@generateCppClass
|
||||||
extern class WeakCell extends HeapObject {
|
extern class WeakCell extends HeapObject {
|
||||||
finalization_group: Undefined | JSFinalizationGroup;
|
finalization_group: Undefined | JSFinalizationGroup;
|
||||||
target: Undefined | JSReceiver;
|
target: Undefined | JSReceiver;
|
||||||
holdings: Object;
|
holdings: Object;
|
||||||
|
|
||||||
|
// For storing doubly linked lists of WeakCells in JSFinalizationGroup's
|
||||||
|
// "active_cells" and "cleared_cells" lists.
|
||||||
prev: Undefined | WeakCell;
|
prev: Undefined | WeakCell;
|
||||||
next: Undefined | WeakCell;
|
next: Undefined | WeakCell;
|
||||||
|
|
||||||
|
// For storing doubly linked lists of WeakCells per key in
|
||||||
|
// JSFinalizationGroup's key-based hashmap. WeakCell also needs to know its
|
||||||
|
// key, so that we can remove the key from the key_map when we remove the last
|
||||||
|
// WeakCell associated with it.
|
||||||
key: Object;
|
key: Object;
|
||||||
key_list_prev: Undefined | WeakCell;
|
key_list_prev: Undefined | WeakCell;
|
||||||
key_list_next: Undefined | WeakCell;
|
key_list_next: Undefined | WeakCell;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern class JSWeakRef extends JSObject { target: Undefined | JSReceiver; }
|
@generateCppClass
|
||||||
|
extern class JSWeakRef extends JSObject {
|
||||||
|
target: Undefined | JSReceiver;
|
||||||
|
}
|
||||||
|
|
||||||
extern class BytecodeArray extends FixedArrayBase {
|
extern class BytecodeArray extends FixedArrayBase {
|
||||||
// TODO(v8:8983): bytecode array object sizes vary based on their contents.
|
// TODO(v8:8983): bytecode array object sizes vary based on their contents.
|
||||||
|
@ -11,7 +11,7 @@ namespace string_iterator {
|
|||||||
properties_or_hash: kEmptyFixedArray,
|
properties_or_hash: kEmptyFixedArray,
|
||||||
elements: kEmptyFixedArray,
|
elements: kEmptyFixedArray,
|
||||||
string: string,
|
string: string,
|
||||||
next_index: nextIndex
|
index: nextIndex
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ namespace string_iterator {
|
|||||||
kIncompatibleMethodReceiver, 'String Iterator.prototype.next',
|
kIncompatibleMethodReceiver, 'String Iterator.prototype.next',
|
||||||
receiver);
|
receiver);
|
||||||
const string = iterator.string;
|
const string = iterator.string;
|
||||||
const position: intptr = SmiUntag(iterator.next_index);
|
const position: intptr = SmiUntag(iterator.index);
|
||||||
const length: intptr = string.length_intptr;
|
const length: intptr = string.length_intptr;
|
||||||
if (position >= length) {
|
if (position >= length) {
|
||||||
return AllocateJSIteratorResult(Undefined, True);
|
return AllocateJSIteratorResult(Undefined, True);
|
||||||
@ -40,7 +40,7 @@ namespace string_iterator {
|
|||||||
const encoding = UTF16;
|
const encoding = UTF16;
|
||||||
const ch = string::LoadSurrogatePairAt(string, length, position, encoding);
|
const ch = string::LoadSurrogatePairAt(string, length, position, encoding);
|
||||||
const value: String = string::StringFromSingleUTF16EncodedCodePoint(ch);
|
const value: String = string::StringFromSingleUTF16EncodedCodePoint(ch);
|
||||||
iterator.next_index = SmiTag(position + value.length_intptr);
|
iterator.index = SmiTag(position + value.length_intptr);
|
||||||
return AllocateJSIteratorResult(value, False);
|
return AllocateJSIteratorResult(value, False);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -800,7 +800,7 @@ FieldAccess AccessBuilder::ForJSStringIteratorString() {
|
|||||||
// static
|
// static
|
||||||
FieldAccess AccessBuilder::ForJSStringIteratorIndex() {
|
FieldAccess AccessBuilder::ForJSStringIteratorIndex() {
|
||||||
FieldAccess access = {kTaggedBase,
|
FieldAccess access = {kTaggedBase,
|
||||||
JSStringIterator::kNextIndexOffset,
|
JSStringIterator::kIndexOffset,
|
||||||
Handle<Name>(),
|
Handle<Name>(),
|
||||||
MaybeHandle<Map>(),
|
MaybeHandle<Map>(),
|
||||||
TypeCache::Get()->kStringLengthType,
|
TypeCache::Get()->kStringLengthType,
|
||||||
|
@ -1171,7 +1171,7 @@ void Debug::PrepareFunctionForDebugExecution(
|
|||||||
if (debug_info->flags() & DebugInfo::kPreparedForDebugExecution) return;
|
if (debug_info->flags() & DebugInfo::kPreparedForDebugExecution) return;
|
||||||
|
|
||||||
// Make a copy of the bytecode array if available.
|
// Make a copy of the bytecode array if available.
|
||||||
Handle<Object> maybe_original_bytecode_array =
|
Handle<HeapObject> maybe_original_bytecode_array =
|
||||||
isolate_->factory()->undefined_value();
|
isolate_->factory()->undefined_value();
|
||||||
if (shared->HasBytecodeArray()) {
|
if (shared->HasBytecodeArray()) {
|
||||||
Handle<BytecodeArray> original_bytecode_array =
|
Handle<BytecodeArray> original_bytecode_array =
|
||||||
|
@ -513,8 +513,6 @@ void BytecodeArray::BytecodeArrayVerify(Isolate* isolate) {
|
|||||||
|
|
||||||
USE_TORQUE_VERIFIER(FreeSpace)
|
USE_TORQUE_VERIFIER(FreeSpace)
|
||||||
|
|
||||||
USE_TORQUE_VERIFIER(FeedbackCell)
|
|
||||||
|
|
||||||
void FeedbackVector::FeedbackVectorVerify(Isolate* isolate) {
|
void FeedbackVector::FeedbackVectorVerify(Isolate* isolate) {
|
||||||
TorqueGeneratedClassVerifiers::FeedbackVectorVerify(*this, isolate);
|
TorqueGeneratedClassVerifiers::FeedbackVectorVerify(*this, isolate);
|
||||||
MaybeObject code = optimized_code_weak_or_smi();
|
MaybeObject code = optimized_code_weak_or_smi();
|
||||||
@ -1688,8 +1686,6 @@ void StoreHandler::StoreHandlerVerify(Isolate* isolate) {
|
|||||||
|
|
||||||
USE_TORQUE_VERIFIER(AccessorInfo)
|
USE_TORQUE_VERIFIER(AccessorInfo)
|
||||||
|
|
||||||
USE_TORQUE_VERIFIER(AccessorPair)
|
|
||||||
|
|
||||||
void CallHandlerInfo::CallHandlerInfoVerify(Isolate* isolate) {
|
void CallHandlerInfo::CallHandlerInfoVerify(Isolate* isolate) {
|
||||||
TorqueGeneratedClassVerifiers::CallHandlerInfoVerify(*this, isolate);
|
TorqueGeneratedClassVerifiers::CallHandlerInfoVerify(*this, isolate);
|
||||||
CHECK(map() == ReadOnlyRoots(isolate).side_effect_call_handler_info_map() ||
|
CHECK(map() == ReadOnlyRoots(isolate).side_effect_call_handler_info_map() ||
|
||||||
@ -1742,8 +1738,6 @@ void NormalizedMapCache::NormalizedMapCacheVerify(Isolate* isolate) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
USE_TORQUE_VERIFIER(DebugInfo)
|
|
||||||
|
|
||||||
USE_TORQUE_VERIFIER(StackFrameInfo)
|
USE_TORQUE_VERIFIER(StackFrameInfo)
|
||||||
|
|
||||||
void PreparseData::PreparseDataVerify(Isolate* isolate) {
|
void PreparseData::PreparseDataVerify(Isolate* isolate) {
|
||||||
|
@ -21,24 +21,16 @@ namespace internal {
|
|||||||
OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
|
OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
|
OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
|
OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(DebugInfo)
|
||||||
|
|
||||||
NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
|
NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
|
||||||
|
|
||||||
CAST_ACCESSOR(BreakPointInfo)
|
CAST_ACCESSOR(BreakPointInfo)
|
||||||
CAST_ACCESSOR(DebugInfo)
|
|
||||||
CAST_ACCESSOR(CoverageInfo)
|
CAST_ACCESSOR(CoverageInfo)
|
||||||
CAST_ACCESSOR(BreakPoint)
|
CAST_ACCESSOR(BreakPoint)
|
||||||
|
|
||||||
SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
|
TQ_SMI_ACCESSORS(DebugInfo, flags)
|
||||||
ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
|
TQ_SMI_ACCESSORS(DebugInfo, debugger_hints)
|
||||||
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)
|
|
||||||
ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsOffset)
|
|
||||||
ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
|
|
||||||
|
|
||||||
BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
|
BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
|
||||||
DebugInfo::SideEffectStateBits)
|
DebugInfo::SideEffectStateBits)
|
||||||
|
@ -22,7 +22,7 @@ class BytecodeArray;
|
|||||||
|
|
||||||
// The DebugInfo class holds additional information for a function being
|
// The DebugInfo class holds additional information for a function being
|
||||||
// debugged.
|
// debugged.
|
||||||
class DebugInfo : public Struct {
|
class DebugInfo : public TorqueGeneratedDebugInfo<DebugInfo, Struct> {
|
||||||
public:
|
public:
|
||||||
NEVER_READ_ONLY_SPACE
|
NEVER_READ_ONLY_SPACE
|
||||||
enum Flag {
|
enum Flag {
|
||||||
@ -40,15 +40,9 @@ class DebugInfo : public Struct {
|
|||||||
// A bitfield that lists uses of the current instance.
|
// A bitfield that lists uses of the current instance.
|
||||||
DECL_INT_ACCESSORS(flags)
|
DECL_INT_ACCESSORS(flags)
|
||||||
|
|
||||||
// The shared function info for the source being debugged.
|
|
||||||
DECL_ACCESSORS(shared, SharedFunctionInfo)
|
|
||||||
|
|
||||||
// Bit field containing various information collected for debugging.
|
// Bit field containing various information collected for debugging.
|
||||||
DECL_INT_ACCESSORS(debugger_hints)
|
DECL_INT_ACCESSORS(debugger_hints)
|
||||||
|
|
||||||
// Script field from shared function info.
|
|
||||||
DECL_ACCESSORS(script, Object)
|
|
||||||
|
|
||||||
// DebugInfo can be detached from the SharedFunctionInfo iff it is empty.
|
// DebugInfo can be detached from the SharedFunctionInfo iff it is empty.
|
||||||
bool IsEmpty() const;
|
bool IsEmpty() const;
|
||||||
|
|
||||||
@ -85,17 +79,6 @@ class DebugInfo : public Struct {
|
|||||||
void ClearBreakAtEntry();
|
void ClearBreakAtEntry();
|
||||||
bool BreakAtEntry() const;
|
bool BreakAtEntry() const;
|
||||||
|
|
||||||
// The original uninstrumented bytecode array for functions with break
|
|
||||||
// points - the instrumented bytecode is held in the shared function info.
|
|
||||||
DECL_ACCESSORS(original_bytecode_array, Object)
|
|
||||||
|
|
||||||
// The debug instrumented bytecode array for functions with break points
|
|
||||||
// - also pointed to by the shared function info.
|
|
||||||
DECL_ACCESSORS(debug_bytecode_array, Object)
|
|
||||||
|
|
||||||
// Fixed array holding status information for each active break point.
|
|
||||||
DECL_ACCESSORS(break_points, FixedArray)
|
|
||||||
|
|
||||||
// Check if there is a break point at a source position.
|
// Check if there is a break point at a source position.
|
||||||
bool HasBreakPoint(Isolate* isolate, int source_position);
|
bool HasBreakPoint(Isolate* isolate, int source_position);
|
||||||
// Attempt to clear a break point. Return true if successful.
|
// Attempt to clear a break point. Return true if successful.
|
||||||
@ -162,17 +145,9 @@ class DebugInfo : public Struct {
|
|||||||
|
|
||||||
// Clears all fields related to block coverage.
|
// Clears all fields related to block coverage.
|
||||||
void ClearCoverageInfo(Isolate* isolate);
|
void ClearCoverageInfo(Isolate* isolate);
|
||||||
DECL_ACCESSORS(coverage_info, Object)
|
|
||||||
|
|
||||||
DECL_CAST(DebugInfo)
|
|
||||||
|
|
||||||
// Dispatched behavior.
|
// Dispatched behavior.
|
||||||
DECL_PRINTER(DebugInfo)
|
DECL_PRINTER(DebugInfo)
|
||||||
DECL_VERIFIER(DebugInfo)
|
|
||||||
|
|
||||||
// Layout description.
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_DEBUG_INFO_FIELDS)
|
|
||||||
|
|
||||||
static const int kEstimatedNofBreakPointsInFunction = 4;
|
static const int kEstimatedNofBreakPointsInFunction = 4;
|
||||||
|
|
||||||
@ -180,7 +155,7 @@ class DebugInfo : public Struct {
|
|||||||
// Get the break point info object for a source position.
|
// Get the break point info object for a source position.
|
||||||
Object GetBreakPointInfo(Isolate* isolate, int source_position);
|
Object GetBreakPointInfo(Isolate* isolate, int source_position);
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(DebugInfo, Struct);
|
TQ_OBJECT_CONSTRUCTORS(DebugInfo)
|
||||||
};
|
};
|
||||||
|
|
||||||
// The BreakPointInfo class holds information for break points set in a
|
// The BreakPointInfo class holds information for break points set in a
|
||||||
|
@ -17,12 +17,7 @@
|
|||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS_IMPL(FeedbackCell, Struct)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(FeedbackCell)
|
||||||
|
|
||||||
CAST_ACCESSOR(FeedbackCell)
|
|
||||||
|
|
||||||
ACCESSORS(FeedbackCell, value, HeapObject, kValueOffset)
|
|
||||||
INT32_ACCESSORS(FeedbackCell, interrupt_budget, kInterruptBudgetOffset)
|
|
||||||
|
|
||||||
void FeedbackCell::clear_padding() {
|
void FeedbackCell::clear_padding() {
|
||||||
if (FeedbackCell::kAlignedSize == FeedbackCell::kUnalignedSize) return;
|
if (FeedbackCell::kAlignedSize == FeedbackCell::kUnalignedSize) return;
|
||||||
|
@ -18,7 +18,7 @@ namespace internal {
|
|||||||
// number of closures created for a certain function per native
|
// number of closures created for a certain function per native
|
||||||
// context. There's at most one FeedbackCell for each function in
|
// context. There's at most one FeedbackCell for each function in
|
||||||
// a native context.
|
// a native context.
|
||||||
class FeedbackCell : public Struct {
|
class FeedbackCell : public TorqueGeneratedFeedbackCell<FeedbackCell, Struct> {
|
||||||
public:
|
public:
|
||||||
static int GetInitialInterruptBudget() {
|
static int GetInitialInterruptBudget() {
|
||||||
if (FLAG_lazy_feedback_allocation) {
|
if (FLAG_lazy_feedback_allocation) {
|
||||||
@ -27,19 +27,8 @@ class FeedbackCell : public Struct {
|
|||||||
return FLAG_interrupt_budget;
|
return FLAG_interrupt_budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
// [value]: value of the cell.
|
|
||||||
DECL_ACCESSORS(value, HeapObject)
|
|
||||||
DECL_INT32_ACCESSORS(interrupt_budget)
|
|
||||||
|
|
||||||
DECL_CAST(FeedbackCell)
|
|
||||||
|
|
||||||
// Dispatched behavior.
|
// Dispatched behavior.
|
||||||
DECL_PRINTER(FeedbackCell)
|
DECL_PRINTER(FeedbackCell)
|
||||||
DECL_VERIFIER(FeedbackCell)
|
|
||||||
|
|
||||||
// Layout description.
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_FEEDBACK_CELL_FIELDS)
|
|
||||||
|
|
||||||
static const int kUnalignedSize = kSize;
|
static const int kUnalignedSize = kSize;
|
||||||
static const int kAlignedSize = RoundUp<kObjectAlignment>(int{kSize});
|
static const int kAlignedSize = RoundUp<kObjectAlignment>(int{kSize});
|
||||||
@ -50,7 +39,7 @@ class FeedbackCell : public Struct {
|
|||||||
using BodyDescriptor =
|
using BodyDescriptor =
|
||||||
FixedBodyDescriptor<kValueOffset, kInterruptBudgetOffset, kAlignedSize>;
|
FixedBodyDescriptor<kValueOffset, kInterruptBudgetOffset, kAlignedSize>;
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(FeedbackCell, Struct);
|
TQ_OBJECT_CONSTRUCTORS(FeedbackCell)
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -40,7 +40,7 @@ TQ_OBJECT_CONSTRUCTORS_IMPL(JSGlobalProxy)
|
|||||||
JSIteratorResult::JSIteratorResult(Address ptr) : JSObject(ptr) {}
|
JSIteratorResult::JSIteratorResult(Address ptr) : JSObject(ptr) {}
|
||||||
OBJECT_CONSTRUCTORS_IMPL(JSMessageObject, JSObject)
|
OBJECT_CONSTRUCTORS_IMPL(JSMessageObject, JSObject)
|
||||||
TQ_OBJECT_CONSTRUCTORS_IMPL(JSPrimitiveWrapper)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(JSPrimitiveWrapper)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(JSStringIterator, JSObject)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(JSStringIterator)
|
||||||
|
|
||||||
NEVER_READ_ONLY_SPACE_IMPL(JSReceiver)
|
NEVER_READ_ONLY_SPACE_IMPL(JSReceiver)
|
||||||
|
|
||||||
@ -49,7 +49,6 @@ CAST_ACCESSOR(JSGlobalObject)
|
|||||||
CAST_ACCESSOR(JSIteratorResult)
|
CAST_ACCESSOR(JSIteratorResult)
|
||||||
CAST_ACCESSOR(JSMessageObject)
|
CAST_ACCESSOR(JSMessageObject)
|
||||||
CAST_ACCESSOR(JSReceiver)
|
CAST_ACCESSOR(JSReceiver)
|
||||||
CAST_ACCESSOR(JSStringIterator)
|
|
||||||
|
|
||||||
MaybeHandle<Object> JSReceiver::GetProperty(Isolate* isolate,
|
MaybeHandle<Object> JSReceiver::GetProperty(Isolate* isolate,
|
||||||
Handle<JSReceiver> receiver,
|
Handle<JSReceiver> receiver,
|
||||||
@ -1009,8 +1008,7 @@ inline int JSGlobalProxy::SizeWithEmbedderFields(int embedder_field_count) {
|
|||||||
ACCESSORS(JSIteratorResult, value, Object, kValueOffset)
|
ACCESSORS(JSIteratorResult, value, Object, kValueOffset)
|
||||||
ACCESSORS(JSIteratorResult, done, Object, kDoneOffset)
|
ACCESSORS(JSIteratorResult, done, Object, kDoneOffset)
|
||||||
|
|
||||||
ACCESSORS(JSStringIterator, string, String, kStringOffset)
|
TQ_SMI_ACCESSORS(JSStringIterator, index)
|
||||||
SMI_ACCESSORS(JSStringIterator, index, kNextIndexOffset)
|
|
||||||
|
|
||||||
// If the fast-case backing storage takes up much more memory than a dictionary
|
// If the fast-case backing storage takes up much more memory than a dictionary
|
||||||
// backing storage would, the object should have slow elements.
|
// backing storage would, the object should have slow elements.
|
||||||
|
@ -1370,25 +1370,18 @@ class JSAsyncFromSyncIterator
|
|||||||
TQ_OBJECT_CONSTRUCTORS(JSAsyncFromSyncIterator)
|
TQ_OBJECT_CONSTRUCTORS(JSAsyncFromSyncIterator)
|
||||||
};
|
};
|
||||||
|
|
||||||
class JSStringIterator : public JSObject {
|
class JSStringIterator
|
||||||
|
: public TorqueGeneratedJSStringIterator<JSStringIterator, JSObject> {
|
||||||
public:
|
public:
|
||||||
// Dispatched behavior.
|
// Dispatched behavior.
|
||||||
DECL_PRINTER(JSStringIterator)
|
DECL_PRINTER(JSStringIterator)
|
||||||
DECL_VERIFIER(JSStringIterator)
|
DECL_VERIFIER(JSStringIterator)
|
||||||
|
|
||||||
DECL_CAST(JSStringIterator)
|
|
||||||
|
|
||||||
// [string]: the [[IteratedString]] inobject property.
|
|
||||||
DECL_ACCESSORS(string, String)
|
|
||||||
|
|
||||||
// [index]: The [[StringIteratorNextIndex]] inobject property.
|
// [index]: The [[StringIteratorNextIndex]] inobject property.
|
||||||
inline int index() const;
|
inline int index() const;
|
||||||
inline void set_index(int value);
|
inline void set_index(int value);
|
||||||
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
|
TQ_OBJECT_CONSTRUCTORS(JSStringIterator)
|
||||||
TORQUE_GENERATED_JSSTRING_ITERATOR_FIELDS)
|
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(JSStringIterator, JSObject);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -17,38 +17,21 @@
|
|||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS_IMPL(WeakCell, HeapObject)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(WeakCell)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(JSWeakRef, JSObject)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(JSWeakRef)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(JSFinalizationGroup, JSObject)
|
OBJECT_CONSTRUCTORS_IMPL(JSFinalizationGroup, JSObject)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(JSFinalizationGroupCleanupIterator, JSObject)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(JSFinalizationGroupCleanupIterator)
|
||||||
|
|
||||||
ACCESSORS(JSFinalizationGroup, native_context, NativeContext,
|
ACCESSORS(JSFinalizationGroup, native_context, NativeContext,
|
||||||
kNativeContextOffset)
|
kNativeContextOffset)
|
||||||
ACCESSORS(JSFinalizationGroup, cleanup, Object, kCleanupOffset)
|
ACCESSORS(JSFinalizationGroup, cleanup, Object, kCleanupOffset)
|
||||||
ACCESSORS(JSFinalizationGroup, active_cells, Object, kActiveCellsOffset)
|
ACCESSORS(JSFinalizationGroup, active_cells, HeapObject, kActiveCellsOffset)
|
||||||
ACCESSORS(JSFinalizationGroup, cleared_cells, Object, kClearedCellsOffset)
|
ACCESSORS(JSFinalizationGroup, cleared_cells, HeapObject, kClearedCellsOffset)
|
||||||
ACCESSORS(JSFinalizationGroup, key_map, Object, kKeyMapOffset)
|
ACCESSORS(JSFinalizationGroup, key_map, Object, kKeyMapOffset)
|
||||||
SMI_ACCESSORS(JSFinalizationGroup, flags, kFlagsOffset)
|
SMI_ACCESSORS(JSFinalizationGroup, flags, kFlagsOffset)
|
||||||
ACCESSORS(JSFinalizationGroup, next, Object, kNextOffset)
|
ACCESSORS(JSFinalizationGroup, next, Object, kNextOffset)
|
||||||
CAST_ACCESSOR(JSFinalizationGroup)
|
CAST_ACCESSOR(JSFinalizationGroup)
|
||||||
|
|
||||||
ACCESSORS(WeakCell, finalization_group, Object, kFinalizationGroupOffset)
|
|
||||||
ACCESSORS(WeakCell, target, HeapObject, kTargetOffset)
|
|
||||||
ACCESSORS(WeakCell, holdings, Object, kHoldingsOffset)
|
|
||||||
ACCESSORS(WeakCell, next, Object, kNextOffset)
|
|
||||||
ACCESSORS(WeakCell, prev, Object, kPrevOffset)
|
|
||||||
ACCESSORS(WeakCell, key, Object, kKeyOffset)
|
|
||||||
ACCESSORS(WeakCell, key_list_next, Object, kKeyListNextOffset)
|
|
||||||
ACCESSORS(WeakCell, key_list_prev, Object, kKeyListPrevOffset)
|
|
||||||
CAST_ACCESSOR(WeakCell)
|
|
||||||
|
|
||||||
CAST_ACCESSOR(JSWeakRef)
|
|
||||||
ACCESSORS(JSWeakRef, target, HeapObject, kTargetOffset)
|
|
||||||
|
|
||||||
ACCESSORS(JSFinalizationGroupCleanupIterator, finalization_group,
|
|
||||||
JSFinalizationGroup, kFinalizationGroupOffset)
|
|
||||||
CAST_ACCESSOR(JSFinalizationGroupCleanupIterator)
|
|
||||||
|
|
||||||
void JSFinalizationGroup::Register(
|
void JSFinalizationGroup::Register(
|
||||||
Handle<JSFinalizationGroup> finalization_group, Handle<JSReceiver> target,
|
Handle<JSFinalizationGroup> finalization_group, Handle<JSReceiver> target,
|
||||||
Handle<Object> holdings, Handle<Object> key, Isolate* isolate) {
|
Handle<Object> holdings, Handle<Object> key, Isolate* isolate) {
|
||||||
@ -101,7 +84,7 @@ bool JSFinalizationGroup::Unregister(
|
|||||||
Handle<ObjectHashTable> key_map =
|
Handle<ObjectHashTable> key_map =
|
||||||
handle(ObjectHashTable::cast(finalization_group->key_map()), isolate);
|
handle(ObjectHashTable::cast(finalization_group->key_map()), isolate);
|
||||||
Object value = key_map->Lookup(unregister_token);
|
Object value = key_map->Lookup(unregister_token);
|
||||||
Object undefined = ReadOnlyRoots(isolate).undefined_value();
|
HeapObject undefined = ReadOnlyRoots(isolate).undefined_value();
|
||||||
while (value.IsWeakCell()) {
|
while (value.IsWeakCell()) {
|
||||||
WeakCell weak_cell = WeakCell::cast(value);
|
WeakCell weak_cell = WeakCell::cast(value);
|
||||||
weak_cell.RemoveFromFinalizationGroupCells(isolate);
|
weak_cell.RemoveFromFinalizationGroupCells(isolate);
|
||||||
|
@ -28,8 +28,8 @@ class JSFinalizationGroup : public JSObject {
|
|||||||
DECL_ACCESSORS(native_context, NativeContext)
|
DECL_ACCESSORS(native_context, NativeContext)
|
||||||
DECL_ACCESSORS(cleanup, Object)
|
DECL_ACCESSORS(cleanup, Object)
|
||||||
|
|
||||||
DECL_ACCESSORS(active_cells, Object)
|
DECL_ACCESSORS(active_cells, HeapObject)
|
||||||
DECL_ACCESSORS(cleared_cells, Object)
|
DECL_ACCESSORS(cleared_cells, HeapObject)
|
||||||
DECL_ACCESSORS(key_map, Object)
|
DECL_ACCESSORS(key_map, Object)
|
||||||
|
|
||||||
// For storing a list of JSFinalizationGroup objects in NativeContext.
|
// For storing a list of JSFinalizationGroup objects in NativeContext.
|
||||||
@ -75,32 +75,10 @@ class JSFinalizationGroup : public JSObject {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Internal object for storing weak references in JSFinalizationGroup.
|
// Internal object for storing weak references in JSFinalizationGroup.
|
||||||
class WeakCell : public HeapObject {
|
class WeakCell : public TorqueGeneratedWeakCell<WeakCell, HeapObject> {
|
||||||
public:
|
public:
|
||||||
DECL_PRINTER(WeakCell)
|
DECL_PRINTER(WeakCell)
|
||||||
EXPORT_DECL_VERIFIER(WeakCell)
|
EXPORT_DECL_VERIFIER(WeakCell)
|
||||||
DECL_CAST(WeakCell)
|
|
||||||
|
|
||||||
DECL_ACCESSORS(finalization_group, Object)
|
|
||||||
DECL_ACCESSORS(target, HeapObject)
|
|
||||||
DECL_ACCESSORS(holdings, Object)
|
|
||||||
|
|
||||||
// For storing doubly linked lists of WeakCells in JSFinalizationGroup's
|
|
||||||
// "active_cells" and "cleared_cells" lists.
|
|
||||||
DECL_ACCESSORS(prev, Object)
|
|
||||||
DECL_ACCESSORS(next, Object)
|
|
||||||
|
|
||||||
// For storing doubly linked lists of WeakCells per key in
|
|
||||||
// JSFinalizationGroup's key-based hashmap. WeakCell also needs to know its
|
|
||||||
// key, so that we can remove the key from the key_map when we remove the last
|
|
||||||
// WeakCell associated with it.
|
|
||||||
DECL_ACCESSORS(key, Object)
|
|
||||||
DECL_ACCESSORS(key_list_prev, Object)
|
|
||||||
DECL_ACCESSORS(key_list_next, Object)
|
|
||||||
|
|
||||||
// Layout description.
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_WEAK_CELL_FIELDS)
|
|
||||||
|
|
||||||
class BodyDescriptor;
|
class BodyDescriptor;
|
||||||
|
|
||||||
@ -115,40 +93,27 @@ class WeakCell : public HeapObject {
|
|||||||
|
|
||||||
inline void RemoveFromFinalizationGroupCells(Isolate* isolate);
|
inline void RemoveFromFinalizationGroupCells(Isolate* isolate);
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(WeakCell, HeapObject);
|
TQ_OBJECT_CONSTRUCTORS(WeakCell)
|
||||||
};
|
};
|
||||||
|
|
||||||
class JSWeakRef : public JSObject {
|
class JSWeakRef : public TorqueGeneratedJSWeakRef<JSWeakRef, JSObject> {
|
||||||
public:
|
public:
|
||||||
DECL_PRINTER(JSWeakRef)
|
DECL_PRINTER(JSWeakRef)
|
||||||
EXPORT_DECL_VERIFIER(JSWeakRef)
|
EXPORT_DECL_VERIFIER(JSWeakRef)
|
||||||
DECL_CAST(JSWeakRef)
|
|
||||||
|
|
||||||
DECL_ACCESSORS(target, HeapObject)
|
|
||||||
|
|
||||||
// Layout description.
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_JSWEAK_REF_FIELDS)
|
|
||||||
|
|
||||||
class BodyDescriptor;
|
class BodyDescriptor;
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(JSWeakRef, JSObject);
|
TQ_OBJECT_CONSTRUCTORS(JSWeakRef)
|
||||||
};
|
};
|
||||||
|
|
||||||
class JSFinalizationGroupCleanupIterator : public JSObject {
|
class JSFinalizationGroupCleanupIterator
|
||||||
|
: public TorqueGeneratedJSFinalizationGroupCleanupIterator<
|
||||||
|
JSFinalizationGroupCleanupIterator, JSObject> {
|
||||||
public:
|
public:
|
||||||
DECL_PRINTER(JSFinalizationGroupCleanupIterator)
|
DECL_PRINTER(JSFinalizationGroupCleanupIterator)
|
||||||
DECL_VERIFIER(JSFinalizationGroupCleanupIterator)
|
DECL_VERIFIER(JSFinalizationGroupCleanupIterator)
|
||||||
DECL_CAST(JSFinalizationGroupCleanupIterator)
|
|
||||||
|
|
||||||
DECL_ACCESSORS(finalization_group, JSFinalizationGroup)
|
TQ_OBJECT_CONSTRUCTORS(JSFinalizationGroupCleanupIterator)
|
||||||
|
|
||||||
// Layout description.
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(
|
|
||||||
JSObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_JSFINALIZATION_GROUP_CLEANUP_ITERATOR_FIELDS)
|
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(JSFinalizationGroupCleanupIterator, JSObject);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -4989,7 +4989,7 @@ void SharedFunctionInfo::ScriptIterator::Reset(Isolate* isolate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SharedFunctionInfo::SetScript(Handle<SharedFunctionInfo> shared,
|
void SharedFunctionInfo::SetScript(Handle<SharedFunctionInfo> shared,
|
||||||
Handle<Object> script_object,
|
Handle<HeapObject> script_object,
|
||||||
int function_literal_id,
|
int function_literal_id,
|
||||||
bool reset_preparsed_scope_data) {
|
bool reset_preparsed_scope_data) {
|
||||||
if (shared->script() == *script_object) return;
|
if (shared->script() == *script_object) return;
|
||||||
|
@ -21,11 +21,7 @@
|
|||||||
namespace v8 {
|
namespace v8 {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS_IMPL(PreparseData, HeapObject)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(PreparseData)
|
||||||
|
|
||||||
CAST_ACCESSOR(PreparseData)
|
|
||||||
INT_ACCESSORS(PreparseData, data_length, kDataLengthOffset)
|
|
||||||
INT_ACCESSORS(PreparseData, children_length, kInnerLengthOffset)
|
|
||||||
|
|
||||||
int PreparseData::inner_start_offset() const {
|
int PreparseData::inner_start_offset() const {
|
||||||
return InnerOffset(data_length());
|
return InnerOffset(data_length());
|
||||||
@ -107,7 +103,7 @@ DEFINE_DEOPT_ELEMENT_ACCESSORS(SharedFunctionInfo, Object)
|
|||||||
|
|
||||||
ACCESSORS(SharedFunctionInfo, name_or_scope_info, Object,
|
ACCESSORS(SharedFunctionInfo, name_or_scope_info, Object,
|
||||||
kNameOrScopeInfoOffset)
|
kNameOrScopeInfoOffset)
|
||||||
ACCESSORS(SharedFunctionInfo, script_or_debug_info, Object,
|
ACCESSORS(SharedFunctionInfo, script_or_debug_info, HeapObject,
|
||||||
kScriptOrDebugInfoOffset)
|
kScriptOrDebugInfoOffset)
|
||||||
|
|
||||||
INT32_ACCESSORS(SharedFunctionInfo, function_literal_id,
|
INT32_ACCESSORS(SharedFunctionInfo, function_literal_id,
|
||||||
@ -656,16 +652,16 @@ bool SharedFunctionInfo::HasWasmCapiFunctionData() const {
|
|||||||
return function_data().IsWasmCapiFunctionData();
|
return function_data().IsWasmCapiFunctionData();
|
||||||
}
|
}
|
||||||
|
|
||||||
Object SharedFunctionInfo::script() const {
|
HeapObject SharedFunctionInfo::script() const {
|
||||||
Object maybe_script = script_or_debug_info();
|
HeapObject maybe_script = script_or_debug_info();
|
||||||
if (maybe_script.IsDebugInfo()) {
|
if (maybe_script.IsDebugInfo()) {
|
||||||
return DebugInfo::cast(maybe_script).script();
|
return DebugInfo::cast(maybe_script).script();
|
||||||
}
|
}
|
||||||
return maybe_script;
|
return maybe_script;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedFunctionInfo::set_script(Object script) {
|
void SharedFunctionInfo::set_script(HeapObject script) {
|
||||||
Object maybe_debug_info = script_or_debug_info();
|
HeapObject maybe_debug_info = script_or_debug_info();
|
||||||
if (maybe_debug_info.IsDebugInfo()) {
|
if (maybe_debug_info.IsDebugInfo()) {
|
||||||
DebugInfo::cast(maybe_debug_info).set_script(script);
|
DebugInfo::cast(maybe_debug_info).set_script(script);
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,11 +57,9 @@ class WasmJSFunctionData;
|
|||||||
// +-------------------------------+
|
// +-------------------------------+
|
||||||
// | Inner PreparseData N |
|
// | Inner PreparseData N |
|
||||||
// +-------------------------------+
|
// +-------------------------------+
|
||||||
class PreparseData : public HeapObject {
|
class PreparseData
|
||||||
|
: public TorqueGeneratedPreparseData<PreparseData, HeapObject> {
|
||||||
public:
|
public:
|
||||||
DECL_INT_ACCESSORS(data_length)
|
|
||||||
DECL_INT_ACCESSORS(children_length)
|
|
||||||
|
|
||||||
inline int inner_start_offset() const;
|
inline int inner_start_offset() const;
|
||||||
inline ObjectSlot inner_data_start() const;
|
inline ObjectSlot inner_data_start() const;
|
||||||
|
|
||||||
@ -76,12 +74,9 @@ class PreparseData : public HeapObject {
|
|||||||
// Clear uninitialized padding space.
|
// Clear uninitialized padding space.
|
||||||
inline void clear_padding();
|
inline void clear_padding();
|
||||||
|
|
||||||
DECL_CAST(PreparseData)
|
|
||||||
DECL_PRINTER(PreparseData)
|
DECL_PRINTER(PreparseData)
|
||||||
DECL_VERIFIER(PreparseData)
|
DECL_VERIFIER(PreparseData)
|
||||||
|
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_PREPARSE_DATA_FIELDS)
|
|
||||||
static const int kDataStartOffset = kSize;
|
static const int kDataStartOffset = kSize;
|
||||||
|
|
||||||
class BodyDescriptor;
|
class BodyDescriptor;
|
||||||
@ -94,7 +89,7 @@ class PreparseData : public HeapObject {
|
|||||||
return InnerOffset(data_length) + children_length * kTaggedSize;
|
return InnerOffset(data_length) + children_length * kTaggedSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(PreparseData, HeapObject);
|
TQ_OBJECT_CONSTRUCTORS(PreparseData)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline Object get_child_raw(int index) const;
|
inline Object get_child_raw(int index) const;
|
||||||
@ -202,7 +197,7 @@ class SharedFunctionInfo : public HeapObject {
|
|||||||
// Set up the link between shared function info and the script. The shared
|
// Set up the link between shared function info and the script. The shared
|
||||||
// function info is added to the list on the script.
|
// function info is added to the list on the script.
|
||||||
V8_EXPORT_PRIVATE static void SetScript(
|
V8_EXPORT_PRIVATE static void SetScript(
|
||||||
Handle<SharedFunctionInfo> shared, Handle<Object> script_object,
|
Handle<SharedFunctionInfo> shared, Handle<HeapObject> script_object,
|
||||||
int function_literal_id, bool reset_preparsed_scope_data = true);
|
int function_literal_id, bool reset_preparsed_scope_data = true);
|
||||||
|
|
||||||
// Layout description of the optimized code map.
|
// Layout description of the optimized code map.
|
||||||
@ -368,10 +363,10 @@ class SharedFunctionInfo : public HeapObject {
|
|||||||
// [script_or_debug_info]: One of:
|
// [script_or_debug_info]: One of:
|
||||||
// - Script from which the function originates.
|
// - Script from which the function originates.
|
||||||
// - a DebugInfo which holds the actual script [HasDebugInfo()].
|
// - a DebugInfo which holds the actual script [HasDebugInfo()].
|
||||||
DECL_ACCESSORS(script_or_debug_info, Object)
|
DECL_ACCESSORS(script_or_debug_info, HeapObject)
|
||||||
|
|
||||||
inline Object script() const;
|
inline HeapObject script() const;
|
||||||
inline void set_script(Object script);
|
inline void set_script(HeapObject script);
|
||||||
|
|
||||||
// The function is subject to debugging if a debug info is attached.
|
// The function is subject to debugging if a debug info is attached.
|
||||||
inline bool HasDebugInfo() const;
|
inline bool HasDebugInfo() const;
|
||||||
|
@ -22,12 +22,10 @@ namespace internal {
|
|||||||
TQ_OBJECT_CONSTRUCTORS_IMPL(Struct)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(Struct)
|
||||||
TQ_OBJECT_CONSTRUCTORS_IMPL(Tuple2)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(Tuple2)
|
||||||
TQ_OBJECT_CONSTRUCTORS_IMPL(Tuple3)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(Tuple3)
|
||||||
OBJECT_CONSTRUCTORS_IMPL(AccessorPair, Struct)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(AccessorPair)
|
||||||
|
|
||||||
TQ_OBJECT_CONSTRUCTORS_IMPL(ClassPositions)
|
TQ_OBJECT_CONSTRUCTORS_IMPL(ClassPositions)
|
||||||
|
|
||||||
CAST_ACCESSOR(AccessorPair)
|
|
||||||
|
|
||||||
void Struct::InitializeBody(int object_size) {
|
void Struct::InitializeBody(int object_size) {
|
||||||
Object value = GetReadOnlyRoots().undefined_value();
|
Object value = GetReadOnlyRoots().undefined_value();
|
||||||
for (int offset = kHeaderSize; offset < object_size; offset += kTaggedSize) {
|
for (int offset = kHeaderSize; offset < object_size; offset += kTaggedSize) {
|
||||||
@ -35,9 +33,6 @@ void Struct::InitializeBody(int object_size) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ACCESSORS(AccessorPair, getter, Object, kGetterOffset)
|
|
||||||
ACCESSORS(AccessorPair, setter, Object, kSetterOffset)
|
|
||||||
|
|
||||||
TQ_SMI_ACCESSORS(ClassPositions, start)
|
TQ_SMI_ACCESSORS(ClassPositions, start)
|
||||||
TQ_SMI_ACCESSORS(ClassPositions, end)
|
TQ_SMI_ACCESSORS(ClassPositions, end)
|
||||||
|
|
||||||
|
@ -46,13 +46,8 @@ class Tuple3 : public TorqueGeneratedTuple3<Tuple3, Tuple2> {
|
|||||||
// * a FunctionTemplateInfo: a real (lazy) accessor
|
// * a FunctionTemplateInfo: a real (lazy) accessor
|
||||||
// * undefined: considered an accessor by the spec, too, strangely enough
|
// * undefined: considered an accessor by the spec, too, strangely enough
|
||||||
// * null: an accessor which has not been set
|
// * null: an accessor which has not been set
|
||||||
class AccessorPair : public Struct {
|
class AccessorPair : public TorqueGeneratedAccessorPair<AccessorPair, Struct> {
|
||||||
public:
|
public:
|
||||||
DECL_ACCESSORS(getter, Object)
|
|
||||||
DECL_ACCESSORS(setter, Object)
|
|
||||||
|
|
||||||
DECL_CAST(AccessorPair)
|
|
||||||
|
|
||||||
static Handle<AccessorPair> Copy(Isolate* isolate, Handle<AccessorPair> pair);
|
static Handle<AccessorPair> Copy(Isolate* isolate, Handle<AccessorPair> pair);
|
||||||
|
|
||||||
inline Object get(AccessorComponent component);
|
inline Object get(AccessorComponent component);
|
||||||
@ -71,13 +66,8 @@ class AccessorPair : public Struct {
|
|||||||
|
|
||||||
// Dispatched behavior.
|
// Dispatched behavior.
|
||||||
DECL_PRINTER(AccessorPair)
|
DECL_PRINTER(AccessorPair)
|
||||||
DECL_VERIFIER(AccessorPair)
|
|
||||||
|
|
||||||
// Layout description.
|
TQ_OBJECT_CONSTRUCTORS(AccessorPair)
|
||||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
|
||||||
TORQUE_GENERATED_ACCESSOR_PAIR_FIELDS)
|
|
||||||
|
|
||||||
OBJECT_CONSTRUCTORS(AccessorPair, Struct);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassPositions
|
class ClassPositions
|
||||||
|
@ -3314,6 +3314,7 @@ void ImplementationVisitor::GenerateClassDefinitions(
|
|||||||
IncludeGuardScope inline_header_guard(inline_header, basename + "-inl.h");
|
IncludeGuardScope inline_header_guard(inline_header, basename + "-inl.h");
|
||||||
inline_header << "#include \"torque-generated/class-definitions-tq.h\"\n\n";
|
inline_header << "#include \"torque-generated/class-definitions-tq.h\"\n\n";
|
||||||
inline_header << "#include \"src/objects/js-promise.h\"\n";
|
inline_header << "#include \"src/objects/js-promise.h\"\n";
|
||||||
|
inline_header << "#include \"src/objects/js-weak-refs.h\"\n";
|
||||||
inline_header << "#include \"src/objects/module.h\"\n";
|
inline_header << "#include \"src/objects/module.h\"\n";
|
||||||
inline_header << "#include \"src/objects/objects-inl.h\"\n";
|
inline_header << "#include \"src/objects/objects-inl.h\"\n";
|
||||||
inline_header << "#include \"src/objects/script.h\"\n";
|
inline_header << "#include \"src/objects/script.h\"\n";
|
||||||
@ -3329,6 +3330,7 @@ void ImplementationVisitor::GenerateClassDefinitions(
|
|||||||
implementation << "#include \"src/objects/embedder-data-array-inl.h\"\n";
|
implementation << "#include \"src/objects/embedder-data-array-inl.h\"\n";
|
||||||
implementation << "#include \"src/objects/js-generator-inl.h\"\n";
|
implementation << "#include \"src/objects/js-generator-inl.h\"\n";
|
||||||
implementation << "#include \"src/objects/js-regexp-inl.h\"\n";
|
implementation << "#include \"src/objects/js-regexp-inl.h\"\n";
|
||||||
|
implementation << "#include \"src/objects/js-weak-refs-inl.h\"\n";
|
||||||
implementation
|
implementation
|
||||||
<< "#include \"src/objects/js-regexp-string-iterator-inl.h\"\n";
|
<< "#include \"src/objects/js-regexp-string-iterator-inl.h\"\n";
|
||||||
implementation << "#include \"src/objects/literal-objects-inl.h\"\n";
|
implementation << "#include \"src/objects/literal-objects-inl.h\"\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user