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

#include <maglev-ir.h>

Inheritance diagram for v8::internal::maglev::Switch:
Collaboration diagram for v8::internal::maglev::Switch:

Public Member Functions

 Switch (uint64_t bitfield, int value_base, BasicBlockRef *targets, int size)
 
 Switch (uint64_t bitfield, int value_base, BasicBlockRef *targets, int size, BasicBlockRef *fallthrough)
 
int value_base () const
 
BasicBlockReftargets () const
 
int size () const
 
bool has_fallthrough () const
 
BasicBlockfallthrough () const
 
void set_fallthrough (BasicBlock *fallthrough)
 
Inputvalue ()
 
void SetValueLocationConstraints ()
 
void GenerateCode (MaglevAssembler *, const ProcessingState &)
 
void PrintParams (std::ostream &, MaglevGraphLabeller *) const
 
- Public Member Functions inherited from v8::internal::maglev::FixedInputNodeTMixin< 1, ConditionalControlNode, Switch >
constexpr bool has_inputs () const
 
constexpr uint16_t input_count () const
 
constexpr auto end ()
 
void VerifyInputs (MaglevGraphLabeller *graph_labeller) const
 
- Public Member Functions inherited from v8::internal::maglev::NodeTMixin< ConditionalControlNode, Switch >
constexpr Opcode opcode () const
 
constexpr const OpPropertiesproperties () const
 
- Public Member Functions inherited from v8::internal::maglev::ConditionalControlNode
 ConditionalControlNode (uint64_t bitfield)
 
- Public Member Functions inherited from v8::internal::maglev::ControlNode
ControlNodenext_post_dominating_hole () const
 
void set_next_post_dominating_hole (ControlNode *node)
 
- Public Member Functions inherited from v8::internal::maglev::NodeBase
constexpr Opcode opcode () const
 
constexpr OpProperties properties () const
 
void set_properties (OpProperties properties)
 
void set_input (int index, ValueNode *node)
 
template<class T >
constexpr bool Is () const
 
template<class T >
constexpr TCast ()
 
template<class T >
constexpr const TCast () const
 
template<class T >
constexpr TTryCast ()
 
template<class T >
constexpr const TTryCast () const
 
constexpr bool has_inputs () const
 
constexpr int input_count () const
 
constexpr Inputinput (int index)
 
constexpr const Inputinput (int index) const
 
std::optional< int32_t > TryGetInt32ConstantInput (int index)
 
constexpr auto begin ()
 
constexpr auto end ()
 
constexpr bool has_id () const
 
constexpr NodeIdT id () const
 
void set_id (NodeIdT id)
 
template<typename RegisterT >
uint8_t num_temporaries_needed () const
 
template<typename RegisterT >
RegListBase< RegisterT > & temporaries ()
 
RegListgeneral_temporaries ()
 
DoubleRegListdouble_temporaries ()
 
template<typename RegisterT >
void assign_temporaries (RegListBase< RegisterT > list)
 
template<typename Function >
void ForAllInputsInRegallocAssignmentOrder (Function &&f)
 
void Print (std::ostream &os, MaglevGraphLabeller *, bool skip_targets=false) const
 
void Print () const
 
EagerDeoptInfoeager_deopt_info ()
 
LazyDeoptInfolazy_deopt_info ()
 
const RegisterSnapshotregister_snapshot () const
 
ExceptionHandlerInfoexception_handler_info ()
 
void set_register_snapshot (RegisterSnapshot snapshot)
 
void change_input (int index, ValueNode *node)
 
void change_representation (ValueRepresentation new_repr)
 
void set_opcode (Opcode new_opcode)
 
void CopyEagerDeoptInfoOf (NodeBase *other, Zone *zone)
 
void SetEagerDeoptInfo (Zone *zone, DeoptFrame deopt_frame, compiler::FeedbackSource feedback_to_update=compiler::FeedbackSource())
 
template<typename NodeT >
void OverwriteWith ()
 
void OverwriteWith (Opcode new_opcode, std::optional< OpProperties > maybe_new_properties=std::nullopt)
 
void OverwriteWithIdentityTo (ValueNode *node)
 
auto options () const
 
void ClearUnstableNodeAspects (KnownNodeAspects &)
 
void ClearElementsProperties (KnownNodeAspects &)
 
void set_owner (BasicBlock *block)
 
BasicBlockowner () const
 
void InitTemporaries ()
 
template<>
constexpr bool Is () const
 
template<>
constexpr bool Is () const
 
template<>
constexpr bool Is () const
 
template<>
constexpr bool Is () const
 
template<>
constexpr bool Is () const
 
template<>
constexpr bool Is () const
 
- Public Member Functions inherited from v8::internal::ZoneObject
void * operator new (size_t, Zone *)=delete
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)=delete
 

Static Public Attributes

static constexpr Base::InputTypes kInputTypes {ValueRepresentation::kInt32}
 
- Static Public Attributes inherited from v8::internal::maglev::FixedInputNodeTMixin< 1, ConditionalControlNode, Switch >
static constexpr size_t kInputCount
 
- Static Public Attributes inherited from v8::internal::maglev::NodeBase
template<class T >
static constexpr Opcode opcode_of = detail::opcode_of_helper<T>::value
 
static constexpr OpProperties kProperties
 

Private Types

using Base = FixedInputNodeTMixin<1, ConditionalControlNode, Switch>
 

Private Attributes

const int value_base_
 
BasicBlockReftargets_
 
const int size_
 
std::optional< BasicBlockReffallthrough_
 

Additional Inherited Members

- Public Types inherited from v8::internal::maglev::NodeBase
enum class  InputAllocationPolicy { kFixedRegister , kArbitraryRegister , kAny }
 
- Static Public Member Functions inherited from v8::internal::maglev::NodeTMixin< ConditionalControlNode, Switch >
static SwitchNew (Zone *zone, std::initializer_list< ValueNode * > inputs, Args &&... args)
 
static SwitchNew (Zone *zone, size_t input_count, Args &&... args)
 
- Static Public Member Functions inherited from v8::internal::maglev::NodeBase
template<class Derived , typename... Args>
static Derived * New (Zone *zone, std::initializer_list< ValueNode * > inputs, Args &&... args)
 
template<class Derived , typename... Args>
static Derived * New (Zone *zone, size_t input_count, Args &&... args)
 
- Protected Types inherited from v8::internal::maglev::FixedInputNodeTMixin< 1, ConditionalControlNode, Switch >
using InputTypes
 
- Protected Types inherited from v8::internal::maglev::NodeBase
using ReservedField = InputCountField::Next<bool, 1>
 
template<class T , int size>
using NextBitField = ReservedField::Next<T, size>
 
- Protected Member Functions inherited from v8::internal::maglev::FixedInputNodeTMixin< 1, ConditionalControlNode, Switch >
 FixedInputNodeTMixin (uint64_t bitfield, Args &&... args)
 
- Protected Member Functions inherited from v8::internal::maglev::NodeTMixin< ConditionalControlNode, Switch >
 NodeTMixin (uint64_t bitfield, Args &&... args)
 
- Protected Member Functions inherited from v8::internal::maglev::ControlNode
 NodeBase (uint64_t bitfield)
 
- Protected Member Functions inherited from v8::internal::maglev::NodeBase
 NodeBase (uint64_t bitfield)
 
constexpr uint64_t bitfield () const
 
void set_bitfield (uint64_t new_bitfield)
 
constexpr Inputinput_base ()
 
constexpr const Inputinput_base () const
 
Inputlast_input ()
 
const Inputlast_input () const
 
Address last_input_address () const
 
void initialize_input_null (int index)
 
void reduce_input_count (int num=1)
 
void set_temporaries_needed (uint8_t value)
 
void set_double_temporaries_needed (uint8_t value)
 
void RequireSpecificTemporary (Register reg)
 
void RequireSpecificDoubleTemporary (DoubleRegister reg)
 
- Protected Attributes inherited from v8::internal::maglev::FixedInputNodeTMixin< 1, ConditionalControlNode, Switch >
detail::YouNeedToDefineAnInputTypesArrayInYourDerivedClass kInputTypes
 
- Static Protected Attributes inherited from v8::internal::maglev::NodeBase
static constexpr int kMaxInputs = InputCountField::kMax
 

Detailed Description

Definition at line 10980 of file maglev-ir.h.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ Switch() [1/2]

v8::internal::maglev::Switch::Switch ( uint64_t bitfield,
int value_base,
BasicBlockRef * targets,
int size )
inlineexplicit

Definition at line 10984 of file maglev-ir.h.

◆ Switch() [2/2]

v8::internal::maglev::Switch::Switch ( uint64_t bitfield,
int value_base,
BasicBlockRef * targets,
int size,
BasicBlockRef * fallthrough )
inlineexplicit

Definition at line 10992 of file maglev-ir.h.

Member Function Documentation

◆ fallthrough()

BasicBlock * v8::internal::maglev::Switch::fallthrough ( ) const
inline

Definition at line 11008 of file maglev-ir.h.

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

◆ GenerateCode()

void v8::internal::maglev::Switch::GenerateCode ( MaglevAssembler * ,
const ProcessingState &  )

◆ has_fallthrough()

bool v8::internal::maglev::Switch::has_fallthrough ( ) const
inline

Definition at line 11007 of file maglev-ir.h.

Here is the caller graph for this function:

◆ PrintParams()

void v8::internal::maglev::Switch::PrintParams ( std::ostream & ,
MaglevGraphLabeller *  ) const
inline

Definition at line 11022 of file maglev-ir.h.

◆ set_fallthrough()

void v8::internal::maglev::Switch::set_fallthrough ( BasicBlock * fallthrough)
inline

Definition at line 11013 of file maglev-ir.h.

Here is the call graph for this function:

◆ SetValueLocationConstraints()

void v8::internal::maglev::Switch::SetValueLocationConstraints ( )

◆ size()

int v8::internal::maglev::Switch::size ( ) const
inline

Definition at line 11005 of file maglev-ir.h.

Here is the caller graph for this function:

◆ targets()

BasicBlockRef * v8::internal::maglev::Switch::targets ( ) const
inline

Definition at line 11004 of file maglev-ir.h.

Here is the caller graph for this function:

◆ value()

Input & v8::internal::maglev::Switch::value ( )
inline

Definition at line 11018 of file maglev-ir.h.

Here is the call graph for this function:

◆ value_base()

int v8::internal::maglev::Switch::value_base ( ) const
inline

Definition at line 11003 of file maglev-ir.h.

Member Data Documentation

◆ fallthrough_

std::optional<BasicBlockRef> v8::internal::maglev::Switch::fallthrough_
private

Definition at line 11028 of file maglev-ir.h.

◆ kInputTypes

Base::InputTypes v8::internal::maglev::Switch::kInputTypes {ValueRepresentation::kInt32}
staticconstexpr

Definition at line 11001 of file maglev-ir.h.

◆ size_

const int v8::internal::maglev::Switch::size_
private

Definition at line 11027 of file maglev-ir.h.

◆ targets_

BasicBlockRef* v8::internal::maglev::Switch::targets_
private

Definition at line 11026 of file maglev-ir.h.

◆ value_base_

const int v8::internal::maglev::Switch::value_base_
private

Definition at line 11025 of file maglev-ir.h.


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