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

#include <operator.h>

Inheritance diagram for v8::internal::compiler::Operator:
Collaboration diagram for v8::internal::compiler::Operator:

Public Types

enum  Property {
  kNoProperties = 0 , kCommutative = 1 << 0 , kAssociative = 1 << 1 , kIdempotent = 1 << 2 ,
  kNoRead = 1 << 3 , kNoWrite = 1 << 4 , kNoThrow = 1 << 5 , kNoDeopt = 1 << 6 ,
  kFoldable = kNoRead | kNoWrite , kEliminatable = kNoDeopt | kNoWrite | kNoThrow , kKontrol = kNoDeopt | kFoldable | kNoThrow , kPure = kKontrol | kIdempotent
}
 
enum class  PrintVerbosity { kVerbose , kSilent }
 
using Opcode = uint16_t
 
using Properties = base::Flags<Property, uint8_t>
 

Public Member Functions

 Operator (Opcode opcode, Properties properties, const char *mnemonic, size_t value_in, size_t effect_in, size_t control_in, size_t value_out, size_t effect_out, size_t control_out)
 
 Operator (const Operator &)=delete
 
Operatoroperator= (const Operator &)=delete
 
virtual ~Operator ()=default
 
constexpr Opcode opcode () const
 
const char * mnemonic () const
 
virtual bool Equals (const Operator *that) const
 
virtual size_t HashCode () const
 
bool HasProperty (Property property) const
 
Properties properties () const
 
int ValueInputCount () const
 
int EffectInputCount () const
 
int ControlInputCount () const
 
int ValueOutputCount () const
 
int EffectOutputCount () const
 
int ControlOutputCount () const
 
void PrintTo (std::ostream &os, PrintVerbosity verbose=PrintVerbosity::kVerbose) const
 
void PrintPropsTo (std::ostream &os) const
 

Static Public Member Functions

static size_t ZeroIfEliminatable (Properties properties)
 
static size_t ZeroIfNoThrow (Properties properties)
 
static size_t ZeroIfPure (Properties properties)
 

Protected Member Functions

virtual void PrintToImpl (std::ostream &os, PrintVerbosity verbose) const
 

Private Attributes

const char * mnemonic_
 
Opcode opcode_
 
Properties properties_
 
uint32_t value_in_
 
uint32_t effect_in_
 
uint32_t control_in_
 
uint32_t value_out_
 
uint8_t effect_out_
 
uint32_t control_out_
 

Detailed Description

Definition at line 33 of file operator.h.

Member Typedef Documentation

◆ Opcode

Definition at line 35 of file operator.h.

◆ Properties

Definition at line 60 of file operator.h.

Member Enumeration Documentation

◆ PrintVerbosity

Enumerator
kVerbose 
kSilent 

Definition at line 61 of file operator.h.

◆ Property

Enumerator
kNoProperties 
kCommutative 
kAssociative 
kIdempotent 
kNoRead 
kNoWrite 
kNoThrow 
kNoDeopt 
kFoldable 
kEliminatable 
kKontrol 
kPure 

Definition at line 39 of file operator.h.

Constructor & Destructor Documentation

◆ Operator() [1/2]

v8::internal::compiler::Operator::Operator ( Opcode opcode,
Properties properties,
const char * mnemonic,
size_t value_in,
size_t effect_in,
size_t control_in,
size_t value_out,
size_t effect_out,
size_t control_out )

Definition at line 27 of file operator.cc.

◆ Operator() [2/2]

v8::internal::compiler::Operator::Operator ( const Operator & )
delete

◆ ~Operator()

virtual v8::internal::compiler::Operator::~Operator ( )
virtualdefault

Member Function Documentation

◆ ControlInputCount()

int v8::internal::compiler::Operator::ControlInputCount ( ) const
inline

Definition at line 103 of file operator.h.

Here is the caller graph for this function:

◆ ControlOutputCount()

int v8::internal::compiler::Operator::ControlOutputCount ( ) const
inline

Definition at line 107 of file operator.h.

Here is the caller graph for this function:

◆ EffectInputCount()

int v8::internal::compiler::Operator::EffectInputCount ( ) const
inline

Definition at line 102 of file operator.h.

Here is the caller graph for this function:

◆ EffectOutputCount()

int v8::internal::compiler::Operator::EffectOutputCount ( ) const
inline

Definition at line 106 of file operator.h.

Here is the caller graph for this function:

◆ Equals()

virtual bool v8::internal::compiler::Operator::Equals ( const Operator * that) const
inlinevirtual

◆ HashCode()

virtual size_t v8::internal::compiler::Operator::HashCode ( ) const
inlinevirtual

◆ HasProperty()

bool v8::internal::compiler::Operator::HasProperty ( Property property) const
inline

Definition at line 94 of file operator.h.

Here is the caller graph for this function:

◆ mnemonic()

const char * v8::internal::compiler::Operator::mnemonic ( ) const
inline

Definition at line 79 of file operator.h.

Here is the caller graph for this function:

◆ opcode()

Opcode v8::internal::compiler::Operator::opcode ( ) const
inlineconstexpr

Definition at line 75 of file operator.h.

◆ operator=()

Operator & v8::internal::compiler::Operator::operator= ( const Operator & )
delete

◆ PrintPropsTo()

void v8::internal::compiler::Operator::PrintPropsTo ( std::ostream & os) const

Definition at line 49 of file operator.cc.

◆ PrintTo()

void v8::internal::compiler::Operator::PrintTo ( std::ostream & os,
PrintVerbosity verbose = PrintVerbosity::kVerbose ) const
inline

Definition at line 125 of file operator.h.

Here is the caller graph for this function:

◆ PrintToImpl()

void v8::internal::compiler::Operator::PrintToImpl ( std::ostream & os,
PrintVerbosity verbose ) const
protectedvirtual

Reimplemented in v8::internal::compiler::Operator1< T, Pred, Hash >, v8::internal::compiler::Operator1< AtomicMemoryOrder >, v8::internal::compiler::Operator1< BigIntOperationParameters >, v8::internal::compiler::Operator1< BranchParameters >, v8::internal::compiler::Operator1< CheckFloat64HoleParameters >, v8::internal::compiler::Operator1< CheckForMinusZeroMode >, v8::internal::compiler::Operator1< CheckIfParameters >, v8::internal::compiler::Operator1< CheckMinusZeroParameters >, v8::internal::compiler::Operator1< CheckTaggedInputParameters >, v8::internal::compiler::Operator1< const char * >, v8::internal::compiler::Operator1< ConvertReceiverMode >, v8::internal::compiler::Operator1< DeoptimizeParameters >, v8::internal::compiler::Operator1< GrowFastElementsParameters >, v8::internal::compiler::Operator1< MachineRepresentation >, v8::internal::compiler::Operator1< NumberOperationParameters >, v8::internal::compiler::Operator1< ParameterInfo >, v8::internal::compiler::Operator1< RegionObservability >, v8::internal::compiler::Operator1< ShiftKind >, v8::internal::compiler::Operator1< size_t >, v8::internal::compiler::Operator1< SparseInputMask >, v8::internal::compiler::Operator1< StackCheckKind >, v8::internal::compiler::Operator1< StackSlotRepresentation >, v8::internal::compiler::Operator1< StoreRepresentation >, and v8::internal::compiler::Operator1< TruncateKind >.

Definition at line 45 of file operator.cc.

Here is the call graph for this function:

◆ properties()

Properties v8::internal::compiler::Operator::properties ( ) const
inline

Definition at line 98 of file operator.h.

Here is the caller graph for this function:

◆ ValueInputCount()

int v8::internal::compiler::Operator::ValueInputCount ( ) const
inline

Definition at line 101 of file operator.h.

Here is the caller graph for this function:

◆ ValueOutputCount()

int v8::internal::compiler::Operator::ValueOutputCount ( ) const
inline

Definition at line 105 of file operator.h.

Here is the caller graph for this function:

◆ ZeroIfEliminatable()

static size_t v8::internal::compiler::Operator::ZeroIfEliminatable ( Properties properties)
inlinestatic

Definition at line 109 of file operator.h.

◆ ZeroIfNoThrow()

static size_t v8::internal::compiler::Operator::ZeroIfNoThrow ( Properties properties)
inlinestatic

Definition at line 113 of file operator.h.

◆ ZeroIfPure()

static size_t v8::internal::compiler::Operator::ZeroIfPure ( Properties properties)
inlinestatic

Definition at line 117 of file operator.h.

Member Data Documentation

◆ control_in_

uint32_t v8::internal::compiler::Operator::control_in_
private

Definition at line 143 of file operator.h.

◆ control_out_

uint32_t v8::internal::compiler::Operator::control_out_
private

Definition at line 146 of file operator.h.

◆ effect_in_

uint32_t v8::internal::compiler::Operator::effect_in_
private

Definition at line 142 of file operator.h.

◆ effect_out_

uint8_t v8::internal::compiler::Operator::effect_out_
private

Definition at line 145 of file operator.h.

◆ mnemonic_

const char* v8::internal::compiler::Operator::mnemonic_
private

Definition at line 138 of file operator.h.

◆ opcode_

Opcode v8::internal::compiler::Operator::opcode_
private

Definition at line 139 of file operator.h.

◆ properties_

Properties v8::internal::compiler::Operator::properties_
private

Definition at line 140 of file operator.h.

◆ value_in_

uint32_t v8::internal::compiler::Operator::value_in_
private

Definition at line 141 of file operator.h.

◆ value_out_

uint32_t v8::internal::compiler::Operator::value_out_
private

Definition at line 144 of file operator.h.


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