Lines Matching refs:node

62 // Use this class to carry along data from node to node in
75 virtual bool visitBinary(TVisit, TIntermBinary* node);
76 virtual bool visitUnary(TVisit, TIntermUnary* node);
77 virtual bool visitAggregate(TVisit, TIntermAggregate* node);
78 virtual bool visitSelection(TVisit, TIntermSelection* node);
79 virtual void visitConstantUnion(TIntermConstantUnion* node);
80 virtual void visitSymbol(TIntermSymbol* node);
81 virtual bool visitLoop(TVisit, TIntermLoop* node);
82 virtual bool visitBranch(TVisit, TIntermBranch* node);
83 virtual bool visitSwitch(TVisit, TIntermSwitch* node);
97 static void OutputTreeText(TInfoSink& infoSink, const TIntermNode* node, const int depth)
101 infoSink.debug << node->getLoc().string << ":";
102 if (node->getLoc().line)
103 infoSink.debug << node->getLoc().line;
120 bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
124 OutputTreeText(out, node, depth);
126 switch (node->getOp()) {
147 bool reference = node->getLeft()->getType().isReference();
148 const TTypeList *members = reference ? node->getLeft()->getType().getReferentType()->getStruct() : node->getLeft()->getType().getStruct();
149 out.debug << (*members)[node->getRight()->getAsConstantUnion()->getConstArray()[0].getIConst()].type->getFieldName();
194 out.debug << " (" << node->getCompleteString() << ")";
201 bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
205 OutputTreeText(out, node, depth);
207 switch (node->getOp()) {
675 out.debug << " (" << node->getCompleteString() << ")";
682 bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node)
686 if (node->getOp() == EOpNull) {
687 out.debug.message(EPrefixError, "node is still EOpNull!");
691 OutputTreeText(out, node, depth);
693 switch (node->getOp()) {
698 case EOpFunction: out.debug << "Function Definition: " << node->getName(); break;
699 case EOpFunctionCall: out.debug << "Function Call: " << node->getName(); break;
1154 if (node->getOp() != EOpSequence && node->getOp() != EOpScope && node->getOp() != EOpParameters)
1155 out.debug << " (" << node->getCompleteString() << ")";
1162 bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node)
1166 OutputTreeText(out, node, depth);
1169 out.debug << " (" << node->getCompleteString() << ")";
1171 if (node->getShortCircuit() == false)
1173 if (node->getFlatten())
1175 if (node->getDontFlatten())
1181 OutputTreeText(out, node, depth);
1183 node->getCondition()->traverse(this);
1185 OutputTreeText(out, node, depth);
1186 if (node->getTrueBlock()) {
1188 node->getTrueBlock()->traverse(this);
1192 if (node->getFalseBlock()) {
1193 OutputTreeText(out, node, depth);
1195 node->getFalseBlock()->traverse(this);
1259 static void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstUnionArray& constUnion,
1262 int size = node->getType().computeNumComponents();
1265 OutputTreeText(out, node, depth);
1359 out.info.message(EPrefixInternalError, "Unknown constant", node->getLoc());
1365 void TOutputTraverser::visitConstantUnion(TIntermConstantUnion* node)
1367 OutputTreeText(infoSink, node, depth);
1370 OutputConstantUnion(infoSink, node, node->getConstArray(), extraOutput, depth + 1);
1373 void TOutputTraverser::visitSymbol(TIntermSymbol* node)
1375 OutputTreeText(infoSink, node, depth);
1377 infoSink.debug << "'" << node->getName() << "' (" << node->getCompleteString() << ")\n";
1379 if (! node->getConstArray().empty())
1380 OutputConstantUnion(infoSink, node, node->getConstArray(), extraOutput, depth + 1);
1381 else if (node->getConstSubtree()) {
1382 incrementDepth(node);
1383 node->getConstSubtree()->traverse(this);
1388 bool TOutputTraverser::visitLoop(TVisit /* visit */, TIntermLoop* node)
1392 OutputTreeText(out, node, depth);
1395 if (! node->testFirst())
1399 if (node->getUnroll())
1401 if (node->getDontUnroll())
1403 if (node->getLoopDependency()) {
1405 out.debug << node->getLoopDependency();
1411 OutputTreeText(infoSink, node, depth);
1412 if (node->getTest()) {
1414 node->getTest()->traverse(this);
1418 OutputTreeText(infoSink, node, depth);
1419 if (node->getBody()) {
1421 node->getBody()->traverse(this);
1425 if (node->getTerminal()) {
1426 OutputTreeText(infoSink, node, depth);
1428 node->getTerminal()->traverse(this);
1436 bool TOutputTraverser::visitBranch(TVisit /* visit*/, TIntermBranch* node)
1440 OutputTreeText(out, node, depth);
1442 switch (node->getFlowOp()) {
1456 if (node->getExpression()) {
1459 node->getExpression()->traverse(this);
1467 bool TOutputTraverser::visitSwitch(TVisit /* visit */, TIntermSwitch* node)
1471 OutputTreeText(out, node, depth);
1474 if (node->getFlatten())
1476 if (node->getDontFlatten())
1480 OutputTreeText(out, node, depth);
1483 node->getCondition()->traverse(this);
1486 OutputTreeText(out, node, depth);
1489 node->getBody()->traverse(this);
1499 // type of node. It's children will still be processed.