5 #ifndef V8_OBJECTS_FRAME_ARRAY_INL_H_ 6 #define V8_OBJECTS_FRAME_ARRAY_INL_H_ 8 #include "src/objects/frame-array.h" 9 #include "src/wasm/wasm-objects-inl.h" 12 #include "src/objects/object-macros.h" 17 OBJECT_CONSTRUCTORS_IMPL(FrameArray, FixedArray)
18 CAST_ACCESSOR2(FrameArray)
20 #define DEFINE_FRAME_ARRAY_ACCESSORS(name, type) \ 21 type##ArgType FrameArray::name(int frame_ix) const { \ 23 get(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset); \ 24 return type::cast(obj); \ 27 void FrameArray::Set##name(int frame_ix, type##ArgType value) { \ 28 set(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset, value); \ 30 FRAME_ARRAY_FIELD_LIST(DEFINE_FRAME_ARRAY_ACCESSORS)
31 #undef DEFINE_FRAME_ARRAY_ACCESSORS 33 bool FrameArray::IsWasmFrame(
int frame_ix)
const {
34 const int flags = Flags(frame_ix)->value();
35 return (flags & kIsWasmFrame) != 0;
38 bool FrameArray::IsWasmInterpretedFrame(
int frame_ix)
const {
39 const int flags = Flags(frame_ix)->value();
40 return (flags & kIsWasmInterpretedFrame) != 0;
43 bool FrameArray::IsAsmJsWasmFrame(
int frame_ix)
const {
44 const int flags = Flags(frame_ix)->value();
45 return (flags & kIsAsmJsWasmFrame) != 0;
48 int FrameArray::FrameCount()
const {
49 const int frame_count = Smi::ToInt(
get(kFrameCountIndex));
50 DCHECK_LE(0, frame_count);
57 #include "src/objects/object-macros-undef.h" 59 #endif // V8_OBJECTS_FRAME_ARRAY_INL_H_