v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::compiler::WasmGraphBuilder Class Reference

#include <wasm-compiler.h>

Collaboration diagram for v8::internal::compiler::WasmGraphBuilder:

Public Types

enum  ParameterMode { kInstanceParameterMode , kWasmImportDataMode , kJSFunctionAbiMode , kNoSpecialParameterMode }
 

Public Member Functions

V8_EXPORT_PRIVATE WasmGraphBuilder (wasm::CompilationEnv *env, Zone *zone, MachineGraph *mcgraph, const wasm::FunctionSig *sig, compiler::SourcePositionTable *spt, ParameterMode parameter_mode, Isolate *isolate, wasm::WasmEnabledFeatures enabled_features, const wasm::CanonicalSig *wrapper_sig=nullptr)
 
V8_EXPORT_PRIVATE ~WasmGraphBuilder ()
 
bool TryWasmInlining (int fct_index, wasm::NativeModule *native_module, int inlining_id)
 
void Start (unsigned params)
 
NodeParam (int index, const char *debug_name=nullptr)
 
void TerminateThrow (Node *effect, Node *control)
 
NodeInt32Constant (int32_t value)
 
NodeReturn (base::Vector< Node * > nodes)
 
template<typename... Nodes>
NodeReturn (Node *fst, Nodes *... more)
 
Nodeeffect ()
 
Nodecontrol ()
 
NodeSetEffect (Node *node)
 
NodeSetControl (Node *node)
 
void SetEffectControl (Node *effect, Node *control)
 
NodeSetEffectControl (Node *effect_and_control)
 
NodeSetType (Node *node, wasm::ValueType type)
 
V8_EXPORT_PRIVATE void LowerInt64 (Signature< MachineRepresentation > *sig)
 
V8_EXPORT_PRIVATE void LowerInt64 (wasm::CallOrigin origin)
 
void SetSourcePosition (Node *node, wasm::WasmCodePosition position)
 
NodeIsNull (Node *object, wasm::ValueType type)
 
NodeTypeGuard (Node *value, wasm::ValueType type)
 
bool has_simd () const
 
MachineGraphmcgraph ()
 
TFGraphgraph ()
 
Zonegraph_zone ()
 

Protected Member Functions

NodeNoContextConstant ()
 
NodeBuildLoadIsolateRoot ()
 
NodeUndefinedValue ()
 
const OperatorGetSafeLoadOperator (int offset, wasm::ValueTypeBase type)
 
NodeBuildSafeStore (int offset, wasm::ValueTypeBase type, Node *arg_buffer, Node *value, Node *effect, Node *control)
 
NodeBuildCallNode (size_t param_count, base::Vector< Node * > args, wasm::WasmCodePosition position, Node *instance_node, const Operator *op, Node *frame_state=nullptr)
 
template<typename T >
NodeBuildWasmCall (const Signature< T > *sig, base::Vector< Node * > args, base::Vector< Node * > rets, wasm::WasmCodePosition position, Node *implicit_first_arg, bool indirect, Node *frame_state=nullptr)
 
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)
 
void BuildModifyThreadInWasmFlag (bool new_value)
 
void BuildModifyThreadInWasmFlagHelper (Node *thread_in_wasm_flag_address, bool new_value)
 
NodeBuildChangeInt64ToBigInt (Node *input, StubCallMode stub_mode)
 
void Assert (Node *condition, AbortReason abort_reason)
 

Protected Attributes

std::unique_ptr< WasmGraphAssemblergasm_
 
Zone *const zone_
 
MachineGraph *const mcgraph_
 
wasm::CompilationEnv *const env_
 
wasm::WasmEnabledFeatures enabled_features_
 
Node ** parameters_
 
SetOncePointer< Nodestack_check_code_node_
 
SetOncePointer< const Operatorstack_check_call_operator_
 
bool has_simd_ = false
 
bool needs_stack_check_ = false
 
const wasm::FunctionSig *const function_sig_
 
const wasm::CanonicalSig *const wrapper_sig_ {nullptr}
 
compiler::WasmDecoratordecorator_ = nullptr
 
compiler::SourcePositionTable *const source_position_table_ = nullptr
 
int inlining_id_ = -1
 
const ParameterMode parameter_mode_
 
Isolate *const isolate_
 
SetOncePointer< Nodeinstance_data_node_
 
NullCheckStrategy null_check_strategy_
 
int cached_memory_index_ = kNoCachedMemoryIndex
 

Static Protected Attributes

static constexpr int kNoCachedMemoryIndex = -1
 

Detailed Description

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

Member Enumeration Documentation

◆ ParameterMode

Enumerator
kInstanceParameterMode 
kWasmImportDataMode 
kJSFunctionAbiMode 
kNoSpecialParameterMode 

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

Constructor & Destructor Documentation

◆ WasmGraphBuilder()

v8::internal::compiler::WasmGraphBuilder::WasmGraphBuilder ( wasm::CompilationEnv * env,
Zone * zone,
MachineGraph * mcgraph,
const wasm::FunctionSig * sig,
compiler::SourcePositionTable * spt,
ParameterMode parameter_mode,
Isolate * isolate,
wasm::WasmEnabledFeatures enabled_features,
const wasm::CanonicalSig * wrapper_sig = nullptr )

Definition at line 97 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ ~WasmGraphBuilder()

v8::internal::compiler::WasmGraphBuilder::~WasmGraphBuilder ( )
default

Member Function Documentation

◆ Assert()

void v8::internal::compiler::WasmGraphBuilder::Assert ( Node * condition,
AbortReason abort_reason )
protected

Definition at line 607 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ BuildCallNode()

Node * v8::internal::compiler::WasmGraphBuilder::BuildCallNode ( size_t param_count,
base::Vector< Node * > args,
wasm::WasmCodePosition position,
Node * instance_node,
const Operator * op,
Node * frame_state = nullptr )
protected

Definition at line 345 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildCallToRuntime()

Node * v8::internal::compiler::WasmGraphBuilder::BuildCallToRuntime ( Runtime::FunctionId f,
Node ** parameters,
int parameter_count )
protected

Definition at line 454 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ BuildCallToRuntimeWithContext()

Node * v8::internal::compiler::WasmGraphBuilder::BuildCallToRuntimeWithContext ( Runtime::FunctionId f,
Node * js_context,
Node ** parameters,
int parameter_count )
protected

Definition at line 417 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildChangeInt64ToBigInt()

Node * v8::internal::compiler::WasmGraphBuilder::BuildChangeInt64ToBigInt ( Node * input,
StubCallMode stub_mode )
protected

Definition at line 550 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ BuildLoadIsolateRoot()

Node * v8::internal::compiler::WasmGraphBuilder::BuildLoadIsolateRoot ( )
protected

Definition at line 270 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildModifyThreadInWasmFlag()

void v8::internal::compiler::WasmGraphBuilder::BuildModifyThreadInWasmFlag ( bool new_value)
protected

Definition at line 596 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ BuildModifyThreadInWasmFlagHelper()

void v8::internal::compiler::WasmGraphBuilder::BuildModifyThreadInWasmFlagHelper ( Node * thread_in_wasm_flag_address,
bool new_value )
protected

Definition at line 580 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildSafeStore()

Node * v8::internal::compiler::WasmGraphBuilder::BuildSafeStore ( int offset,
wasm::ValueTypeBase type,
Node * arg_buffer,
Node * value,
Node * effect,
Node * control )
protected

Definition at line 477 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ BuildWasmCall()

template<typename T >
Node * v8::internal::compiler::WasmGraphBuilder::BuildWasmCall ( const Signature< T > * sig,
base::Vector< Node * > args,
base::Vector< Node * > rets,
wasm::WasmCodePosition position,
Node * implicit_first_arg,
bool indirect,
Node * frame_state = nullptr )
protected

Definition at line 381 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ control()

Node * v8::internal::compiler::WasmGraphBuilder::control ( )

Definition at line 329 of file wasm-compiler.cc.

Here is the caller graph for this function:

◆ effect()

Node * v8::internal::compiler::WasmGraphBuilder::effect ( )

Definition at line 327 of file wasm-compiler.cc.

Here is the caller graph for this function:

◆ GetSafeLoadOperator()

const Operator * v8::internal::compiler::WasmGraphBuilder::GetSafeLoadOperator ( int offset,
wasm::ValueTypeBase type )
protected

Definition at line 461 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ GetTrapIdForTrap()

TrapId v8::internal::compiler::WasmGraphBuilder::GetTrapIdForTrap ( wasm::TrapReason reason)
protected

Definition at line 284 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ graph()

TFGraph * v8::internal::compiler::WasmGraphBuilder::graph ( )

Definition at line 500 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ graph_zone()

Zone * v8::internal::compiler::WasmGraphBuilder::graph_zone ( )

Definition at line 502 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_simd()

bool v8::internal::compiler::WasmGraphBuilder::has_simd ( ) const
inline

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

◆ Int32Constant()

Node * v8::internal::compiler::WasmGraphBuilder::Int32Constant ( int32_t value)

Definition at line 275 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsNull()

Node * v8::internal::compiler::WasmGraphBuilder::IsNull ( Node * object,
wasm::ValueType type )

Definition at line 317 of file wasm-compiler.cc.

◆ LowerInt64() [1/2]

void v8::internal::compiler::WasmGraphBuilder::LowerInt64 ( Signature< MachineRepresentation > * sig)

Definition at line 535 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LowerInt64() [2/2]

void v8::internal::compiler::WasmGraphBuilder::LowerInt64 ( wasm::CallOrigin origin)

Definition at line 542 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ mcgraph()

MachineGraph * v8::internal::compiler::WasmGraphBuilder::mcgraph ( )
inline

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

Here is the caller graph for this function:

◆ NoContextConstant()

Node * v8::internal::compiler::WasmGraphBuilder::NoContextConstant ( )
protected

Definition at line 266 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Param()

Node * v8::internal::compiler::WasmGraphBuilder::Param ( int index,
const char * debug_name = nullptr )

Definition at line 247 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Return() [1/2]

Node * v8::internal::compiler::WasmGraphBuilder::Return ( base::Vector< Node * > nodes)

Definition at line 299 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Return() [2/2]

template<typename... Nodes>
Node * v8::internal::compiler::WasmGraphBuilder::Return ( Node * fst,
Nodes *... more )
inline

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

Here is the call graph for this function:

◆ SetControl()

Node * v8::internal::compiler::WasmGraphBuilder::SetControl ( Node * node)

Definition at line 336 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEffect()

Node * v8::internal::compiler::WasmGraphBuilder::SetEffect ( Node * node)

Definition at line 331 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEffectControl() [1/2]

void v8::internal::compiler::WasmGraphBuilder::SetEffectControl ( Node * effect,
Node * control )

Definition at line 341 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetEffectControl() [2/2]

Node * v8::internal::compiler::WasmGraphBuilder::SetEffectControl ( Node * effect_and_control)
inline

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

Here is the call graph for this function:

◆ SetSourcePosition()

void v8::internal::compiler::WasmGraphBuilder::SetSourcePosition ( Node * node,
wasm::WasmCodePosition position )

Definition at line 564 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetType()

Node * v8::internal::compiler::WasmGraphBuilder::SetType ( Node * node,
wasm::ValueType type )

Definition at line 621 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ Start()

void v8::internal::compiler::WasmGraphBuilder::Start ( unsigned params)

Definition at line 200 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TerminateThrow()

void v8::internal::compiler::WasmGraphBuilder::TerminateThrow ( Node * effect,
Node * control )

Definition at line 259 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ TryWasmInlining()

bool v8::internal::compiler::WasmGraphBuilder::TryWasmInlining ( int fct_index,
wasm::NativeModule * native_module,
int inlining_id )

Definition at line 145 of file wasm-compiler.cc.

Here is the call graph for this function:

◆ TypeGuard()

Node * v8::internal::compiler::WasmGraphBuilder::TypeGuard ( Node * value,
wasm::ValueType type )

Definition at line 573 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UndefinedValue()

Node * v8::internal::compiler::WasmGraphBuilder::UndefinedValue ( )
protected

Definition at line 279 of file wasm-compiler.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ cached_memory_index_

int v8::internal::compiler::WasmGraphBuilder::cached_memory_index_ = kNoCachedMemoryIndex
protected

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

◆ decorator_

compiler::WasmDecorator* v8::internal::compiler::WasmGraphBuilder::decorator_ = nullptr
protected

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

◆ enabled_features_

wasm::WasmEnabledFeatures v8::internal::compiler::WasmGraphBuilder::enabled_features_
protected

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

◆ env_

wasm::CompilationEnv* const v8::internal::compiler::WasmGraphBuilder::env_
protected

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

◆ function_sig_

const wasm::FunctionSig* const v8::internal::compiler::WasmGraphBuilder::function_sig_
protected

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

◆ gasm_

std::unique_ptr<WasmGraphAssembler> v8::internal::compiler::WasmGraphBuilder::gasm_
protected

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

◆ has_simd_

bool v8::internal::compiler::WasmGraphBuilder::has_simd_ = false
protected

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

◆ inlining_id_

int v8::internal::compiler::WasmGraphBuilder::inlining_id_ = -1
protected

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

◆ instance_data_node_

SetOncePointer<Node> v8::internal::compiler::WasmGraphBuilder::instance_data_node_
protected

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

◆ isolate_

Isolate* const v8::internal::compiler::WasmGraphBuilder::isolate_
protected

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

◆ kNoCachedMemoryIndex

int v8::internal::compiler::WasmGraphBuilder::kNoCachedMemoryIndex = -1
staticconstexprprotected

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

◆ mcgraph_

MachineGraph* const v8::internal::compiler::WasmGraphBuilder::mcgraph_
protected

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

◆ needs_stack_check_

bool v8::internal::compiler::WasmGraphBuilder::needs_stack_check_ = false
protected

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

◆ null_check_strategy_

NullCheckStrategy v8::internal::compiler::WasmGraphBuilder::null_check_strategy_
protected

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

◆ parameter_mode_

const ParameterMode v8::internal::compiler::WasmGraphBuilder::parameter_mode_
protected

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

◆ parameters_

Node** v8::internal::compiler::WasmGraphBuilder::parameters_
protected

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

◆ source_position_table_

compiler::SourcePositionTable* const v8::internal::compiler::WasmGraphBuilder::source_position_table_ = nullptr
protected

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

◆ stack_check_call_operator_

SetOncePointer<const Operator> v8::internal::compiler::WasmGraphBuilder::stack_check_call_operator_
protected

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

◆ stack_check_code_node_

SetOncePointer<Node> v8::internal::compiler::WasmGraphBuilder::stack_check_code_node_
protected

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

◆ wrapper_sig_

const wasm::CanonicalSig* const v8::internal::compiler::WasmGraphBuilder::wrapper_sig_ {nullptr}
protected

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

◆ zone_

Zone* const v8::internal::compiler::WasmGraphBuilder::zone_
protected

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


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