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

#include <node-properties.h>

+ Collaboration diagram for v8::internal::compiler::NodeProperties:

Static Public Member Functions

static Node * GetValueInput (Node *node, int index)
 
static Node * GetContextInput (Node *node)
 
static Node * GetFrameStateInput (Node *node)
 
static Node * GetEffectInput (Node *node, int index=0)
 
static Node * GetControlInput (Node *node, int index=0)
 
static int GetFrameStateIndex (Node *node)
 
static bool IsValueEdge (Node::Edge edge)
 
static bool IsContextEdge (Node::Edge edge)
 
static bool IsEffectEdge (Node::Edge edge)
 
static bool IsControlEdge (Node::Edge edge)
 
static bool IsControl (Node *node)
 
static void ReplaceControlInput (Node *node, Node *control)
 
static void ReplaceEffectInput (Node *node, Node *effect, int index=0)
 
static void ReplaceFrameStateInput (Node *node, Node *frame_state)
 
static void RemoveNonValueInputs (Node *node)
 
static void ReplaceWithValue (Node *node, Node *value, Node *effect=NULL)
 
static Bounds GetBounds (Node *node)
 
static void SetBounds (Node *node, Bounds bounds)
 
static int FirstValueIndex (Node *node)
 
static int FirstContextIndex (Node *node)
 
static int FirstFrameStateIndex (Node *node)
 
static int FirstEffectIndex (Node *node)
 
static int FirstControlIndex (Node *node)
 
static int PastValueIndex (Node *node)
 
static int PastContextIndex (Node *node)
 
static int PastFrameStateIndex (Node *node)
 
static int PastEffectIndex (Node *node)
 
static int PastControlIndex (Node *node)
 
static bool IsInputRange (Node::Edge edge, int first, int count)
 

Detailed Description

Definition at line 18 of file node-properties.h.

Member Function Documentation

◆ FirstContextIndex()

int v8::internal::compiler::NodeProperties::FirstContextIndex ( Node *  node)
inlinestatic

Definition at line 29 of file node-properties-inl.h.

29  {
30  return PastValueIndex(node);
31 }

References PastValueIndex().

Referenced by GetContextInput(), IsContextEdge(), PastContextIndex(), and v8::internal::compiler::JSONGraphEdgeWriter::PreEdge().

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

◆ FirstControlIndex()

int v8::internal::compiler::NodeProperties::FirstControlIndex ( Node *  node)
inlinestatic

Definition at line 41 of file node-properties-inl.h.

41  {
42  return PastEffectIndex(node);
43 }

References PastEffectIndex().

Referenced by v8::internal::compiler::Scheduler::ConnectFloatingControlSubgraph(), GetControlInput(), IsControlEdge(), PastControlIndex(), v8::internal::compiler::JSONGraphNodeWriter::Pre(), v8::internal::compiler::JSONGraphEdgeWriter::PreEdge(), v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs(), ReplaceControlInput(), and v8::internal::compiler::CFGBuilder::Run().

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

◆ FirstEffectIndex()

int v8::internal::compiler::NodeProperties::FirstEffectIndex ( Node *  node)
inlinestatic

Definition at line 37 of file node-properties-inl.h.

37  {
38  return PastFrameStateIndex(node);
39 }

References PastFrameStateIndex().

Referenced by GetEffectInput(), IsEffectEdge(), PastEffectIndex(), v8::internal::compiler::JSONGraphEdgeWriter::PreEdge(), v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs(), and ReplaceEffectInput().

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

◆ FirstFrameStateIndex()

int v8::internal::compiler::NodeProperties::FirstFrameStateIndex ( Node *  node)
inlinestatic

Definition at line 33 of file node-properties-inl.h.

33  {
34  return PastContextIndex(node);
35 }

References PastContextIndex().

Referenced by GetFrameStateIndex(), GetFrameStateInput(), PastFrameStateIndex(), v8::internal::compiler::JSONGraphEdgeWriter::PreEdge(), ReplaceFrameStateInput(), and v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC().

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

◆ FirstValueIndex()

int v8::internal::compiler::NodeProperties::FirstValueIndex ( Node *  node)
inlinestatic

Definition at line 27 of file node-properties-inl.h.

27 { return 0; }

Referenced by GetValueInput(), IsValueEdge(), PastValueIndex(), and v8::internal::compiler::JSONGraphEdgeWriter::PreEdge().

+ Here is the caller graph for this function:

◆ GetBounds()

◆ GetContextInput()

Node * v8::internal::compiler::NodeProperties::GetContextInput ( Node *  node)
inlinestatic

Definition at line 81 of file node-properties-inl.h.

81  {
83  return node->InputAt(FirstContextIndex(node));
84 }
static bool HasContextInput(const Operator *op)
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, FirstContextIndex(), and v8::internal::compiler::OperatorProperties::HasContextInput().

Referenced by v8::internal::compiler::JSBinopReduction::context(), v8::internal::compiler::Typer::Visitor::ContextType(), v8::internal::compiler::Verifier::Visitor::Pre(), and v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC().

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

◆ GetControlInput()

Node * v8::internal::compiler::NodeProperties::GetControlInput ( Node *  node,
int  index = 0 
)
inlinestatic

Definition at line 97 of file node-properties-inl.h.

97  {
98  DCHECK(0 <= index &&
99  index < OperatorProperties::GetControlInputCount(node->op()));
100  return node->InputAt(FirstControlIndex(node) + index);
101 }
static int GetControlInputCount(const Operator *op)

References DCHECK, FirstControlIndex(), and v8::internal::compiler::OperatorProperties::GetControlInputCount().

Referenced by v8::internal::compiler::CFGBuilder::ConnectBranch(), v8::internal::compiler::CFGBuilder::ConnectReturn(), v8::internal::compiler::JSBinopReduction::control(), v8::internal::compiler::Inlinee::end_block(), v8::internal::compiler::ScheduleLateNodeVisitor::GetBlockForUse(), v8::internal::compiler::GetControlCluster(), v8::internal::compiler::Scheduler::GetPlacement(), v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::IsLikelyBackEdge(), v8::internal::compiler::anonymous_namespace{graph-unittest.cc}::FINAL< T >::MatchAndExplain(), v8::internal::compiler::StructuredGraphBuilder::MergeEffect(), v8::internal::compiler::StructuredGraphBuilder::MergeValue(), v8::internal::compiler::PrepareUsesVisitor::Pre(), v8::internal::compiler::Verifier::Visitor::Pre(), v8::internal::compiler::GraphVisualizer::PrintEdge(), v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC(), v8::internal::compiler::ScheduleVerifier::Run(), v8::internal::compiler::Inlinee::UnifyReturn(), v8::internal::compiler::Inlinee::unique_return(), and v8::internal::compiler::RepresentationSelector::VisitNode().

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

◆ GetEffectInput()

Node * v8::internal::compiler::NodeProperties::GetEffectInput ( Node *  node,
int  index = 0 
)
inlinestatic

Definition at line 91 of file node-properties-inl.h.

91  {
92  DCHECK(0 <= index &&
93  index < OperatorProperties::GetEffectInputCount(node->op()));
94  return node->InputAt(FirstEffectIndex(node) + index);
95 }
static int GetEffectInputCount(const Operator *op)

References DCHECK, FirstEffectIndex(), and v8::internal::compiler::OperatorProperties::GetEffectInputCount().

Referenced by v8::internal::compiler::JSBinopReduction::effect(), v8::internal::compiler::Inlinee::effect_output(), v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::anonymous_namespace{graph-unittest.cc}::FINAL< T >::MatchAndExplain(), v8::internal::compiler::Verifier::Visitor::Pre(), v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC(), ReplaceWithValue(), and v8::internal::compiler::Inlinee::UnifyReturn().

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

◆ GetFrameStateIndex()

int v8::internal::compiler::NodeProperties::GetFrameStateIndex ( Node *  node)
inlinestatic

Definition at line 103 of file node-properties-inl.h.

103  {
105  return FirstFrameStateIndex(node);
106 }
static bool HasFrameStateInput(const Operator *op)

References DCHECK, FirstFrameStateIndex(), and v8::internal::compiler::OperatorProperties::HasFrameStateInput().

+ Here is the call graph for this function:

◆ GetFrameStateInput()

Node * v8::internal::compiler::NodeProperties::GetFrameStateInput ( Node *  node)
inlinestatic

Definition at line 86 of file node-properties-inl.h.

86  {
88  return node->InputAt(FirstFrameStateIndex(node));
89 }

References DCHECK, FirstFrameStateIndex(), and v8::internal::compiler::OperatorProperties::HasFrameStateInput().

Referenced by v8::internal::compiler::JSCallFunctionAccessor::frame_state(), v8::internal::compiler::Verifier::Visitor::Pre(), v8::internal::compiler::AstGraphBuilder::PrepareFrameState(), and v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC().

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

◆ GetValueInput()

Node * v8::internal::compiler::NodeProperties::GetValueInput ( Node *  node,
int  index 
)
inlinestatic

Definition at line 75 of file node-properties-inl.h.

75  {
76  DCHECK(0 <= index &&
77  index < OperatorProperties::GetValueInputCount(node->op()));
78  return node->InputAt(FirstValueIndex(node) + index);
79 }
static int GetValueInputCount(const Operator *op)

References DCHECK, FirstValueIndex(), and v8::internal::compiler::OperatorProperties::GetValueInputCount().

Referenced by v8::internal::compiler::JSCallReduction::GetBuiltinFunctionId(), v8::internal::compiler::JSCallReduction::GetJSCallInput(), v8::internal::compiler::JSCallReduction::HasBuiltinFunctionId(), v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::JSBinopReduction::left(), v8::internal::compiler::anonymous_namespace{graph-unittest.cc}::FINAL< T >::MatchAndExplain(), v8::internal::compiler::Typer::Visitor::OperandType(), v8::internal::compiler::Verifier::Visitor::Pre(), v8::internal::compiler::JSContextSpecializer::ReduceJSLoadContext(), v8::internal::compiler::JSContextSpecializer::ReduceJSStoreContext(), v8::internal::compiler::JSGenericLowering::ReplaceWithCompareIC(), v8::internal::compiler::JSBinopReduction::right(), v8::internal::compiler::SimplifiedLowering::StringComparison(), v8::internal::compiler::Inlinee::UnifyReturn(), and v8::internal::compiler::Inlinee::value_output().

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

◆ IsContextEdge()

bool v8::internal::compiler::NodeProperties::IsContextEdge ( Node::Edge  edge)
inlinestatic

Definition at line 125 of file node-properties-inl.h.

125  {
126  Node* node = edge.from();
127  return IsInputRange(edge, FirstContextIndex(node),
129 }
static bool IsInputRange(Node::Edge edge, int first, int count)
static int GetContextInputCount(const Operator *op)

References FirstContextIndex(), v8::internal::compiler::OperatorProperties::GetContextInputCount(), and IsInputRange().

Referenced by v8::internal::compiler::GraphVisualizer::PrintEdge().

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

◆ IsControl()

bool v8::internal::compiler::NodeProperties::IsControl ( Node *  node)
inlinestatic

Definition at line 147 of file node-properties-inl.h.

147  {
148  return IrOpcode::IsControlOpcode(node->opcode());
149 }
static bool IsControlOpcode(Value val)
Definition: opcodes.h:280

References v8::internal::compiler::IrOpcode::IsControlOpcode().

Referenced by v8::internal::compiler::GraphVisualizer::AnnotateNode(), v8::internal::compiler::operator<<(), v8::internal::compiler::JSONGraphNodeWriter::Pre(), and v8::internal::compiler::Verifier::Run().

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

◆ IsControlEdge()

bool v8::internal::compiler::NodeProperties::IsControlEdge ( Node::Edge  edge)
inlinestatic

Definition at line 137 of file node-properties-inl.h.

137  {
138  Node* node = edge.from();
139  return IsInputRange(edge, FirstControlIndex(node),
141 }

References FirstControlIndex(), v8::internal::compiler::OperatorProperties::GetControlInputCount(), and IsInputRange().

Referenced by v8::internal::compiler::Scheduler::ConnectFloatingControlSubgraph(), v8::internal::compiler::Inlinee::InlineAtCall(), and v8::internal::compiler::GraphVisualizer::PrintEdge().

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

◆ IsEffectEdge()

bool v8::internal::compiler::NodeProperties::IsEffectEdge ( Node::Edge  edge)
inlinestatic

Definition at line 131 of file node-properties-inl.h.

131  {
132  Node* node = edge.from();
133  return IsInputRange(edge, FirstEffectIndex(node),
135 }

References FirstEffectIndex(), v8::internal::compiler::OperatorProperties::GetEffectInputCount(), and IsInputRange().

Referenced by v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::GraphVisualizer::PrintEdge(), and ReplaceWithValue().

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

◆ IsInputRange()

bool v8::internal::compiler::NodeProperties::IsInputRange ( Node::Edge  edge,
int  first,
int  count 
)
inlinestatic

Definition at line 111 of file node-properties-inl.h.

111  {
112  // TODO(titzer): edge.index() is linear time;
113  // edges maybe need to be marked as value/effect/control.
114  if (num == 0) return false;
115  int index = edge.index();
116  return first <= index && index < first + num;
117 }

Referenced by IsContextEdge(), IsControlEdge(), IsEffectEdge(), and IsValueEdge().

+ Here is the caller graph for this function:

◆ IsValueEdge()

bool v8::internal::compiler::NodeProperties::IsValueEdge ( Node::Edge  edge)
inlinestatic

Definition at line 119 of file node-properties-inl.h.

119  {
120  Node* node = edge.from();
121  return IsInputRange(edge, FirstValueIndex(node),
123 }

References FirstValueIndex(), v8::internal::compiler::OperatorProperties::GetValueInputCount(), and IsInputRange().

Referenced by v8::internal::compiler::Inlinee::InlineAtCall(), and v8::internal::compiler::Verifier::Visitor::Pre().

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

◆ PastContextIndex()

int v8::internal::compiler::NodeProperties::PastContextIndex ( Node *  node)
inlinestatic

Definition at line 51 of file node-properties-inl.h.

51  {
52  return FirstContextIndex(node) +
54 }

References FirstContextIndex(), and v8::internal::compiler::OperatorProperties::GetContextInputCount().

Referenced by FirstFrameStateIndex(), and v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs().

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

◆ PastControlIndex()

int v8::internal::compiler::NodeProperties::PastControlIndex ( Node *  node)
inlinestatic

Definition at line 66 of file node-properties-inl.h.

66  {
67  return FirstControlIndex(node) +
69 }

References FirstControlIndex(), and v8::internal::compiler::OperatorProperties::GetControlInputCount().

Referenced by v8::internal::compiler::Scheduler::ConnectFloatingControlSubgraph(), v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs(), and v8::internal::compiler::CFGBuilder::Run().

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

◆ PastEffectIndex()

int v8::internal::compiler::NodeProperties::PastEffectIndex ( Node *  node)
inlinestatic

Definition at line 61 of file node-properties-inl.h.

61  {
62  return FirstEffectIndex(node) +
64 }

References FirstEffectIndex(), and v8::internal::compiler::OperatorProperties::GetEffectInputCount().

Referenced by FirstControlIndex(), and v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs().

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

◆ PastFrameStateIndex()

int v8::internal::compiler::NodeProperties::PastFrameStateIndex ( Node *  node)
inlinestatic

Definition at line 56 of file node-properties-inl.h.

56  {
57  return FirstFrameStateIndex(node) +
59 }
static int GetFrameStateInputCount(const Operator *op)

References FirstFrameStateIndex(), and v8::internal::compiler::OperatorProperties::GetFrameStateInputCount().

Referenced by FirstEffectIndex().

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

◆ PastValueIndex()

int v8::internal::compiler::NodeProperties::PastValueIndex ( Node *  node)
inlinestatic

Definition at line 46 of file node-properties-inl.h.

46  {
47  return FirstValueIndex(node) +
49 }

References FirstValueIndex(), and v8::internal::compiler::OperatorProperties::GetValueInputCount().

Referenced by FirstContextIndex(), and v8::internal::compiler::RepresentationSelector::ProcessRemainingInputs().

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

◆ RemoveNonValueInputs()

void v8::internal::compiler::NodeProperties::RemoveNonValueInputs ( Node *  node)
inlinestatic

Definition at line 171 of file node-properties-inl.h.

171  {
172  node->TrimInputCount(OperatorProperties::GetValueInputCount(node->op()));
173 }

References v8::internal::compiler::OperatorProperties::GetValueInputCount().

Referenced by v8::internal::compiler::JSBinopReduction::ChangeToPureOperator().

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

◆ ReplaceControlInput()

void v8::internal::compiler::NodeProperties::ReplaceControlInput ( Node *  node,
Node *  control 
)
inlinestatic

Definition at line 155 of file node-properties-inl.h.

155  {
156  node->ReplaceInput(FirstControlIndex(node), control);
157 }

References FirstControlIndex().

+ Here is the call graph for this function:

◆ ReplaceEffectInput()

void v8::internal::compiler::NodeProperties::ReplaceEffectInput ( Node *  node,
Node *  effect,
int  index = 0 
)
inlinestatic

Definition at line 159 of file node-properties-inl.h.

160  {
161  DCHECK(index < OperatorProperties::GetEffectInputCount(node->op()));
162  return node->ReplaceInput(FirstEffectIndex(node) + index, effect);
163 }

References DCHECK, FirstEffectIndex(), and v8::internal::compiler::OperatorProperties::GetEffectInputCount().

Referenced by v8::internal::compiler::JSBinopReduction::update_effect().

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

◆ ReplaceFrameStateInput()

void v8::internal::compiler::NodeProperties::ReplaceFrameStateInput ( Node *  node,
Node *  frame_state 
)
inlinestatic

Definition at line 165 of file node-properties-inl.h.

166  {
168  node->ReplaceInput(FirstFrameStateIndex(node), frame_state);
169 }

References DCHECK, FirstFrameStateIndex(), and v8::internal::compiler::OperatorProperties::HasFrameStateInput().

Referenced by v8::internal::compiler::AstGraphBuilder::PrepareFrameState(), and v8::internal::compiler::JSInliner::TryInlineCall().

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

◆ ReplaceWithValue()

void v8::internal::compiler::NodeProperties::ReplaceWithValue ( Node *  node,
Node *  value,
Node *  effect = NULL 
)
inlinestatic

Definition at line 178 of file node-properties-inl.h.

179  {
181  if (effect == NULL && OperatorProperties::HasEffectInput(node->op())) {
182  effect = NodeProperties::GetEffectInput(node);
183  }
184 
185  // Requires distinguishing between value and effect edges.
186  UseIter iter = node->uses().begin();
187  while (iter != node->uses().end()) {
188  if (NodeProperties::IsEffectEdge(iter.edge())) {
189  DCHECK_NE(NULL, effect);
190  iter = iter.UpdateToAndIncrement(effect);
191  } else {
192  iter = iter.UpdateToAndIncrement(value);
193  }
194  }
195 }
static bool IsEffectEdge(Node::Edge edge)
static Node * GetEffectInput(Node *node, int index=0)
static bool HasEffectInput(const Operator *op)
static bool HasControlOutput(const Operator *op)
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
#define DCHECK_NE(v1, v2)
Definition: logging.h:207
Node::Uses::iterator UseIter
Definition: node.h:81

References DCHECK, DCHECK_NE, GetEffectInput(), v8::internal::compiler::OperatorProperties::HasControlOutput(), v8::internal::compiler::OperatorProperties::HasEffectInput(), IsEffectEdge(), and NULL.

Referenced by v8::internal::compiler::Inlinee::InlineAtCall(), v8::internal::compiler::ContextSpecializationVisitor::Post(), v8::internal::compiler::RelaxEffects(), v8::internal::compiler::ReplaceWithPureReduction(), v8::internal::compiler::ReplaceWithReduction(), and v8::internal::compiler::JSContextSpecializer::SpecializeToContext().

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

◆ SetBounds()

void v8::internal::compiler::NodeProperties::SetBounds ( Node *  node,
Bounds  bounds 
)
inlinestatic

Definition at line 203 of file node-properties-inl.h.

203  {
204  node->set_bounds(b);
205 }

Referenced by v8::internal::compiler::Typer::Init(), v8::internal::compiler::JSBuiltinReducerTest::Parameter(), v8::internal::compiler::Typer::RunVisitor::Post(), v8::internal::compiler::Typer::NarrowVisitor::Pre(), v8::internal::compiler::Typer::WidenVisitor::Pre(), and v8::internal::compiler::JSBinopReduction::TryNarrowingToI32().

+ Here is the caller graph for this function:

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