V8 Project
v8::internal::compiler::ChangeLoweringTest Class Referenceabstract
+ Inheritance diagram for v8::internal::compiler::ChangeLoweringTest:
+ Collaboration diagram for v8::internal::compiler::ChangeLoweringTest:

Public Member Functions

 ChangeLoweringTest ()
 
virtual ~ChangeLoweringTest ()
 
virtual MachineType WordRepresentation () const =0
 
- Public Member Functions inherited from v8::internal::compiler::GraphTest
 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

int HeapNumberValueOffset () const
 
bool Is32 () const
 
int PointerSize () const
 
int SmiMaxValue () const
 
int SmiMinValue () const
 
int SmiShiftAmount () const
 
int SmiShiftSize () const
 
int SmiValueSize () const
 
Node * Parameter (int32_t index=0)
 
Reduction Reduce (Node *node)
 
SimplifiedOperatorBuilder * simplified ()
 
Matcher< Node * > IsAllocateHeapNumber (const Matcher< Node * > &effect_matcher, const Matcher< Node * > &control_matcher)
 
Matcher< Node * > IsWordEqual (const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
 
- Protected Member Functions inherited from v8::internal::compiler::GraphTest
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

SimplifiedOperatorBuilder simplified_
 

Additional Inherited Members

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

Detailed Description

Definition at line 31 of file change-lowering-unittest.cc.

Constructor & Destructor Documentation

◆ ChangeLoweringTest()

v8::internal::compiler::ChangeLoweringTest::ChangeLoweringTest ( )
inline

Definition at line 33 of file change-lowering-unittest.cc.

◆ ~ChangeLoweringTest()

virtual v8::internal::compiler::ChangeLoweringTest::~ChangeLoweringTest ( )
inlinevirtual

Definition at line 34 of file change-lowering-unittest.cc.

34 {}

Member Function Documentation

◆ HeapNumberValueOffset()

int v8::internal::compiler::ChangeLoweringTest::HeapNumberValueOffset ( ) const
inlineprotected

Definition at line 39 of file change-lowering-unittest.cc.

39  {
43  }
static const int kValueOffset
Definition: objects.h:1506
STATIC_ASSERT(DoubleRegister::kMaxNumAllocatableRegisters >=Register::kMaxNumAllocatableRegisters)
const int kApiPointerSize
Definition: v8.h:5732
const int kHeapObjectTag
Definition: v8.h:5737

References v8::internal::kApiPointerSize, v8::internal::kHeapObjectTag, v8::internal::HeapNumber::kValueOffset, PointerSize(), and v8::internal::compiler::STATIC_ASSERT().

+ Here is the call graph for this function:

◆ Is32()

bool v8::internal::compiler::ChangeLoweringTest::Is32 ( ) const
inlineprotected

Definition at line 44 of file change-lowering-unittest.cc.

44 { return WordRepresentation() == kRepWord32; }
virtual MachineType WordRepresentation() const =0

References v8::internal::compiler::kRepWord32, and WordRepresentation().

Referenced by IsWordEqual(), SmiShiftSize(), and SmiValueSize().

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

◆ IsAllocateHeapNumber()

Matcher<Node*> v8::internal::compiler::ChangeLoweringTest::IsAllocateHeapNumber ( const Matcher< Node * > &  effect_matcher,
const Matcher< Node * > &  control_matcher 
)
inlineprotected

Definition at line 88 of file change-lowering-unittest.cc.

89  {
90  return IsCall(
92  CEntryStub(isolate(), 1).GetCode())),
93  IsExternalConstant(ExternalReference(
94  Runtime::FunctionForId(Runtime::kAllocateHeapNumber), isolate())),
95  IsInt32Constant(0), IsNumberConstant(0.0), effect_matcher,
96  control_matcher);
97  }
Isolate * isolate() const
Definition: test-utils.h:20
static const Function * FunctionForId(FunctionId id)
Definition: runtime.cc:9312
static Unique< T > CreateImmovable(Handle< T > handle)
Definition: unique.h:116
#define _
Matcher< Node * > IsNumberConstant(const Matcher< double > &value_matcher)
Matcher< Node * > IsInt32Constant(const Matcher< int32_t > &value_matcher)
Matcher< Node * > IsCall(const Matcher< CallDescriptor * > &descriptor_matcher, const Matcher< Node * > &value0_matcher, const Matcher< Node * > &value1_matcher, const Matcher< Node * > &value2_matcher, const Matcher< Node * > &value3_matcher, const Matcher< Node * > &effect_matcher, const Matcher< Node * > &control_matcher)
Matcher< Node * > IsExternalConstant(const Matcher< ExternalReference > &value_matcher)
Matcher< Node * > IsHeapConstant(const Matcher< Unique< HeapObject > > &value_matcher)

References _, v8::internal::Runtime::FunctionForId(), v8::internal::compiler::IsCall(), v8::internal::compiler::IsExternalConstant(), v8::internal::compiler::IsHeapConstant(), v8::internal::compiler::IsInt32Constant(), v8::internal::compiler::IsNumberConstant(), and v8::TestWithIsolate::isolate().

+ Here is the call graph for this function:

◆ IsWordEqual()

Matcher<Node*> v8::internal::compiler::ChangeLoweringTest::IsWordEqual ( const Matcher< Node * > &  lhs_matcher,
const Matcher< Node * > &  rhs_matcher 
)
inlineprotected

Definition at line 98 of file change-lowering-unittest.cc.

99  {
100  return Is32() ? IsWord32Equal(lhs_matcher, rhs_matcher)
101  : IsWord64Equal(lhs_matcher, rhs_matcher);
102  }
Matcher< Node * > IsWord32Equal(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord64Equal(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)

References Is32(), v8::internal::compiler::IsWord32Equal(), and v8::internal::compiler::IsWord64Equal().

+ Here is the call graph for this function:

◆ Parameter()

Node* v8::internal::compiler::ChangeLoweringTest::Parameter ( int32_t  index = 0)
inlineprotected

Definition at line 71 of file change-lowering-unittest.cc.

71  {
72  return graph()->NewNode(common()->Parameter(index), graph()->start());
73  }
CommonOperatorBuilder * common()
Node * NewNode(const Operator *op, int input_count, Node **inputs)
Definition: graph.cc:24

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

+ Here is the call graph for this function:

◆ PointerSize()

int v8::internal::compiler::ChangeLoweringTest::PointerSize ( ) const
inlineprotected

Definition at line 45 of file change-lowering-unittest.cc.

45  {
46  switch (WordRepresentation()) {
47  case kRepWord32:
48  return 4;
49  case kRepWord64:
50  return 8;
51  default:
52  break;
53  }
54  UNREACHABLE();
55  return 0;
56  }
#define UNREACHABLE()
Definition: logging.h:30

References v8::internal::compiler::kRepWord32, v8::internal::compiler::kRepWord64, UNREACHABLE, and WordRepresentation().

Referenced by HeapNumberValueOffset().

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

◆ Reduce()

Reduction v8::internal::compiler::ChangeLoweringTest::Reduce ( Node *  node)
inlineprotected

Definition at line 75 of file change-lowering-unittest.cc.

75  {
76  Typer typer(zone());
77  MachineOperatorBuilder machine(WordRepresentation());
78  JSOperatorBuilder javascript(zone());
79  JSGraph jsgraph(graph(), common(), &javascript, &typer, &machine);
80  CompilationInfo info(isolate(), zone());
81  Linkage linkage(&info);
82  ChangeLowering reducer(&jsgraph, &linkage);
83  return reducer.Reduce(node);
84  }

References v8::internal::compiler::GraphTest::common(), v8::internal::compiler::GraphTest::graph(), v8::TestWithIsolate::isolate(), WordRepresentation(), and v8::internal::TestWithZone::zone().

+ Here is the call graph for this function:

◆ simplified()

SimplifiedOperatorBuilder* v8::internal::compiler::ChangeLoweringTest::simplified ( )
inlineprotected

Definition at line 86 of file change-lowering-unittest.cc.

86 { return &simplified_; }

References simplified_.

◆ SmiMaxValue()

int v8::internal::compiler::ChangeLoweringTest::SmiMaxValue ( ) const
inlineprotected

Definition at line 57 of file change-lowering-unittest.cc.

References SmiMinValue().

+ Here is the call graph for this function:

◆ SmiMinValue()

int v8::internal::compiler::ChangeLoweringTest::SmiMinValue ( ) const
inlineprotected

Definition at line 58 of file change-lowering-unittest.cc.

58  {
59  return static_cast<int>(0xffffffffu << (SmiValueSize() - 1));
60  }

References SmiValueSize().

Referenced by SmiMaxValue().

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

◆ SmiShiftAmount()

int v8::internal::compiler::ChangeLoweringTest::SmiShiftAmount ( ) const
inlineprotected

Definition at line 61 of file change-lowering-unittest.cc.

References v8::internal::kSmiTagSize, and SmiShiftSize().

+ Here is the call graph for this function:

◆ SmiShiftSize()

int v8::internal::compiler::ChangeLoweringTest::SmiShiftSize ( ) const
inlineprotected

Definition at line 62 of file change-lowering-unittest.cc.

62  {
64  : SmiTagging<8>::SmiShiftSize();
65  }
static int SmiShiftSize()
Definition: v8.h:5759

References Is32().

Referenced by SmiShiftAmount().

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

◆ SmiValueSize()

int v8::internal::compiler::ChangeLoweringTest::SmiValueSize ( ) const
inlineprotected

Definition at line 66 of file change-lowering-unittest.cc.

66  {
68  : SmiTagging<8>::SmiValueSize();
69  }
static int SmiValueSize()
Definition: v8.h:5760

References Is32().

Referenced by SmiMinValue().

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

◆ WordRepresentation()

virtual MachineType v8::internal::compiler::ChangeLoweringTest::WordRepresentation ( ) const
pure virtual

Implemented in v8::internal::compiler::ChangeLowering64Test, v8::internal::compiler::ChangeLowering32Test, and v8::internal::compiler::ChangeLoweringCommonTest.

Referenced by Is32(), PointerSize(), and Reduce().

+ Here is the caller graph for this function:

Member Data Documentation

◆ simplified_

SimplifiedOperatorBuilder v8::internal::compiler::ChangeLoweringTest::simplified_
private

Definition at line 105 of file change-lowering-unittest.cc.

Referenced by simplified().


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