Commit 10e6da53 authored by Z Duong Nguyen-Huu's avatar Z Duong Nguyen-Huu Committed by Commit Bot

Torquefy some simple types

JSArrayIterator, PreparseData

Bug: v8:8952
Change-Id: I0a58402012f6fd5ded0eab92f7e28e3523342650
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1516474Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60219}
parent c302920a
......@@ -146,6 +146,12 @@ extern class JSSloppyArgumentsObject extends JSArgumentsObjectWithLength {
callee: Object;
}
extern class JSArrayIterator extends JSObject {
iterated_object: JSReceiver;
next_index: Number;
kind: Smi;
}
extern class JSArray extends JSObject {
IsEmpty(): bool {
return this.length == 0;
......@@ -219,6 +225,12 @@ type DebugInfo extends HeapObject;
type ScopeInfo extends Object generates 'TNode<ScopeInfo>';
extern class PreparseData extends HeapObject {
// TODO(v8:8983): Add declaration for variable-sized region.
data_length: int32;
inner_length: int32;
}
extern class SharedFunctionInfo extends HeapObject {
weak function_data: Object;
name_or_scope_info: String | NoSharedNameSentinel | ScopeInfo;
......
......@@ -174,16 +174,8 @@ class JSArrayIterator : public JSObject {
inline IterationKind kind() const;
inline void set_kind(IterationKind kind);
// Layout description.
#define JS_ARRAY_ITERATOR_FIELDS(V) \
V(kIteratedObjectOffset, kTaggedSize) \
V(kNextIndexOffset, kTaggedSize) \
V(kKindOffset, kTaggedSize) \
/* Header size. */ \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, JS_ARRAY_ITERATOR_FIELDS)
#undef JS_ARRAY_ITERATOR_FIELDS
DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize,
TORQUE_GENERATED_JSARRAY_ITERATOR_FIELDS)
OBJECT_CONSTRUCTORS(JSArrayIterator, JSObject);
};
......
......@@ -70,16 +70,9 @@ class PreparseData : public HeapObject {
DECL_PRINTER(PreparseData)
DECL_VERIFIER(PreparseData)
// Layout description.
#define PREPARSE_DATA_FIELDS(V) \
V(kDataLengthOffset, kInt32Size) \
V(kInnerLengthOffset, kInt32Size) \
/* Header size. */ \
V(kDataStartOffset, 0) \
V(kHeaderSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, PREPARSE_DATA_FIELDS)
#undef PREPARSE_DATA_FIELDS
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
TORQUE_GENERATED_PREPARSE_DATA_FIELDS)
static const int kDataStartOffset = kSize;
class BodyDescriptor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment