V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::internal::compiler::WasmGraphBuilder Class Reference

Public Types

enum  EnforceBoundsCheck : bool { kNeedsBoundsCheck = true, kCanOmitBoundsCheck = false }
 
enum  UseRetpoline : bool { kRetpoline = true, kNoRetpoline = false }
 
enum  ExtraCallableParam : bool { kExtraCallableParam = true, kNoExtraCallableParam = false }
 

Public Member Functions

 WasmGraphBuilder (wasm::CompilationEnv *env, Zone *zone, MachineGraph *mcgraph, wasm::FunctionSig *sig, compiler::SourcePositionTable *spt=nullptr)
 
Node ** Buffer (size_t count)
 
NodeError ()
 
NodeStart (unsigned params)
 
NodeParam (unsigned index)
 
NodeLoop (Node *entry)
 
NodeTerminateLoop (Node *effect, Node *control)
 
NodeTerminateThrow (Node *effect, Node *control)
 
NodeMerge (unsigned count, Node **controls)
 
NodePhi (wasm::ValueType type, unsigned count, Node **vals, Node *control)
 
NodeCreateOrMergeIntoPhi (MachineRepresentation rep, Node *merge, Node *tnode, Node *fnode)
 
NodeCreateOrMergeIntoEffectPhi (Node *merge, Node *tnode, Node *fnode)
 
NodeEffectPhi (unsigned count, Node **effects, Node *control)
 
NodeRefNull ()
 
NodeUint32Constant (uint32_t value)
 
NodeInt32Constant (int32_t value)
 
NodeInt64Constant (int64_t value)
 
NodeIntPtrConstant (intptr_t value)
 
NodeFloat32Constant (float value)
 
NodeFloat64Constant (double value)
 
NodeBinop (wasm::WasmOpcode opcode, Node *left, Node *right, wasm::WasmCodePosition position=wasm::kNoCodePosition)
 
NodeUnop (wasm::WasmOpcode opcode, Node *input, wasm::WasmCodePosition position=wasm::kNoCodePosition)
 
NodeMemoryGrow (Node *input)
 
NodeThrow (uint32_t exception_index, const wasm::WasmException *exception, const Vector< Node *> values)
 
NodeRethrow (Node *except_obj)
 
NodeExceptionTagEqual (Node *caught_tag, Node *expected_tag)
 
NodeLoadExceptionTagFromTable (uint32_t exception_index)
 
NodeGetExceptionTag (Node *except_obj)
 
Node ** GetExceptionValues (Node *except_obj, const wasm::WasmException *exception)
 
bool IsPhiWithMerge (Node *phi, Node *merge)
 
bool ThrowsException (Node *node, Node **if_success, Node **if_exception)
 
void AppendToMerge (Node *merge, Node *from)
 
void AppendToPhi (Node *phi, Node *from)
 
void StackCheck (wasm::WasmCodePosition position, Node **effect=nullptr, Node **control=nullptr)
 
void PatchInStackCheckIfNeeded ()
 
NodeBranchNoHint (Node *cond, Node **true_node, Node **false_node)
 
NodeBranchExpectTrue (Node *cond, Node **true_node, Node **false_node)
 
NodeBranchExpectFalse (Node *cond, Node **true_node, Node **false_node)
 
NodeTrapIfTrue (wasm::TrapReason reason, Node *cond, wasm::WasmCodePosition position)
 
NodeTrapIfFalse (wasm::TrapReason reason, Node *cond, wasm::WasmCodePosition position)
 
NodeTrapIfEq32 (wasm::TrapReason reason, Node *node, int32_t val, wasm::WasmCodePosition position)
 
NodeZeroCheck32 (wasm::TrapReason reason, Node *node, wasm::WasmCodePosition position)
 
NodeTrapIfEq64 (wasm::TrapReason reason, Node *node, int64_t val, wasm::WasmCodePosition position)
 
NodeZeroCheck64 (wasm::TrapReason reason, Node *node, wasm::WasmCodePosition position)
 
NodeSwitch (unsigned count, Node *key)
 
NodeIfValue (int32_t value, Node *sw)
 
NodeIfDefault (Node *sw)
 
NodeReturn (unsigned count, Node **nodes)
 
template<typename... Nodes>
NodeReturn (Node *fst, Nodes *... more)
 
NodeReturnVoid ()
 
NodeUnreachable (wasm::WasmCodePosition position)
 
NodeCallDirect (uint32_t index, Node **args, Node ***rets, wasm::WasmCodePosition position)
 
NodeCallIndirect (uint32_t index, Node **args, Node ***rets, wasm::WasmCodePosition position)
 
NodeInvert (Node *node)
 
NodeCurrentMemoryPages ()
 
NodeGetGlobal (uint32_t index)
 
NodeSetGlobal (uint32_t index, Node *val)
 
NodeTraceMemoryOperation (bool is_store, MachineRepresentation, Node *index, uint32_t offset, wasm::WasmCodePosition)
 
NodeLoadMem (wasm::ValueType type, MachineType memtype, Node *index, uint32_t offset, uint32_t alignment, wasm::WasmCodePosition position)
 
NodeStoreMem (MachineRepresentation mem_rep, Node *index, uint32_t offset, uint32_t alignment, Node *val, wasm::WasmCodePosition position, wasm::ValueType type)
 
void set_instance_node (Node *instance_node)
 
NodeControl ()
 
NodeEffect ()
 
NodeSetControl (Node *node)
 
NodeSetEffect (Node *node)
 
void set_control_ptr (Node **control)
 
void set_effect_ptr (Node **effect)
 
void GetGlobalBaseAndOffset (MachineType mem_type, const wasm::WasmGlobal &, Node **base_node, Node **offset_node)
 
void InitInstanceCache (WasmInstanceCacheNodes *instance_cache)
 
void PrepareInstanceCacheForLoop (WasmInstanceCacheNodes *instance_cache, Node *control)
 
void NewInstanceCacheMerge (WasmInstanceCacheNodes *to, WasmInstanceCacheNodes *from, Node *merge)
 
void MergeInstanceCacheInto (WasmInstanceCacheNodes *to, WasmInstanceCacheNodes *from, Node *merge)
 
void set_instance_cache (WasmInstanceCacheNodes *instance_cache)
 
wasm::FunctionSigGetFunctionSignature ()
 
void LowerInt64 ()
 
void SimdScalarLoweringForTesting ()
 
void SetSourcePosition (Node *node, wasm::WasmCodePosition position)
 
NodeS128Zero ()
 
NodeS1x4Zero ()
 
NodeS1x8Zero ()
 
NodeS1x16Zero ()
 
NodeSimdOp (wasm::WasmOpcode opcode, Node *const *inputs)
 
NodeSimdLaneOp (wasm::WasmOpcode opcode, uint8_t lane, Node *const *inputs)
 
NodeSimdShiftOp (wasm::WasmOpcode opcode, uint8_t shift, Node *const *inputs)
 
NodeSimd8x16ShuffleOp (const uint8_t shuffle[16], Node *const *inputs)
 
NodeAtomicOp (wasm::WasmOpcode opcode, Node *const *inputs, uint32_t alignment, uint32_t offset, wasm::WasmCodePosition position)
 
bool has_simd () const
 
const wasm::WasmModulemodule ()
 
wasm::UseTrapHandler use_trap_handler () const
 
MachineGraphmcgraph ()
 
Graphgraph ()
 
void AddBytecodePositionDecorator (NodeOriginTable *node_origins, wasm::Decoder *decoder)
 
void RemoveBytecodePositionDecorator ()
 

Static Public Member Functions

static void PrintDebugName (Node *node)
 

Protected Member Functions

NodeNoContextConstant ()
 
NodeMemBuffer (uint32_t offset)
 
NodeBoundsCheckMem (uint8_t access_size, Node *index, uint32_t offset, wasm::WasmCodePosition, EnforceBoundsCheck)
 
NodeCheckBoundsAndAlignment (uint8_t access_size, Node *index, uint32_t offset, wasm::WasmCodePosition)
 
NodeUint32ToUintptr (Node *)
 
const OperatorGetSafeLoadOperator (int offset, wasm::ValueType type)
 
const OperatorGetSafeStoreOperator (int offset, wasm::ValueType type)
 
NodeBuildChangeEndiannessStore (Node *node, MachineRepresentation rep, wasm::ValueType wasmtype=wasm::kWasmStmt)
 
NodeBuildChangeEndiannessLoad (Node *node, MachineType type, wasm::ValueType wasmtype=wasm::kWasmStmt)
 
NodeMaskShiftCount32 (Node *node)
 
NodeMaskShiftCount64 (Node *node)
 
template<typename... Args>
NodeBuildCCall (MachineSignature *sig, Node *function, Args... args)
 
NodeBuildWasmCall (wasm::FunctionSig *sig, Node **args, Node ***rets, wasm::WasmCodePosition position, Node *instance_node, UseRetpoline use_retpoline)
 
NodeBuildImportCall (wasm::FunctionSig *sig, Node **args, Node ***rets, wasm::WasmCodePosition position, int func_index)
 
NodeBuildImportCall (wasm::FunctionSig *sig, Node **args, Node ***rets, wasm::WasmCodePosition position, Node *func_index)
 
NodeBuildF32CopySign (Node *left, Node *right)
 
NodeBuildF64CopySign (Node *left, Node *right)
 
NodeBuildIntConvertFloat (Node *input, wasm::WasmCodePosition position, wasm::WasmOpcode)
 
NodeBuildI32Ctz (Node *input)
 
NodeBuildI32Popcnt (Node *input)
 
NodeBuildI64Ctz (Node *input)
 
NodeBuildI64Popcnt (Node *input)
 
NodeBuildBitCountingCall (Node *input, ExternalReference ref, MachineRepresentation input_type)
 
NodeBuildCFuncInstruction (ExternalReference ref, MachineType type, Node *input0, Node *input1=nullptr)
 
NodeBuildF32Trunc (Node *input)
 
NodeBuildF32Floor (Node *input)
 
NodeBuildF32Ceil (Node *input)
 
NodeBuildF32NearestInt (Node *input)
 
NodeBuildF64Trunc (Node *input)
 
NodeBuildF64Floor (Node *input)
 
NodeBuildF64Ceil (Node *input)
 
NodeBuildF64NearestInt (Node *input)
 
NodeBuildI32Rol (Node *left, Node *right)
 
NodeBuildI64Rol (Node *left, Node *right)
 
NodeBuildF64Acos (Node *input)
 
NodeBuildF64Asin (Node *input)
 
NodeBuildF64Pow (Node *left, Node *right)
 
NodeBuildF64Mod (Node *left, Node *right)
 
NodeBuildIntToFloatConversionInstruction (Node *input, ExternalReference ref, MachineRepresentation parameter_representation, const MachineType result_type)
 
NodeBuildF32SConvertI64 (Node *input)
 
NodeBuildF32UConvertI64 (Node *input)
 
NodeBuildF64SConvertI64 (Node *input)
 
NodeBuildF64UConvertI64 (Node *input)
 
NodeBuildCcallConvertFloat (Node *input, wasm::WasmCodePosition position, wasm::WasmOpcode opcode)
 
NodeBuildI32DivS (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI32RemS (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI32DivU (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI32RemU (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI64DivS (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI64RemS (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI64DivU (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildI64RemU (Node *left, Node *right, wasm::WasmCodePosition position)
 
NodeBuildDiv64Call (Node *left, Node *right, ExternalReference ref, MachineType result_type, wasm::TrapReason trap_zero, wasm::WasmCodePosition position)
 
NodeBuildChangeInt32ToIntPtr (Node *value)
 
NodeBuildChangeInt32ToSmi (Node *value)
 
NodeBuildChangeUint31ToSmi (Node *value)
 
NodeBuildSmiShiftBitsConstant ()
 
NodeBuildChangeSmiToInt32 (Node *value)
 
NodeBuildI32AsmjsSConvertF32 (Node *input)
 
NodeBuildI32AsmjsSConvertF64 (Node *input)
 
NodeBuildI32AsmjsUConvertF32 (Node *input)
 
NodeBuildI32AsmjsUConvertF64 (Node *input)
 
NodeBuildI32AsmjsDivS (Node *left, Node *right)
 
NodeBuildI32AsmjsRemS (Node *left, Node *right)
 
NodeBuildI32AsmjsDivU (Node *left, Node *right)
 
NodeBuildI32AsmjsRemU (Node *left, Node *right)
 
NodeBuildAsmjsLoadMem (MachineType type, Node *index)
 
NodeBuildAsmjsStoreMem (MachineType type, Node *index, Node *val)
 
uint32_t GetExceptionEncodedSize (const wasm::WasmException *exception) const
 
void BuildEncodeException32BitValue (Node *values_array, uint32_t *index, Node *value)
 
NodeBuildDecodeException32BitValue (Node *values_array, uint32_t *index)
 
NodeBuildDecodeException64BitValue (Node *values_array, uint32_t *index)
 
Node ** Realloc (Node *const *buffer, size_t old_count, size_t new_count)
 
NodeBuildLoadBuiltinFromInstance (int builtin_index)
 
NodeBuildCallToRuntime (Runtime::FunctionId f, Node **parameters, int parameter_count)
 
NodeBuildCallToRuntimeWithContext (Runtime::FunctionId f, Node *js_context, Node **parameters, int parameter_count)
 
TrapId GetTrapIdForTrap (wasm::TrapReason reason)
 

Protected Attributes

Zone *const zone_
 
MachineGraph *const mcgraph_
 
wasm::CompilationEnv *const env_
 
Node ** control_ = nullptr
 
Node ** effect_ = nullptr
 
WasmInstanceCacheNodesinstance_cache_ = nullptr
 
SetOncePointer< Nodeinstance_node_
 
SetOncePointer< Nodeglobals_start_
 
SetOncePointer< Nodeimported_mutable_globals_
 
SetOncePointer< Nodestack_check_code_node_
 
SetOncePointer< const Operatorstack_check_call_operator_
 
Node ** cur_buffer_
 
size_t cur_bufsize_
 
Nodedef_buffer_ [kDefaultBufferSize]
 
bool has_simd_ = false
 
bool needs_stack_check_ = false
 
const bool untrusted_code_mitigations_ = true
 
wasm::FunctionSig *const sig_
 
compiler::WasmDecoratordecorator_ = nullptr
 
compiler::SourcePositionTable *const source_position_table_ = nullptr
 

Static Protected Attributes

static const int kDefaultBufferSize = 16
 

Detailed Description

Definition at line 156 of file wasm-compiler.h.


The documentation for this class was generated from the following files: