v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-interpreter-runtime.h
Go to the documentation of this file.
1// Copyright 2024 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_WASM_INTERPRETER_WASM_INTERPRETER_RUNTIME_H_
6#define V8_WASM_INTERPRETER_WASM_INTERPRETER_RUNTIME_H_
7
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
10#endif // !V8_ENABLE_WEBASSEMBLY
11
12#include <memory>
13#include <vector>
14
15#include "src/base/vector.h"
18
19namespace v8 {
20
21namespace internal {
22class WasmInstanceObject;
23
24namespace wasm {
25class InterpreterTracer;
26class WasmBytecodeGenerator;
27struct WasmTag;
28
30 public:
31 WasmInterpreterRuntime(const WasmModule* module, Isolate* isolate,
34
35 inline WasmBytecode* GetFunctionBytecode(uint32_t func_index);
36
37 std::vector<WasmInterpreterStackEntry> GetInterpretedStack(
38 Address frame_pointer);
39
40 int GetFunctionIndex(Address frame_pointer, int index) const;
41
42 void SetTrapFunctionIndex(int32_t func_index);
43
44 inline Isolate* GetIsolate() const { return isolate_; }
45
46 inline uint8_t* GetGlobalAddress(uint32_t index);
47 inline DirectHandle<Object> GetGlobalRef(uint32_t index) const;
48 inline void SetGlobalRef(uint32_t index, DirectHandle<Object> ref) const;
49
50 int32_t MemoryGrow(uint32_t delta_pages);
51 inline uint64_t MemorySize() const;
52 inline bool IsMemory64() const;
53 inline uint8_t* GetMemoryStart() const { return memory_start_; }
54 inline size_t GetMemorySize() const;
55
56 bool MemoryInit(const uint8_t*& current_code, uint32_t data_segment_index,
57 uint64_t dst, uint64_t src, uint64_t size);
58 bool MemoryCopy(const uint8_t*& current_code, uint64_t dst, uint64_t src,
59 uint64_t size);
60 bool MemoryFill(const uint8_t*& current_code, uint64_t dst, uint32_t value,
61 uint64_t size);
62
63 bool AllowsAtomicsWait() const;
64 int32_t AtomicNotify(uint64_t effective_index, int32_t val);
65 int32_t I32AtomicWait(uint64_t effective_index, int32_t val, int64_t timeout);
66 int32_t I64AtomicWait(uint64_t effective_index, int64_t val, int64_t timeout);
67
68 inline bool WasmStackCheck(const uint8_t* current_bytecode,
69 const uint8_t*& code);
70
71 bool TableGet(const uint8_t*& current_code, uint32_t table_index,
72 uint32_t entry_index, DirectHandle<Object>* result);
73 void TableSet(const uint8_t*& current_code, uint32_t table_index,
74 uint32_t entry_index, DirectHandle<Object> ref);
75 void TableInit(const uint8_t*& current_code, uint32_t table_index,
76 uint32_t element_segment_index, uint32_t dst, uint32_t src,
77 uint32_t size);
78 void TableCopy(const uint8_t*& current_code, uint32_t dst_table_index,
79 uint32_t src_table_index, uint32_t dst, uint32_t src,
80 uint32_t size);
81 uint32_t TableGrow(uint32_t table_index, uint32_t delta,
83 uint32_t TableSize(uint32_t table_index);
84 void TableFill(const uint8_t*& current_code, uint32_t table_index,
85 uint32_t count, DirectHandle<Object> value, uint32_t start);
86
87 static void UpdateIndirectCallTable(Isolate* isolate,
89 uint32_t table_index);
92 uint32_t table_index, uint32_t entry_index);
93
95
96 inline void DataDrop(uint32_t index);
97 inline void ElemDrop(uint32_t index);
98
99 inline const WasmTag& GetWasmTag(uint32_t tag_index) const {
100 return module_->tags[tag_index];
101 }
103 uint32_t tag_index) const;
104 void UnpackException(uint32_t* sp, const WasmTag& tag,
105 DirectHandle<Object> exception_object,
106 uint32_t first_param_slot_index,
107 uint32_t first_param_ref_stack_index);
108 void ThrowException(const uint8_t*& code, uint32_t* sp,
109 Tagged<Object> exception_object);
110 void RethrowException(const uint8_t*& code, uint32_t* sp,
111 uint32_t catch_block_index);
112
113 void BeginExecution(WasmInterpreterThread* thread, uint32_t function_index,
114 Address frame_pointer, uint8_t* interpreter_fp,
115 uint32_t ref_stack_offset,
116 const std::vector<WasmValue>* argument_values = nullptr);
117 void ContinueExecution(WasmInterpreterThread* thread, bool called_from_js);
118
119 void ExecuteImportedFunction(const uint8_t*& code, uint32_t func_index,
120 uint32_t current_stack_size,
121 uint32_t ref_stack_fp_offset,
122 uint32_t slot_offset,
123 uint32_t return_slot_offset,
124 bool is_tail_call = false);
125
126 void PrepareTailCall(const uint8_t*& code, uint32_t func_index,
127 uint32_t current_stack_size,
128 uint32_t return_slot_offset);
129
130 void ExecuteFunction(const uint8_t*& code, uint32_t function_index,
131 uint32_t current_stack_size,
132 uint32_t ref_stack_fp_offset, uint32_t slot_offset,
133 uint32_t return_slot_offset);
134
135 void ExecuteIndirectCall(const uint8_t*& current_code, uint32_t table_index,
136 uint32_t sig_index, uint32_t entry_index,
137 uint32_t stack_pos, uint32_t* sp,
138 uint32_t ref_stack_fp_offset, uint32_t slot_offset,
139 uint32_t return_slot_offset, bool is_tail_call);
140
141 void ExecuteCallRef(const uint8_t*& current_code, WasmRef func_ref,
142 uint32_t sig_index, uint32_t stack_pos, uint32_t* sp,
143 uint32_t ref_stack_fp_offset, uint32_t slot_offset,
144 uint32_t return_slot_offset, bool is_tail_call);
145
146 const WasmValue& GetReturnValue(size_t index) const {
147 DCHECK_LT(index, function_result_.size());
148 return function_result_[index];
149 }
150
151 inline bool IsRefNull(DirectHandle<Object> ref) const;
152 inline DirectHandle<Object> GetFunctionRef(uint32_t index) const;
153 void StoreWasmRef(uint32_t ref_stack_index, const WasmRef& ref);
154 WasmRef ExtractWasmRef(uint32_t ref_stack_index);
155 void UnwindCurrentStackFrame(uint32_t* sp, uint32_t slot_offset,
156 uint32_t rets_size, uint32_t args_size,
157 uint32_t rets_refs, uint32_t args_refs,
158 uint32_t ref_stack_fp_offset);
159
160 void PrintStack(uint32_t* sp, RegMode reg_mode, int64_t r0, double fp0);
161
162 void SetTrap(TrapReason trap_reason, pc_t trap_pc);
163 void SetTrap(TrapReason trap_reason, const uint8_t*& current_code);
164
165 // GC helpers.
166 DirectHandle<Map> RttCanon(uint32_t type_index) const;
167 std::pair<DirectHandle<WasmStruct>, const StructType*> StructNewUninitialized(
168 uint32_t index) const;
169 std::pair<DirectHandle<WasmArray>, const ArrayType*> ArrayNewUninitialized(
170 uint32_t length, uint32_t array_index) const;
171 WasmRef WasmArrayNewSegment(uint32_t array_index, uint32_t segment_index,
172 uint32_t offset, uint32_t length);
173 bool WasmArrayInitSegment(uint32_t segment_index, WasmRef wasm_array,
174 uint32_t array_offset, uint32_t segment_offset,
175 uint32_t length);
176 bool WasmArrayCopy(WasmRef dest_wasm_array, uint32_t dest_index,
177 WasmRef src_wasm_array, uint32_t src_index,
178 uint32_t length);
180 uint32_t canonical_index) const;
182 WasmRef WasmToJSObject(WasmRef ref) const;
183
184 inline const ArrayType* GetArrayType(uint32_t array_index) const;
186 uint32_t index) const;
187 bool SubtypeCheck(const WasmRef obj, const ValueType obj_type,
188 const DirectHandle<Map> rtt,
189 const ModuleTypeIndex target_type,
190 bool null_succeeds) const;
191 bool RefIsEq(const WasmRef obj, const ValueType obj_type,
192 bool null_succeeds) const;
193 bool RefIsI31(const WasmRef obj, const ValueType obj_type,
194 bool null_succeeds) const;
195 bool RefIsStruct(const WasmRef obj, const ValueType obj_type,
196 bool null_succeeds) const;
197 bool RefIsArray(const WasmRef obj, const ValueType obj_type,
198 bool null_succeeds) const;
199 bool RefIsString(const WasmRef obj, const ValueType obj_type,
200 bool null_succeeds) const;
201 inline bool IsNullTypecheck(const WasmRef obj,
202 const ValueType obj_type) const;
203 inline static bool IsNull(Isolate* isolate, const WasmRef obj,
204 const ValueType obj_type);
205 inline Tagged<Object> GetNullValue(const ValueType obj_type) const;
206
207 static int memory_start_offset();
208 static int instruction_table_offset();
209
210 size_t TotalBytecodeSize() const { return codemap_->TotalBytecodeSize(); }
211
213
214#ifdef V8_ENABLE_DRUMBRAKE_TRACING
215 void Trace(const char* format, ...);
216#endif // V8_ENABLE_DRUMBRAKE_TRACING
217
218 // Stored in WasmExportedFunctionData::packed_args_size; used by
219 // JSToWasmInterpreterWrapper and WasmToJSInterpreterWrapper builtins.
220 // Note that the max size of the packed array of args is 16000, which fits
221 // into 14 bits (kV8MaxWasmFunctionParams == 1000).
222 static_assert(sizeof(Simd128) * kV8MaxWasmFunctionParams < (1 << 14));
226
227 private:
228 ExternalCallResult CallImportedFunction(const uint8_t*& current_code,
229 uint32_t function_index, uint32_t* sp,
230 uint32_t current_stack_size,
231 uint32_t ref_stack_fp_index,
232 uint32_t current_slot_offset);
233 void PurgeIndirectCallCache(uint32_t table_index);
234
235 ExternalCallResult CallExternalJSFunction(const uint8_t*& current_code,
236 const WasmModule* module,
237 DirectHandle<Object> object_ref,
238 const FunctionSig* sig,
239 uint32_t* sp,
240 uint32_t return_slot_offset);
241
242 inline Address EffectiveAddress(uint64_t index) const;
243
244 // Checks if [index, index+size) is in range [0, WasmMemSize), where
245 // WasmMemSize is the size of the Memory object associated to
246 // {instance_object_}. (Notice that only a single memory is supported).
247 // If not in range, {size} is clamped to its valid range.
248 // It in range, out_address contains the (virtual memory) address of the
249 // {index}th memory location in the Wasm memory.
250 inline bool BoundsCheckMemRange(uint64_t index, uint64_t* size,
251 Address* out_address) const;
252
254 inline void InitMemoryAddresses();
256 bool CheckIndirectCallSignature(uint32_t table_index, uint32_t entry_index,
257 uint32_t sig_index) const;
258
259 void StoreRefArgsIntoStackSlots(uint8_t* sp, uint32_t ref_stack_fp_offset,
260 const FunctionSig* sig);
261 void StoreRefResultsIntoRefStack(uint8_t* sp, uint32_t ref_stack_fp_offset,
262 const FunctionSig* sig);
263
264 void InitializeRefLocalsRefs(const WasmBytecode* target_function);
265
267 uint32_t* sp, const uint8_t*& current_code);
269 uint32_t index) const;
270
271 bool SubtypeCheck(Tagged<Map> rtt, Tagged<Map> formal_rtt,
272 uint32_t type_index) const;
273
279
283
284 void CallWasmToJSBuiltin(Isolate* isolate, DirectHandle<Object> object_ref,
285 Address packed_args, const FunctionSig* sig);
286
288 const;
289
294
297 std::vector<WasmValue> function_result_;
298
301
303
305
307
308#ifdef __clang__
309#pragma clang diagnostic push
310#pragma clang diagnostic ignored "-Wunused-private-field"
311#endif // __clang__
312 PWasmOp* const* instruction_table_;
313#ifdef __clang__
314#pragma clang diagnostic pop
315#endif // __clang__
316
317 std::vector<uint8_t*> global_addresses_;
318
349 typedef std::vector<IndirectCallValue> IndirectCallTable;
350 std::vector<IndirectCallTable> indirect_call_tables_;
351
353 // NOLINTNEXTLINE(readability/casting)
354 Address(Address js_function, Address packed_args,
355 Address saved_c_entry_fp, const FunctionSig* sig,
356 Address c_entry_fp, Address callable);
358
359 public:
360#ifdef V8_ENABLE_DRUMBRAKE_TRACING
361 void TracePop() { shadow_stack_->TracePop(); }
362
363 size_t TracePush(ValueKind kind, uint32_t slot_offset) {
364 switch (kind) {
365 case kI32:
366 return TracePush<int32_t>(slot_offset);
367 case kI64:
368 return TracePush<int64_t>(slot_offset);
369 case kF32:
370 return TracePush<float>(slot_offset);
371 case kF64:
372 return TracePush<double>(slot_offset);
373 case kS128:
374 return TracePush<Simd128>(slot_offset);
375 case kRef:
376 case kRefNull:
377 return TracePush<WasmRef>(slot_offset);
378 default:
379 UNREACHABLE();
380 }
381 }
382 template <typename T>
383 size_t TracePush(uint32_t slot_offset) {
384 shadow_stack_->TracePush<T>(slot_offset);
385 return sizeof(T);
386 }
387
388 void TracePushCopy(uint32_t from_index) {
389 shadow_stack_->TracePushCopy(from_index);
390 }
391
392 void TraceUpdate(uint32_t stack_index, uint32_t slot_offset) {
393 shadow_stack_->TraceUpdate(stack_index, slot_offset);
394 }
395
396 void TraceSetSlotType(uint32_t stack_index, uint32_t type) {
397 shadow_stack_->TraceSetSlotType(stack_index, type);
398 }
399
400 // Used to redirect tracing output from {stdout} to a file.
401 InterpreterTracer* GetTracer();
402
403 std::unique_ptr<InterpreterTracer> tracer_;
404 ShadowStack* shadow_stack_;
405#endif // V8_ENABLE_DRUMBRAKE_TRACING
406
409};
410
412 public:
413 static constexpr ExternalPointerTag kManagedTag = kGenericManagedTag;
414
415 InterpreterHandle(Isolate* isolate, DirectHandle<Tuple2> interpreter_object);
416
417 WasmInterpreter* interpreter() { return &interpreter_; }
418 const WasmModule* module() const { return module_; }
419
420 // Returns true if exited regularly, false if a trap/exception occurred and
421 // was not handled inside this activation. In the latter case, a pending
422 // exception will have been set on the isolate.
423 bool Execute(WasmInterpreterThread* thread, Address frame_pointer,
424 uint32_t func_index,
425 const std::vector<WasmValue>& argument_values,
426 std::vector<WasmValue>& return_values);
427 bool Execute(WasmInterpreterThread* thread, Address frame_pointer,
428 uint32_t func_index, uint8_t* interpreter_fp);
429
430 inline WasmInterpreterThread::State ContinueExecution(
431 WasmInterpreterThread* thread, bool called_from_js);
432
433 DirectHandle<WasmInstanceObject> GetInstanceObject();
434
435 std::vector<WasmInterpreterStackEntry> GetInterpretedStack(
436 Address frame_pointer);
437
438 int GetFunctionIndex(Address frame_pointer, int index) const;
439
440 void SetTrapFunctionIndex(int32_t func_index);
441
442 private:
445
446 static ModuleWireBytes GetBytes(Tagged<Tuple2> interpreter_object);
447
448 inline WasmInterpreterThread::State RunExecutionLoop(
449 WasmInterpreterThread* thread, bool called_from_js);
450
454};
455
456} // namespace wasm
457} // namespace internal
458} // namespace v8
459
460#endif // V8_WASM_INTERPRETER_WASM_INTERPRETER_RUNTIME_H_
#define T
Builtins::Kind kind
Definition builtins.cc:40
InterpreterHandle(const InterpreterHandle &)=delete
InterpreterHandle & operator=(const InterpreterHandle &)=delete
std::vector< IndirectCallValue > IndirectCallTable
DirectHandle< Object > GetGlobalRef(uint32_t index) const
void SetTrap(TrapReason trap_reason, pc_t trap_pc)
std::vector< WasmInterpreterStackEntry > GetInterpretedStack(Address frame_pointer)
void TableCopy(const uint8_t *&current_code, uint32_t dst_table_index, uint32_t src_table_index, uint32_t dst, uint32_t src, uint32_t size)
void PrepareTailCall(const uint8_t *&code, uint32_t func_index, uint32_t current_stack_size, uint32_t return_slot_offset)
DirectHandle< WasmTrustedInstanceData > wasm_trusted_instance_data() const
WasmInterpreterRuntime & operator=(const WasmInterpreterRuntime &)=delete
bool WasmArrayCopy(WasmRef dest_wasm_array, uint32_t dest_index, WasmRef src_wasm_array, uint32_t src_index, uint32_t length)
void BeginExecution(WasmInterpreterThread *thread, uint32_t function_index, Address frame_pointer, uint8_t *interpreter_fp, uint32_t ref_stack_offset, const std::vector< WasmValue > *argument_values=nullptr)
static void ClearIndirectCallCacheEntry(Isolate *isolate, DirectHandle< WasmInstanceObject > instance, uint32_t table_index, uint32_t entry_index)
void StoreRefArgsIntoStackSlots(uint8_t *sp, uint32_t ref_stack_fp_offset, const FunctionSig *sig)
void UnwindCurrentStackFrame(uint32_t *sp, uint32_t slot_offset, uint32_t rets_size, uint32_t args_size, uint32_t rets_refs, uint32_t args_refs, uint32_t ref_stack_fp_offset)
void RethrowException(const uint8_t *&code, uint32_t *sp, uint32_t catch_block_index)
bool MemoryInit(const uint8_t *&current_code, uint32_t data_segment_index, uint64_t dst, uint64_t src, uint64_t size)
std::pair< DirectHandle< WasmArray >, const ArrayType * > ArrayNewUninitialized(uint32_t length, uint32_t array_index) const
void TableSet(const uint8_t *&current_code, uint32_t table_index, uint32_t entry_index, DirectHandle< Object > ref)
Tagged< Object > GetNullValue(const ValueType obj_type) const
void ExecuteFunction(const uint8_t *&code, uint32_t function_index, uint32_t current_stack_size, uint32_t ref_stack_fp_offset, uint32_t slot_offset, uint32_t return_slot_offset)
WasmRef JSToWasmObject(WasmRef extern_ref, ValueType value_type) const
WasmInterpreterRuntime(const WasmInterpreterRuntime &)=delete
bool RefIsArray(const WasmRef obj, const ValueType obj_type, bool null_succeeds) const
bool RefIsString(const WasmRef obj, const ValueType obj_type, bool null_succeeds) const
DirectHandle< Object > GetFunctionRef(uint32_t index) const
uint32_t TableGrow(uint32_t table_index, uint32_t delta, DirectHandle< Object > value)
static void UpdateIndirectCallTable(Isolate *isolate, DirectHandle< WasmInstanceObject > instance, uint32_t table_index)
IndirectHandle< WasmInstanceObject > instance_object_
ExternalCallResult CallExternalJSFunction(const uint8_t *&current_code, const WasmModule *module, DirectHandle< Object > object_ref, const FunctionSig *sig, uint32_t *sp, uint32_t return_slot_offset)
WasmBytecode * GetFunctionBytecode(uint32_t func_index)
void ThrowException(const uint8_t *&code, uint32_t *sp, Tagged< Object > exception_object)
void ExecuteImportedFunction(const uint8_t *&code, uint32_t func_index, uint32_t current_stack_size, uint32_t ref_stack_fp_offset, uint32_t slot_offset, uint32_t return_slot_offset, bool is_tail_call=false)
std::vector< IndirectCallTable > indirect_call_tables_
void StoreWasmRef(uint32_t ref_stack_index, const WasmRef &ref)
static void UpdateMemoryAddress(DirectHandle< WasmInstanceObject > instance)
static bool IsNull(Isolate *isolate, const WasmRef obj, const ValueType obj_type)
ExternalCallResult CallImportedFunction(const uint8_t *&current_code, uint32_t function_index, uint32_t *sp, uint32_t current_stack_size, uint32_t ref_stack_fp_index, uint32_t current_slot_offset)
DirectHandle< Object > GetWasmArrayRefElement(Tagged< WasmArray > array, uint32_t index) const
const WasmValue & GetReturnValue(size_t index) const
bool MemoryCopy(const uint8_t *&current_code, uint64_t dst, uint64_t src, uint64_t size)
bool SubtypeCheck(const WasmRef obj, const ValueType obj_type, const DirectHandle< Map > rtt, const ModuleTypeIndex target_type, bool null_succeeds) const
GeneratedCode< WasmToJSCallSig > generic_wasm_to_js_interpreter_wrapper_fn_
void InitializeRefLocalsRefs(const WasmBytecode *target_function)
bool CheckIndirectCallSignature(uint32_t table_index, uint32_t entry_index, uint32_t sig_index) const
WasmRef WasmArrayNewSegment(uint32_t array_index, uint32_t segment_index, uint32_t offset, uint32_t length)
bool RefIsI31(const WasmRef obj, const ValueType obj_type, bool null_succeeds) const
DirectHandle< Map > RttCanon(uint32_t type_index) const
WasmInterpreterThread::ExceptionHandlingResult HandleException(uint32_t *sp, const uint8_t *&current_code)
bool MatchingExceptionTag(DirectHandle< Object > exception_object, uint32_t index) const
int GetFunctionIndex(Address frame_pointer, int index) const
bool RefIsStruct(const WasmRef obj, const ValueType obj_type, bool null_succeeds) const
WasmInterpreterRuntime(const WasmModule *module, Isolate *isolate, IndirectHandle< WasmInstanceObject > instance_object, WasmInterpreter::CodeMap *codemap)
void PrintStack(uint32_t *sp, RegMode reg_mode, int64_t r0, double fp0)
const ArrayType * GetArrayType(uint32_t array_index) const
void ExecuteCallRef(const uint8_t *&current_code, WasmRef func_ref, uint32_t sig_index, uint32_t stack_pos, uint32_t *sp, uint32_t ref_stack_fp_offset, uint32_t slot_offset, uint32_t return_slot_offset, bool is_tail_call)
bool RefIsEq(const WasmRef obj, const ValueType obj_type, bool null_succeeds) const
int32_t AtomicNotify(uint64_t effective_index, int32_t val)
bool TableGet(const uint8_t *&current_code, uint32_t table_index, uint32_t entry_index, DirectHandle< Object > *result)
bool WasmStackCheck(const uint8_t *current_bytecode, const uint8_t *&code)
WasmInterpreterThread::State state() const
void TableFill(const uint8_t *&current_code, uint32_t table_index, uint32_t count, DirectHandle< Object > value, uint32_t start)
bool BoundsCheckMemRange(uint64_t index, uint64_t *size, Address *out_address) const
std::pair< DirectHandle< WasmStruct >, const StructType * > StructNewUninitialized(uint32_t index) const
void StoreRefResultsIntoRefStack(uint8_t *sp, uint32_t ref_stack_fp_offset, const FunctionSig *sig)
int32_t I32AtomicWait(uint64_t effective_index, int32_t val, int64_t timeout)
bool IsRefNull(DirectHandle< Object > ref) const
void ExecuteIndirectCall(const uint8_t *&current_code, uint32_t table_index, uint32_t sig_index, uint32_t entry_index, uint32_t stack_pos, uint32_t *sp, uint32_t ref_stack_fp_offset, uint32_t slot_offset, uint32_t return_slot_offset, bool is_tail_call)
bool MemoryFill(const uint8_t *&current_code, uint64_t dst, uint32_t value, uint64_t size)
Address(Address js_function, Address packed_args, Address saved_c_entry_fp, const FunctionSig *sig, Address c_entry_fp, Address callable) WasmToJSCallSig
void ContinueExecution(WasmInterpreterThread *thread, bool called_from_js)
WasmRef WasmJSToWasmObject(WasmRef extern_ref, ValueType value_type, uint32_t canonical_index) const
int32_t I64AtomicWait(uint64_t effective_index, int64_t val, int64_t timeout)
void TableInit(const uint8_t *&current_code, uint32_t table_index, uint32_t element_segment_index, uint32_t dst, uint32_t src, uint32_t size)
DirectHandle< FixedArray > reference_stack() const
const WasmTag & GetWasmTag(uint32_t tag_index) const
DirectHandle< WasmExceptionPackage > CreateWasmExceptionPackage(uint32_t tag_index) const
bool WasmArrayInitSegment(uint32_t segment_index, WasmRef wasm_array, uint32_t array_offset, uint32_t segment_offset, uint32_t length)
void CallWasmToJSBuiltin(Isolate *isolate, DirectHandle< Object > object_ref, Address packed_args, const FunctionSig *sig)
void SetGlobalRef(uint32_t index, DirectHandle< Object > ref) const
void UnpackException(uint32_t *sp, const WasmTag &tag, DirectHandle< Object > exception_object, uint32_t first_param_slot_index, uint32_t first_param_ref_stack_index)
bool IsNullTypecheck(const WasmRef obj, const ValueType obj_type) const
Handle< FixedArray > reference_stack() const
int start
int32_t offset
ZoneVector< RpoNumber > & result
bool null_succeeds
ValueType obj_type
const int func_index_
WordWithBits< 128 > Simd128
Definition index.h:236
static ValueType value_type()
uint32_t WasmInterpreterRuntime int64_t r0
uint32_t WasmInterpreterRuntime int64_t double fp0
constexpr size_t kV8MaxWasmFunctionParams
Definition wasm-limits.h:53
kWasmInternalFunctionIndirectPointerTag kProtectedInstanceDataOffset sig
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset instance_object
Definition c-api.cc:87
const size_t segment_offset
#define DCHECK_NOT_NULL(val)
Definition logging.h:492
#define DCHECK_LT(v1, v2)
Definition logging.h:489
#define V8_EXPORT_PRIVATE
Definition macros.h:460
IndirectCallValue(const FunctionSig *signature_, wasm::CanonicalTypeIndex sig_index)
IndirectCallValue(uint32_t func_index_, wasm::CanonicalTypeIndex sig_index)
const wasm::WasmModule * module_