V8 Project
v8::internal::compiler::ValueMatcher< T, kOpcode > Struct Template Reference

#include <node-matchers.h>

+ Inheritance diagram for v8::internal::compiler::ValueMatcher< T, kOpcode >:
+ Collaboration diagram for v8::internal::compiler::ValueMatcher< T, kOpcode >:

Public Member Functions

 ValueMatcher (Node *node)
 
bool HasValue () const
 
const TValue () const
 
bool Is (const T &value) const
 
bool IsInRange (const T &low, const T &high) const
 
- Public Member Functions inherited from v8::internal::compiler::NodeMatcher
 NodeMatcher (Node *node)
 
Node * node () const
 
const Operatorop () const
 
IrOpcode::Value opcode () const
 
bool HasProperty (Operator::Property property) const
 
Node * InputAt (int index) const
 

Private Attributes

T value_
 
bool has_value_
 

Detailed Description

template<typename T, IrOpcode::Value kOpcode>
struct v8::internal::compiler::ValueMatcher< T, kOpcode >

Definition at line 40 of file node-matchers.h.

Constructor & Destructor Documentation

◆ ValueMatcher()

template<typename T , IrOpcode::Value kOpcode>
v8::internal::compiler::ValueMatcher< T, kOpcode >::ValueMatcher ( Node *  node)
inlineexplicit

Definition at line 41 of file node-matchers.h.

References v8::internal::compiler::ValueMatcher< T, kOpcode >::has_value_, v8::internal::compiler::NodeMatcher::node(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::value_.

+ Here is the call graph for this function:

Member Function Documentation

◆ HasValue()

template<typename T , IrOpcode::Value kOpcode>
bool v8::internal::compiler::ValueMatcher< T, kOpcode >::HasValue ( ) const
inline

Definition at line 48 of file node-matchers.h.

48 { return has_value_; }

References v8::internal::compiler::ValueMatcher< T, kOpcode >::has_value_.

Referenced by v8::internal::compiler::ValueMatcher< T, kOpcode >::Is(), v8::internal::compiler::ValueMatcher< T, kOpcode >::IsInRange(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::Value().

+ Here is the caller graph for this function:

◆ Is()

template<typename T , IrOpcode::Value kOpcode>
bool v8::internal::compiler::ValueMatcher< T, kOpcode >::Is ( const T value) const
inline

Definition at line 54 of file node-matchers.h.

54  {
55  return this->HasValue() && this->Value() == value;
56  }

References v8::internal::compiler::ValueMatcher< T, kOpcode >::HasValue(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::Value().

+ Here is the call graph for this function:

◆ IsInRange()

template<typename T , IrOpcode::Value kOpcode>
bool v8::internal::compiler::ValueMatcher< T, kOpcode >::IsInRange ( const T low,
const T high 
) const
inline

Definition at line 58 of file node-matchers.h.

58  {
59  return this->HasValue() && low <= this->Value() && this->Value() <= high;
60  }

References v8::internal::compiler::ValueMatcher< T, kOpcode >::HasValue(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::Value().

+ Here is the call graph for this function:

◆ Value()

template<typename T , IrOpcode::Value kOpcode>
const T& v8::internal::compiler::ValueMatcher< T, kOpcode >::Value ( ) const
inline

Definition at line 49 of file node-matchers.h.

49  {
50  DCHECK(HasValue());
51  return value_;
52  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::compiler::ValueMatcher< T, kOpcode >::HasValue(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::value_.

Referenced by v8::internal::compiler::ValueMatcher< T, kOpcode >::Is(), and v8::internal::compiler::ValueMatcher< T, kOpcode >::IsInRange().

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

Member Data Documentation

◆ has_value_

template<typename T , IrOpcode::Value kOpcode>
bool v8::internal::compiler::ValueMatcher< T, kOpcode >::has_value_
private

◆ value_

template<typename T , IrOpcode::Value kOpcode>
T v8::internal::compiler::ValueMatcher< T, kOpcode >::value_
private

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