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

#include <graph.h>

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

Public Member Functions

 Graph (Zone *zone)
 
Node * NewNode (const Operator *op, int input_count, Node **inputs)
 
Node * NewNode (const Operator *op)
 
Node * NewNode (const Operator *op, Node *n1)
 
Node * NewNode (const Operator *op, Node *n1, Node *n2)
 
Node * NewNode (const Operator *op, Node *n1, Node *n2, Node *n3)
 
Node * NewNode (const Operator *op, Node *n1, Node *n2, Node *n3, Node *n4)
 
Node * NewNode (const Operator *op, Node *n1, Node *n2, Node *n3, Node *n4, Node *n5)
 
Node * NewNode (const Operator *op, Node *n1, Node *n2, Node *n3, Node *n4, Node *n5, Node *n6)
 
template<class Visitor >
void VisitNodeUsesFrom (Node *node, Visitor *visitor)
 
template<class Visitor >
void VisitNodeUsesFromStart (Visitor *visitor)
 
template<class Visitor >
void VisitNodeInputsFromEnd (Visitor *visitor)
 
void AddDecorator (GraphDecorator *decorator)
 
void RemoveDecorator (GraphDecorator *decorator)
 
- Public Member Functions inherited from v8::internal::compiler::GenericGraph< Node >
 GenericGraph (Zone *zone)
 
Node * start ()
 
Node * end ()
 
void SetStart (Node *start)
 
void SetEnd (Node *end)
 
- Public Member Functions inherited from v8::internal::compiler::GenericGraphBase
 GenericGraphBase (Zone *zone)
 
Zonezone () const
 
NodeId NextNodeID ()
 
NodeId NodeCount () 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)
 

Private Attributes

ZoneVector< GraphDecorator * > decorators_
 

Detailed Description

Definition at line 23 of file graph.h.

Constructor & Destructor Documentation

◆ Graph()

v8::internal::compiler::Graph::Graph ( Zone zone)
explicit

Definition at line 21 of file graph.cc.

21 : GenericGraph<Node>(zone), decorators_(zone) {}
ZoneVector< GraphDecorator * > decorators_
Definition: graph.h:79

Member Function Documentation

◆ AddDecorator()

void v8::internal::compiler::Graph::AddDecorator ( GraphDecorator decorator)
inline

Definition at line 67 of file graph.h.

67  {
68  decorators_.push_back(decorator);
69  }

References decorators_.

Referenced by v8::internal::compiler::Typer::DecorateGraph().

+ Here is the caller graph for this function:

◆ NewNode() [1/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op)
inline

Definition at line 31 of file graph.h.

31  {
32  return NewNode(op, 0, static_cast<Node**>(NULL));
33  }
Node * NewNode(const Operator *op, int input_count, Node **inputs)
Definition: graph.cc:24
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References NewNode(), and NULL.

+ Here is the call graph for this function:

◆ NewNode() [2/8]

Node * v8::internal::compiler::Graph::NewNode ( const Operator op,
int  input_count,
Node **  inputs 
)

Definition at line 24 of file graph.cc.

24  {
25  DCHECK_LE(op->InputCount(), input_count);
26  Node* result = Node::New(this, input_count, inputs);
27  result->Initialize(op);
28  for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin();
29  i != decorators_.end(); ++i) {
30  (*i)->Decorate(result);
31  }
32  return result;
33 }
#define DCHECK_LE(v1, v2)
Definition: logging.h:210

References DCHECK_LE, decorators_, and v8::internal::compiler::Operator::InputCount().

Referenced by v8::internal::compiler::RawMachineAssembler::CallFunctionStub0(), v8::internal::compiler::RawMachineAssembler::CallJS0(), v8::internal::compiler::RawMachineAssembler::CallRuntime1(), v8::internal::compiler::JSBinopReduction::ChangeToPureOperator(), v8::internal::compiler::AstGraphBuilder::Environment::Checkpoint(), v8::internal::compiler::SimplifiedLowering::ComputeIndex(), v8::internal::compiler::JSBinopReduction::ConvertToI32(), v8::internal::compiler::JSBinopReduction::ConvertToNumber(), v8::internal::compiler::JSBinopReduction::ConvertToString(), v8::internal::compiler::JSInliner::CreateArgumentsAdaptorFrameState(), v8::internal::compiler::StructuredGraphBuilder::dead_control(), v8::internal::compiler::AstGraphBuilder::Environment::Environment(), v8::internal::compiler::GraphTest::Float32Constant(), v8::internal::compiler::GraphTest::Float64Constant(), v8::internal::compiler::RepresentationChanger::GetBitRepresentationFor(), v8::internal::compiler::RepresentationChanger::GetFloat32RepresentationFor(), v8::internal::compiler::RepresentationChanger::GetFloat64RepresentationFor(), v8::internal::compiler::CopyVisitor::GetSentinel(), v8::internal::compiler::RepresentationChanger::GetTaggedRepresentationFor(), v8::internal::compiler::RepresentationChanger::GetWord32RepresentationFor(), v8::internal::compiler::GraphTest::HeapConstant(), v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::RepresentationChanger::InsertChangeFloat32ToFloat64(), v8::internal::compiler::BasicBlockInstrumentor::Instrument(), v8::internal::compiler::GraphTest::Int32Constant(), v8::internal::compiler::GraphTest::Int64Constant(), v8::internal::compiler::SimplifiedLowering::IsTagged(), v8::internal::compiler::RawMachineAssembler::MakeNode(), v8::internal::compiler::StructuredGraphBuilder::MakeNode(), v8::internal::compiler::StructuredGraphBuilder::Environment::Merge(), v8::internal::compiler::StructuredGraphBuilder::MergeControl(), v8::internal::compiler::StructuredGraphBuilder::NewEffectPhi(), NewNode(), v8::internal::compiler::JSGraph::NewNode(), v8::internal::compiler::StructuredGraphBuilder::NewPhi(), v8::internal::compiler::GraphTest::NumberConstant(), v8::internal::compiler::GraphTest::Parameter(), v8::internal::compiler::ChangeLoweringTest::Parameter(), v8::internal::compiler::JSBuiltinReducerTest::Parameter(), v8::internal::compiler::CopyVisitor::Post(), v8::internal::compiler::RawMachineAssembler::RawMachineAssembler(), v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC(), v8::internal::compiler::SimplifiedLowering::SmiTag(), v8::internal::compiler::SimplifiedLowering::StringComparison(), v8::internal::compiler::Inlinee::UnifyReturn(), v8::internal::compiler::SimplifiedLowering::Untag(), and v8::internal::compiler::AstGraphBuilder::Environment::UpdateStateValues().

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

◆ NewNode() [3/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1 
)
inline

Definition at line 34 of file graph.h.

34 { return NewNode(op, 1, &n1); }

References NewNode().

Referenced by NewNode().

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

◆ NewNode() [4/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1,
Node *  n2 
)
inline

Definition at line 35 of file graph.h.

35  {
36  Node* nodes[] = {n1, n2};
37  return NewNode(op, arraysize(nodes), nodes);
38  }
#define arraysize(array)
Definition: macros.h:86

References arraysize, and NewNode().

+ Here is the call graph for this function:

◆ NewNode() [5/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1,
Node *  n2,
Node *  n3 
)
inline

Definition at line 39 of file graph.h.

39  {
40  Node* nodes[] = {n1, n2, n3};
41  return NewNode(op, arraysize(nodes), nodes);
42  }

References arraysize, and NewNode().

+ Here is the call graph for this function:

◆ NewNode() [6/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1,
Node *  n2,
Node *  n3,
Node *  n4 
)
inline

Definition at line 43 of file graph.h.

43  {
44  Node* nodes[] = {n1, n2, n3, n4};
45  return NewNode(op, arraysize(nodes), nodes);
46  }

References arraysize, and NewNode().

+ Here is the call graph for this function:

◆ NewNode() [7/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1,
Node *  n2,
Node *  n3,
Node *  n4,
Node *  n5 
)
inline

Definition at line 47 of file graph.h.

48  {
49  Node* nodes[] = {n1, n2, n3, n4, n5};
50  return NewNode(op, arraysize(nodes), nodes);
51  }

References arraysize, and NewNode().

+ Here is the call graph for this function:

◆ NewNode() [8/8]

Node* v8::internal::compiler::Graph::NewNode ( const Operator op,
Node *  n1,
Node *  n2,
Node *  n3,
Node *  n4,
Node *  n5,
Node *  n6 
)
inline

Definition at line 52 of file graph.h.

53  {
54  Node* nodes[] = {n1, n2, n3, n4, n5, n6};
55  return NewNode(op, arraysize(nodes), nodes);
56  }

References arraysize, and NewNode().

+ Here is the call graph for this function:

◆ RemoveDecorator()

void v8::internal::compiler::Graph::RemoveDecorator ( GraphDecorator decorator)
inline

Definition at line 71 of file graph.h.

71  {
72  ZoneVector<GraphDecorator*>::iterator it =
73  std::find(decorators_.begin(), decorators_.end(), decorator);
74  DCHECK(it != decorators_.end());
75  decorators_.erase(it, it + 1);
76  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, and decorators_.

◆ VisitNodeInputsFromEnd()

template<class Visitor >
void v8::internal::compiler::Graph::VisitNodeInputsFromEnd ( Visitor *  visitor)

Definition at line 30 of file graph-inl.h.

30  {
31  Zone tmp_zone(zone()->isolate());
32  GenericGraphVisit::Visit<Visitor, NodeInputIterationTraits<Node> >(
33  this, &tmp_zone, end(), visitor);
34 }

References v8::internal::compiler::GenericGraph< Node >::end(), and v8::internal::compiler::GenericGraphBase::zone().

Referenced by v8::internal::compiler::CopyVisitor::CopyGraph(), v8::internal::compiler::JSInliner::Inline(), v8::internal::compiler::Scheduler::PrepareUses(), v8::internal::compiler::Verifier::Run(), v8::internal::compiler::Typer::Run(), v8::internal::compiler::Scheduler::ScheduleEarly(), and v8::internal::compiler::JSContextSpecializer::SpecializeToContext().

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

◆ VisitNodeUsesFrom()

template<class Visitor >
void v8::internal::compiler::Graph::VisitNodeUsesFrom ( Node *  node,
Visitor *  visitor 
)

Definition at line 16 of file graph-inl.h.

16  {
17  Zone tmp_zone(zone()->isolate());
18  GenericGraphVisit::Visit<Visitor, NodeUseIterationTraits<Node> >(
19  this, &tmp_zone, node, visitor);
20 }

References v8::internal::compiler::GenericGraphBase::zone().

Referenced by v8::internal::compiler::Typer::Narrow(), VisitNodeUsesFromStart(), and v8::internal::compiler::Typer::Widen().

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

◆ VisitNodeUsesFromStart()

template<class Visitor >
void v8::internal::compiler::Graph::VisitNodeUsesFromStart ( Visitor *  visitor)

Definition at line 24 of file graph-inl.h.

24  {
25  VisitNodeUsesFrom(start(), visitor);
26 }
void VisitNodeUsesFrom(Node *node, Visitor *visitor)
Definition: graph-inl.h:16

References v8::internal::compiler::GenericGraph< Node >::start(), and VisitNodeUsesFrom().

Referenced by v8::internal::compiler::Verifier::Run().

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

Member Data Documentation

◆ decorators_

ZoneVector<GraphDecorator*> v8::internal::compiler::Graph::decorators_
private

Definition at line 79 of file graph.h.

Referenced by AddDecorator(), NewNode(), and RemoveDecorator().


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