Lines Matching defs:wasm
15 #include "src/wasm/wasm-module.h"
16 #include "src/wasm/wasm-opcodes.h"
17 #include "src/wasm/wasm-result.h"
32 namespace wasm {
33 // Forward declarations for some WASM data structures.
41 // Expose {Node} and {Graph} opaquely as {wasm::TFNode} and {wasm::TFGraph}.
44 } // namespace wasm
49 WasmCompilationUnit(wasm::ErrorThrower* thrower, Isolate* isolate,
50 wasm::ModuleBytesEnv* module_env,
51 const wasm::WasmFunction* function, uint32_t index);
59 static Handle<Code> CompileWasmFunction(wasm::ErrorThrower* thrower,
61 wasm::ModuleBytesEnv* module_env,
62 const wasm::WasmFunction* function) {
71 char* GetTaggedFunctionName(const wasm::WasmFunction* function);
73 wasm::ErrorThrower* thrower_;
75 wasm::ModuleBytesEnv* module_env_;
76 const wasm::WasmFunction* function_;
77 // Function name is tagged with uint32 func_index - wasm#<func_index>
86 wasm::Result<wasm::DecodeStruct*> graph_construction_result_;
95 // Wraps a JS function, producing a code object that can be called from WASM.
97 wasm::FunctionSig* sig, uint32_t index,
100 wasm::ModuleOrigin origin);
102 // Wraps a given wasm code object, producing a code object.
104 const wasm::WasmModule* module,
107 // Compiles a stub that redirects a call to a wasm function to the wasm
108 // interpreter. It's ABI compatible with the compiled wasm function.
110 wasm::FunctionSig* sig,
113 // Abstracts details of building TurboFan graph nodes for WASM to separate
114 // the WASM decoder from the internal details of TurboFan.
120 wasm::ModuleEnv* module_env, Zone* z, JSGraph* g, wasm::FunctionSig* sig,
142 Node* Phi(wasm::ValueType type, unsigned count, Node** vals, Node* control);
151 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right,
152 wasm::WasmCodePosition position = wasm::kNoCodePosition);
153 Node* Unop(wasm::WasmOpcode opcode, Node* input,
154 wasm::WasmCodePosition position = wasm::kNoCodePosition);
157 Node* Catch(Node* input, wasm::WasmCodePosition position);
164 void StackCheck(wasm::WasmCodePosition position, Node** effect = nullptr,
184 Node* Unreachable(wasm::WasmCodePosition position);
187 wasm::WasmCodePosition position);
189 wasm::WasmCodePosition position);
191 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig);
192 void BuildWasmToJSWrapper(Handle<JSReceiver> target, wasm::FunctionSig* sig);
193 void BuildWasmInterpreterEntry(uint32_t func_index, wasm::FunctionSig* sig,
196 Node* ToJS(Node* node, wasm::ValueType type);
197 Node* FromJS(Node* node, Node* context, wasm::ValueType type);
207 Node* LoadMem(wasm::ValueType type, MachineType memtype, Node* index,
209 wasm::WasmCodePosition position);
212 wasm::WasmCodePosition position);
223 wasm::FunctionSig* GetFunctionSignature() { return sig_; }
229 void SetSourcePosition(Node* node, wasm::WasmCodePosition position);
233 Node* SimdOp(wasm::WasmOpcode opcode, const NodeVector& inputs);
235 Node* SimdLaneOp(wasm::WasmOpcode opcode, uint8_t lane,
238 Node* SimdShiftOp(wasm::WasmOpcode opcode, uint8_t shift,
241 Node* SimdSwizzleOp(wasm::WasmOpcode opcode, uint32_t swizzle,
246 wasm::ModuleEnv* module_env() const { return module_; }
254 wasm::ModuleEnv* module_ = nullptr;
268 wasm::FunctionSig* sig_;
281 wasm::WasmCodePosition position);
284 wasm::ValueType wasmtype = wasm::kWasmStmt);
290 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, Node*** rets,
291 wasm::WasmCodePosition position);
295 Node* BuildI32SConvertF32(Node* input, wasm::WasmCodePosition position);
296 Node* BuildI32SConvertF64(Node* input, wasm::WasmCodePosition position);
297 Node* BuildI32UConvertF32(Node* input, wasm::WasmCodePosition position);
298 Node* BuildI32UConvertF64(Node* input, wasm::WasmCodePosition position);
336 const MachineType result_type, wasm::WasmCodePosition position);
337 Node* BuildI64SConvertF32(Node* input, wasm::WasmCodePosition position);
338 Node* BuildI64UConvertF32(Node* input, wasm::WasmCodePosition position);
339 Node* BuildI64SConvertF64(Node* input, wasm::WasmCodePosition position);
340 Node* BuildI64UConvertF64(Node* input, wasm::WasmCodePosition position);
342 Node* BuildI32DivS(Node* left, Node* right, wasm::WasmCodePosition position);
343 Node* BuildI32RemS(Node* left, Node* right, wasm::WasmCodePosition position);
344 Node* BuildI32DivU(Node* left, Node* right, wasm::WasmCodePosition position);
345 Node* BuildI32RemU(Node* left, Node* right, wasm::WasmCodePosition position);
347 Node* BuildI64DivS(Node* left, Node* right, wasm::WasmCodePosition position);
348 Node* BuildI64RemS(Node* left, Node* right, wasm::WasmCodePosition position);
349 Node* BuildI64DivU(Node* left, Node* right, wasm::WasmCodePosition position);
350 Node* BuildI64RemU(Node* left, Node* right, wasm::WasmCodePosition position);
353 wasm::WasmCodePosition position);
391 wasm::FunctionSig* sig);