5 #ifndef V8_WASM_OBJECT_ACCESS_H_ 6 #define V8_WASM_OBJECT_ACCESS_H_ 8 #include "src/globals.h" 9 #include "src/objects/fixed-array.h" 10 #include "src/objects/js-objects.h" 11 #include "src/objects/shared-function-info.h" 20 static constexpr
int ToTagged(
int offset) {
return offset - kHeapObjectTag; }
23 static constexpr
int ElementOffsetInTaggedFixedArray(
int index) {
24 return ToTagged(FixedArray::OffsetOfElementAt(index));
28 static constexpr
int ContextOffsetInTaggedJSFunction() {
29 return ToTagged(JSFunction::kContextOffset);
33 static constexpr
int SharedFunctionInfoOffsetInTaggedJSFunction() {
34 return ToTagged(JSFunction::kSharedFunctionInfoOffset);
39 static constexpr
int FormalParameterCountOffsetInSharedFunctionInfo() {
40 return ToTagged(SharedFunctionInfo::kFormalParameterCountOffset);
48 #endif // V8_WASM_OBJECT_ACCESS_H_