V8 Project
v8::internal::compiler::GraphTest Class Reference

#include <graph-unittest.h>

+ Inheritance diagram for v8::internal::compiler::GraphTest:
+ Collaboration diagram for v8::internal::compiler::GraphTest:

Public Member Functions

 GraphTest (int parameters=1)
 
virtual ~GraphTest ()
 
- Public Member Functions inherited from v8::TestWithContext
 TestWithContext ()
 
virtual ~TestWithContext ()
 
const Local< Context > & context () const
 
- Public Member Functions inherited from v8::TestWithIsolate
 TestWithIsolate ()
 
Isolateisolate () const
 
- Public Member Functions inherited from v8::internal::TestWithZone
 TestWithZone ()
 
virtual ~TestWithZone ()
 
Zonezone ()
 
- Public Member Functions inherited from v8::internal::TestWithIsolate
 TestWithIsolate ()
 
virtual ~TestWithIsolate ()
 
Factory * factory () const
 
Isolateisolate () const
 

Protected Member Functions

Node * Parameter (int32_t index)
 
Node * Float32Constant (volatile float value)
 
Node * Float64Constant (volatile double value)
 
Node * Int32Constant (int32_t value)
 
Node * Int64Constant (int64_t value)
 
Node * NumberConstant (volatile double value)
 
Node * HeapConstant (const Unique< HeapObject > &value)
 
Node * FalseConstant ()
 
Node * TrueConstant ()
 
Matcher< Node * > IsFalseConstant ()
 
Matcher< Node * > IsTrueConstant ()
 
CommonOperatorBuilder * common ()
 
Graphgraph ()
 

Private Attributes

CommonOperatorBuilder common_
 
Graph graph_
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::TestWithIsolate
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 

Detailed Description

Definition at line 27 of file graph-unittest.h.

Constructor & Destructor Documentation

◆ GraphTest()

v8::internal::compiler::GraphTest::GraphTest ( int  parameters = 1)
explicit

Definition at line 34 of file graph-unittest.cc.

34  : common_(zone()), graph_(zone()) {
35  graph()->SetStart(graph()->NewNode(common()->Start(num_parameters)));
36 }
CommonOperatorBuilder * common()
CommonOperatorBuilder common_

References common(), graph(), and v8::internal::compiler::GenericGraph< V >::SetStart().

+ Here is the call graph for this function:

◆ ~GraphTest()

v8::internal::compiler::GraphTest::~GraphTest ( )
virtual

Definition at line 39 of file graph-unittest.cc.

39 {}

Member Function Documentation

◆ common()

CommonOperatorBuilder* v8::internal::compiler::GraphTest::common ( )
inlineprotected

◆ FalseConstant()

Node * v8::internal::compiler::GraphTest::FalseConstant ( )
protected

Definition at line 77 of file graph-unittest.cc.

77  {
78  return HeapConstant(
80 }
Factory * factory() const
Definition: test-utils.cc:52
static Unique< T > CreateImmovable(Handle< T > handle)
Definition: unique.h:116
Node * HeapConstant(const Unique< HeapObject > &value)

References v8::internal::TestWithIsolate::factory(), and HeapConstant().

+ Here is the call graph for this function:

◆ Float32Constant()

Node * v8::internal::compiler::GraphTest::Float32Constant ( volatile float  value)
protected

Definition at line 47 of file graph-unittest.cc.

47  {
48  return graph()->NewNode(common()->Float32Constant(value));
49 }
Node * Float32Constant(volatile float value)
Node * NewNode(const Operator *op, int input_count, Node **inputs)
Definition: graph.cc:24

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ Float64Constant()

Node * v8::internal::compiler::GraphTest::Float64Constant ( volatile double  value)
protected

Definition at line 52 of file graph-unittest.cc.

52  {
53  return graph()->NewNode(common()->Float64Constant(value));
54 }
Node * Float64Constant(volatile double value)

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ graph()

◆ HeapConstant()

Node * v8::internal::compiler::GraphTest::HeapConstant ( const Unique< HeapObject > &  value)
protected

Definition at line 72 of file graph-unittest.cc.

72  {
73  return graph()->NewNode(common()->HeapConstant(value));
74 }

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

Referenced by FalseConstant(), TrueConstant(), and v8::internal::compiler::JSBuiltinReducerTest::UndefinedConstant().

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

◆ Int32Constant()

Node * v8::internal::compiler::GraphTest::Int32Constant ( int32_t  value)
protected

Definition at line 57 of file graph-unittest.cc.

57  {
58  return graph()->NewNode(common()->Int32Constant(value));
59 }
Node * Int32Constant(int32_t value)

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ Int64Constant()

Node * v8::internal::compiler::GraphTest::Int64Constant ( int64_t  value)
protected

Definition at line 62 of file graph-unittest.cc.

62  {
63  return graph()->NewNode(common()->Int64Constant(value));
64 }
Node * Int64Constant(int64_t value)

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ IsFalseConstant()

Matcher< Node * > v8::internal::compiler::GraphTest::IsFalseConstant ( )
protected

Definition at line 89 of file graph-unittest.cc.

89  {
90  return IsHeapConstant(
92 }
Matcher< Node * > IsHeapConstant(const Matcher< Unique< HeapObject > > &value_matcher)

References v8::internal::TestWithIsolate::factory(), and v8::internal::compiler::IsHeapConstant().

+ Here is the call graph for this function:

◆ IsTrueConstant()

Matcher< Node * > v8::internal::compiler::GraphTest::IsTrueConstant ( )
protected

Definition at line 95 of file graph-unittest.cc.

95  {
96  return IsHeapConstant(
98 }

References v8::internal::TestWithIsolate::factory(), and v8::internal::compiler::IsHeapConstant().

+ Here is the call graph for this function:

◆ NumberConstant()

Node * v8::internal::compiler::GraphTest::NumberConstant ( volatile double  value)
protected

Definition at line 67 of file graph-unittest.cc.

67  {
68  return graph()->NewNode(common()->NumberConstant(value));
69 }
Node * NumberConstant(volatile double value)

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ Parameter()

Node * v8::internal::compiler::GraphTest::Parameter ( int32_t  index)
protected

Definition at line 42 of file graph-unittest.cc.

42  {
43  return graph()->NewNode(common()->Parameter(index), graph()->start());
44 }
Node * Parameter(int32_t index)

References common(), graph(), and v8::internal::compiler::Graph::NewNode().

+ Here is the call graph for this function:

◆ TrueConstant()

Node * v8::internal::compiler::GraphTest::TrueConstant ( )
protected

Definition at line 83 of file graph-unittest.cc.

83  {
84  return HeapConstant(
86 }

References v8::internal::TestWithIsolate::factory(), and HeapConstant().

+ Here is the call graph for this function:

Member Data Documentation

◆ common_

CommonOperatorBuilder v8::internal::compiler::GraphTest::common_
private

Definition at line 50 of file graph-unittest.h.

Referenced by common().

◆ graph_

Graph v8::internal::compiler::GraphTest::graph_
private

Definition at line 51 of file graph-unittest.h.

Referenced by graph().


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