5 #ifndef V8_OBJECTS_FRAME_ARRAY_H_ 6 #define V8_OBJECTS_FRAME_ARRAY_H_ 8 #include "src/objects.h" 9 #include "src/wasm/wasm-objects.h" 12 #include "src/objects/object-macros.h" 20 #define FRAME_ARRAY_FIELD_LIST(V) \ 21 V(WasmInstance, WasmInstanceObject) \ 22 V(WasmFunctionIndex, Smi) \ 23 V(WasmCodeObject, Foreign) \ 25 V(Function, JSFunction) \ 26 V(Code, AbstractCode) \ 33 #define DECL_FRAME_ARRAY_ACCESSORS(name, type) \ 34 inline type##ArgType name(int frame_ix) const; \ 35 inline void Set##name(int frame_ix, type##ArgType value); 36 FRAME_ARRAY_FIELD_LIST(DECL_FRAME_ARRAY_ACCESSORS)
37 #undef DECL_FRAME_ARRAY_ACCESSORS 39 inline bool IsWasmFrame(
int frame_ix)
const;
40 inline bool IsWasmInterpretedFrame(
int frame_ix)
const;
41 inline bool IsAsmJsWasmFrame(
int frame_ix)
const;
42 inline int FrameCount()
const;
44 void ShrinkToFit(
Isolate* isolate);
48 kIsWasmFrame = 1 << 0,
49 kIsWasmInterpretedFrame = 1 << 1,
50 kIsAsmJsWasmFrame = 1 << 2,
52 kIsConstructor = 1 << 4,
53 kAsmJsAtNumberConversion = 1 << 5,
55 kIsPromiseAll = 1 << 7
65 int wasm_function_index,
wasm::WasmCode* code,
int offset,
int flags);
77 static const int kWasmInstanceOffset = 0;
78 static const int kWasmFunctionIndexOffset = 1;
79 static const int kWasmCodeObjectOffset = 2;
81 static const int kReceiverOffset = 0;
82 static const int kFunctionOffset = 1;
84 static const int kCodeOffset = 2;
85 static const int kOffsetOffset = 3;
87 static const int kFlagsOffset = 4;
89 static const int kElementsPerFrame = 5;
93 static const int kFrameCountIndex = 0;
94 static const int kFirstIndex = 1;
96 static int LengthFor(
int frame_count) {
97 return kFirstIndex + frame_count * kElementsPerFrame;
110 #include "src/objects/object-macros-undef.h" 112 #endif // V8_OBJECTS_FRAME_ARRAY_H_