V8 Project
v8::internal::compiler::Operator1< T > Class Template Reference

#include <operator.h>

+ Inheritance diagram for v8::internal::compiler::Operator1< T >:
+ Collaboration diagram for v8::internal::compiler::Operator1< T >:

Public Member Functions

 Operator1 (Opcode opcode, Properties properties, int input_count, int output_count, const char *mnemonic, T parameter)
 
const Tparameter () const
 
virtual bool Equals (const Operator *other) const OVERRIDE
 
virtual int HashCode () const OVERRIDE
 
virtual int InputCount () const OVERRIDE
 
virtual int OutputCount () const OVERRIDE
 
virtual OStreamPrintParameter (OStream &os) const
 
- Public Member Functions inherited from v8::internal::compiler::Operator
 Operator (Opcode opcode, Properties properties, const char *mnemonic)
 
virtual ~Operator ()
 
Opcode opcode () const
 
const char * mnemonic () const
 
bool HasProperty (Property property) const
 
Properties properties () const
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Protected Member Functions

virtual OStreamPrintTo (OStream &os) const FINAL
 

Private Attributes

int input_count_
 
int output_count_
 
T parameter_
 

Additional Inherited Members

- Public Types inherited from v8::internal::compiler::Operator
enum  Property {
  kNoProperties = 0 , kReducible = 1 << 0 , kCommutative = 1 << 1 , kAssociative = 1 << 2 ,
  kIdempotent = 1 << 3 , kNoRead = 1 << 4 , kNoWrite = 1 << 5 , kNoThrow = 1 << 6 ,
  kFoldable = kNoRead | kNoWrite , kEliminatable = kNoWrite | kNoThrow , kPure = kNoRead | kNoWrite | kNoThrow | kIdempotent
}
 
typedef uint8_t Opcode
 
typedef base::Flags< Property, uint8_t > Properties
 

Detailed Description

template<typename T>
class v8::internal::compiler::Operator1< T >

Definition at line 215 of file operator.h.

Constructor & Destructor Documentation

◆ Operator1()

template<typename T >
v8::internal::compiler::Operator1< T >::Operator1 ( Opcode  opcode,
Properties  properties,
int  input_count,
int  output_count,
const char *  mnemonic,
T  parameter 
)
inline

Definition at line 217 of file operator.h.

220  input_count_(input_count),
221  output_count_(output_count),
const T & parameter() const
Definition: operator.h:224
Properties properties() const
Definition: operator.h:84
const char * mnemonic() const
Definition: operator.h:61
Operator(Opcode opcode, Properties properties, const char *mnemonic)
Definition: operator.h:50

Member Function Documentation

◆ Equals()

template<typename T >
virtual bool v8::internal::compiler::Operator1< T >::Equals ( const Operator other) const
inlinevirtual

Implements v8::internal::compiler::Operator.

Definition at line 226 of file operator.h.

226  {
227  if (opcode() != other->opcode()) return false;
228  const Operator1<T>* that = static_cast<const Operator1<T>*>(other);
229  return StaticParameterTraits<T>::Equals(this->parameter_, that->parameter_);
230  }

References v8::internal::compiler::StaticParameterTraits< T >::Equals(), v8::internal::compiler::Operator::opcode(), and v8::internal::compiler::Operator1< T >::parameter_.

+ Here is the call graph for this function:

◆ HashCode()

template<typename T >
virtual int v8::internal::compiler::Operator1< T >::HashCode ( ) const
inlinevirtual

Implements v8::internal::compiler::Operator.

Definition at line 231 of file operator.h.

231  {
233  }

References v8::internal::compiler::StaticParameterTraits< T >::HashCode(), v8::internal::compiler::Operator::opcode(), and v8::internal::compiler::Operator1< T >::parameter_.

+ Here is the call graph for this function:

◆ InputCount()

template<typename T >
virtual int v8::internal::compiler::Operator1< T >::InputCount ( ) const
inlinevirtual

Implements v8::internal::compiler::Operator.

Definition at line 234 of file operator.h.

234 { return input_count_; }

References v8::internal::compiler::Operator1< T >::input_count_.

◆ OutputCount()

template<typename T >
virtual int v8::internal::compiler::Operator1< T >::OutputCount ( ) const
inlinevirtual

Implements v8::internal::compiler::Operator.

Definition at line 235 of file operator.h.

235 { return output_count_; }

References v8::internal::compiler::Operator1< T >::output_count_.

◆ parameter()

template<typename T >
const T& v8::internal::compiler::Operator1< T >::parameter ( ) const
inline

Definition at line 224 of file operator.h.

224 { return parameter_; }

References v8::internal::compiler::Operator1< T >::parameter_.

◆ PrintParameter()

template<typename T >
virtual OStream& v8::internal::compiler::Operator1< T >::PrintParameter ( OStream os) const
inlinevirtual

Reimplemented in v8::internal::compiler::anonymous_namespace{common-operator.cc}::ControlOperator.

Definition at line 236 of file operator.h.

236  { // NOLINT
237  return StaticParameterTraits<T>::PrintTo(os << "[", parameter_) << "]";
238  }
static OStream & PrintTo(OStream &os, T val)
Definition: operator.h:136

References v8::internal::compiler::Operator1< T >::parameter_, and v8::internal::compiler::StaticParameterTraits< T >::PrintTo().

Referenced by v8::internal::compiler::Operator1< T >::PrintTo().

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

◆ PrintTo()

template<typename T >
virtual OStream& v8::internal::compiler::Operator1< T >::PrintTo ( OStream os) const
inlineprotectedvirtual

Implements v8::internal::compiler::Operator.

Definition at line 241 of file operator.h.

241  { // NOLINT
242  return PrintParameter(os << mnemonic());
243  }
virtual OStream & PrintParameter(OStream &os) const
Definition: operator.h:236

References v8::internal::compiler::Operator::mnemonic(), and v8::internal::compiler::Operator1< T >::PrintParameter().

+ Here is the call graph for this function:

Member Data Documentation

◆ input_count_

template<typename T >
int v8::internal::compiler::Operator1< T >::input_count_
private

Definition at line 246 of file operator.h.

Referenced by v8::internal::compiler::Operator1< T >::InputCount().

◆ output_count_

template<typename T >
int v8::internal::compiler::Operator1< T >::output_count_
private

Definition at line 247 of file operator.h.

Referenced by v8::internal::compiler::Operator1< T >::OutputCount().

◆ parameter_


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