blob: 4f83b86c11ba18733da968f724789c557625f8a5 [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
2// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7//
8// Definition of the in-memory high-level intermediate representation
9// of shaders. This is a tree that parser creates.
10//
11// Nodes in the tree are defined as a hierarchy of classes derived from
12// TIntermNode. Each is a node in a tree. There is no preset branching factor;
13// each node can have it's own type of list of children.
14//
15
16#ifndef __INTERMEDIATE_H
17#define __INTERMEDIATE_H
18
19#include "Common.h"
20#include "Types.h"
21#include "ConstantUnion.h"
22
23//
24// Operators used by the high-level (parse tree) representation.
25//
26enum TOperator {
alokp@chromium.org2cf17712010-03-30 20:33:18 +000027 EOpNull, // if in a node, should only mean a node is still being built
28 EOpSequence, // denotes a list of statements, or parameters, etc.
29 EOpFunctionCall,
30 EOpFunction, // For function definition
31 EOpParameters, // an aggregate listing the parameters to a function
32 EOpDeclaration,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000033
alokp@chromium.org2cf17712010-03-30 20:33:18 +000034 //
35 // Unary operators
36 //
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000037
alokp@chromium.org2cf17712010-03-30 20:33:18 +000038 EOpNegative,
39 EOpLogicalNot,
40 EOpVectorLogicalNot,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000041
alokp@chromium.org2cf17712010-03-30 20:33:18 +000042 EOpPostIncrement,
43 EOpPostDecrement,
44 EOpPreIncrement,
45 EOpPreDecrement,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000046
alokp@chromium.org2cf17712010-03-30 20:33:18 +000047 EOpConvIntToBool,
48 EOpConvFloatToBool,
49 EOpConvBoolToFloat,
50 EOpConvIntToFloat,
51 EOpConvFloatToInt,
52 EOpConvBoolToInt,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000053
alokp@chromium.org2cf17712010-03-30 20:33:18 +000054 //
55 // binary operations
56 //
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000057
alokp@chromium.org2cf17712010-03-30 20:33:18 +000058 EOpAdd,
59 EOpSub,
60 EOpMul,
61 EOpDiv,
62 EOpEqual,
63 EOpNotEqual,
64 EOpVectorEqual,
65 EOpVectorNotEqual,
66 EOpLessThan,
67 EOpGreaterThan,
68 EOpLessThanEqual,
69 EOpGreaterThanEqual,
70 EOpComma,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000071
alokp@chromium.org2cf17712010-03-30 20:33:18 +000072 EOpVectorTimesScalar,
73 EOpVectorTimesMatrix,
74 EOpMatrixTimesVector,
75 EOpMatrixTimesScalar,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000076
alokp@chromium.org2cf17712010-03-30 20:33:18 +000077 EOpLogicalOr,
78 EOpLogicalXor,
79 EOpLogicalAnd,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000080
alokp@chromium.org2cf17712010-03-30 20:33:18 +000081 EOpIndexDirect,
82 EOpIndexIndirect,
83 EOpIndexDirectStruct,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000084
alokp@chromium.org2cf17712010-03-30 20:33:18 +000085 EOpVectorSwizzle,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000086
alokp@chromium.org2cf17712010-03-30 20:33:18 +000087 //
88 // Built-in functions potentially mapped to operators
89 //
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000090
alokp@chromium.org2cf17712010-03-30 20:33:18 +000091 EOpRadians,
92 EOpDegrees,
93 EOpSin,
94 EOpCos,
95 EOpTan,
96 EOpAsin,
97 EOpAcos,
98 EOpAtan,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000099
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000100 EOpPow,
101 EOpExp,
102 EOpLog,
103 EOpExp2,
104 EOpLog2,
105 EOpSqrt,
106 EOpInverseSqrt,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000107
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000108 EOpAbs,
109 EOpSign,
110 EOpFloor,
111 EOpCeil,
112 EOpFract,
113 EOpMod,
114 EOpMin,
115 EOpMax,
116 EOpClamp,
117 EOpMix,
118 EOpStep,
119 EOpSmoothStep,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000120
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000121 EOpLength,
122 EOpDistance,
123 EOpDot,
124 EOpCross,
125 EOpNormalize,
126 EOpFaceForward,
127 EOpReflect,
128 EOpRefract,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000129
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000130 //EOpDPdx, // Fragment only, OES_standard_derivatives extension
131 //EOpDPdy, // Fragment only, OES_standard_derivatives extension
132 //EOpFwidth, // Fragment only, OES_standard_derivatives extension
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000133
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000134 EOpMatrixTimesMatrix,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000135
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000136 EOpAny,
137 EOpAll,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000138
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000139 //
140 // Branch
141 //
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000142
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000143 EOpKill, // Fragment only
144 EOpReturn,
145 EOpBreak,
146 EOpContinue,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000147
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000148 //
149 // Constructors
150 //
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000151
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000152 EOpConstructInt,
153 EOpConstructBool,
154 EOpConstructFloat,
155 EOpConstructVec2,
156 EOpConstructVec3,
157 EOpConstructVec4,
158 EOpConstructBVec2,
159 EOpConstructBVec3,
160 EOpConstructBVec4,
161 EOpConstructIVec2,
162 EOpConstructIVec3,
163 EOpConstructIVec4,
164 EOpConstructMat2,
165 EOpConstructMat3,
166 EOpConstructMat4,
167 EOpConstructStruct,
168
169 //
170 // moves
171 //
172
173 EOpAssign,
174 EOpInitialize,
175 EOpAddAssign,
176 EOpSubAssign,
177 EOpMulAssign,
178 EOpVectorTimesMatrixAssign,
179 EOpVectorTimesScalarAssign,
180 EOpMatrixTimesScalarAssign,
181 EOpMatrixTimesMatrixAssign,
182 EOpDivAssign,
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000183};
184
185class TIntermTraverser;
186class TIntermAggregate;
187class TIntermBinary;
daniel@transgaming.com4a35ef22010-04-08 03:51:06 +0000188class TIntermUnary;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000189class TIntermConstantUnion;
190class TIntermSelection;
191class TIntermTyped;
192class TIntermSymbol;
193class TInfoSink;
194
195//
196// Base class for the tree nodes
197//
198class TIntermNode {
199public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000200 POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000201
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000202 TIntermNode() : line(0) {}
203 virtual TSourceLoc getLine() const { return line; }
204 virtual void setLine(TSourceLoc l) { line = l; }
205 virtual void traverse(TIntermTraverser*) = 0;
206 virtual TIntermTyped* getAsTyped() { return 0; }
207 virtual TIntermConstantUnion* getAsConstantUnion() { return 0; }
208 virtual TIntermAggregate* getAsAggregate() { return 0; }
209 virtual TIntermBinary* getAsBinaryNode() { return 0; }
daniel@transgaming.com4a35ef22010-04-08 03:51:06 +0000210 virtual TIntermUnary* getAsUnaryNode() { return 0; }
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000211 virtual TIntermSelection* getAsSelectionNode() { return 0; }
212 virtual TIntermSymbol* getAsSymbolNode() { return 0; }
213 virtual ~TIntermNode() { }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000214protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000215 TSourceLoc line;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000216};
217
218//
219// This is just to help yacc.
220//
221struct TIntermNodePair {
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000222 TIntermNode* node1;
223 TIntermNode* node2;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000224};
225
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000226//
227// Intermediate class for nodes that have a type.
228//
229class TIntermTyped : public TIntermNode {
230public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000231 TIntermTyped(const TType& t) : type(t) { }
232 virtual TIntermTyped* getAsTyped() { return this; }
233 virtual void setType(const TType& t) { type = t; }
234 virtual const TType& getType() const { return type; }
235 virtual TType* getTypePointer() { return &type; }
alokp@chromium.orgdd037b22010-03-30 18:47:20 +0000236
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000237 virtual TBasicType getBasicType() const { return type.getBasicType(); }
238 virtual TQualifier getQualifier() const { return type.getQualifier(); }
239 virtual int getNominalSize() const { return type.getNominalSize(); }
240 virtual int getSize() const { return type.getInstanceSize(); }
241 virtual bool isMatrix() const { return type.isMatrix(); }
242 virtual bool isArray() const { return type.isArray(); }
243 virtual bool isVector() const { return type.isVector(); }
244 const char* getBasicString() const { return type.getBasicString(); }
245 const char* getQualifierString() const { return type.getQualifierString(); }
246 TString getCompleteString() const { return type.getCompleteString(); }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000247
248protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000249 TType type;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000250};
251
252//
253// Handle for, do-while, and while loops.
254//
255class TIntermLoop : public TIntermNode {
256public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000257 TIntermLoop(TIntermNode *init, TIntermNode* aBody, TIntermTyped* aTest, TIntermTyped* aTerminal, bool testFirst) :
258 init(init),
259 body(aBody),
260 test(aTest),
261 terminal(aTerminal),
262 first(testFirst) { }
263 virtual void traverse(TIntermTraverser*);
264 TIntermNode *getInit() { return init; }
265 TIntermNode *getBody() { return body; }
266 TIntermTyped *getTest() { return test; }
267 TIntermTyped *getTerminal() { return terminal; }
268 bool testFirst() { return first; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000269protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000270 TIntermNode *init;
271 TIntermNode *body; // code to loop over
272 TIntermTyped *test; // exit condition associated with loop, could be 0 for 'for' loops
273 TIntermTyped *terminal; // exists for for-loops
274 bool first; // true for while and for, not for do-while
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000275};
276
277//
278// Handle break, continue, return, and kill.
279//
280class TIntermBranch : public TIntermNode {
281public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000282 TIntermBranch(TOperator op, TIntermTyped* e) :
283 flowOp(op),
284 expression(e) { }
285 virtual void traverse(TIntermTraverser*);
286 TOperator getFlowOp() { return flowOp; }
287 TIntermTyped* getExpression() { return expression; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000288protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000289 TOperator flowOp;
290 TIntermTyped* expression; // non-zero except for "return exp;" statements
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000291};
292
293//
294// Nodes that correspond to symbols or constants in the source code.
295//
296class TIntermSymbol : public TIntermTyped {
297public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000298 // if symbol is initialized as symbol(sym), the memory comes from the poolallocator of sym. If sym comes from
299 // per process globalpoolallocator, then it causes increased memory usage per compile
300 // it is essential to use "symbol = sym" to assign to symbol
301 TIntermSymbol(int i, const TString& sym, const TType& t) :
302 TIntermTyped(t), id(i) { symbol = sym;}
303 virtual int getId() const { return id; }
304 virtual const TString& getSymbol() const { return symbol; }
305 virtual void traverse(TIntermTraverser*);
306 virtual TIntermSymbol* getAsSymbolNode() { return this; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000307protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000308 int id;
309 TString symbol;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000310};
311
312class TIntermConstantUnion : public TIntermTyped {
313public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000314 TIntermConstantUnion(constUnion *unionPointer, const TType& t) : TIntermTyped(t), unionArrayPointer(unionPointer) { }
315 constUnion* getUnionArrayPointer() const { return unionArrayPointer; }
316 void setUnionArrayPointer(constUnion *c) { unionArrayPointer = c; }
317 virtual TIntermConstantUnion* getAsConstantUnion() { return this; }
318 virtual void traverse(TIntermTraverser* );
319 virtual TIntermTyped* fold(TOperator, TIntermTyped*, TInfoSink&);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000320protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000321 constUnion *unionArrayPointer;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000322};
323
324//
325// Intermediate class for node types that hold operators.
326//
327class TIntermOperator : public TIntermTyped {
328public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000329 TOperator getOp() const { return op; }
330 bool modifiesState() const;
331 bool isConstructor() const;
332 virtual bool promote(TInfoSink&) { return true; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000333protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000334 TIntermOperator(TOperator o) : TIntermTyped(TType(EbtFloat)), op(o) {}
335 TIntermOperator(TOperator o, TType& t) : TIntermTyped(t), op(o) {}
336 TOperator op;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000337};
338
339//
340// Nodes for all the basic binary math operators.
341//
342class TIntermBinary : public TIntermOperator {
343public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000344 TIntermBinary(TOperator o) : TIntermOperator(o) {}
345 virtual void traverse(TIntermTraverser*);
346 virtual void setLeft(TIntermTyped* n) { left = n; }
347 virtual void setRight(TIntermTyped* n) { right = n; }
348 virtual TIntermTyped* getLeft() const { return left; }
349 virtual TIntermTyped* getRight() const { return right; }
350 virtual TIntermBinary* getAsBinaryNode() { return this; }
351 virtual bool promote(TInfoSink&);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000352protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000353 TIntermTyped* left;
354 TIntermTyped* right;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000355};
356
357//
358// Nodes for unary math operators.
359//
360class TIntermUnary : public TIntermOperator {
361public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000362 TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {}
363 TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {}
364 virtual void traverse(TIntermTraverser*);
365 virtual void setOperand(TIntermTyped* o) { operand = o; }
366 virtual TIntermTyped* getOperand() { return operand; }
daniel@transgaming.com4a35ef22010-04-08 03:51:06 +0000367 virtual TIntermUnary* getAsUnaryNode() { return this; }
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000368 virtual bool promote(TInfoSink&);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000369protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000370 TIntermTyped* operand;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000371};
372
373typedef TVector<TIntermNode*> TIntermSequence;
374typedef TVector<int> TQualifierList;
375//
376// Nodes that operate on an arbitrary sized set of children.
377//
378class TIntermAggregate : public TIntermOperator {
379public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000380 TIntermAggregate() : TIntermOperator(EOpNull), userDefined(false), pragmaTable(0) { }
381 TIntermAggregate(TOperator o) : TIntermOperator(o), pragmaTable(0) { }
382 ~TIntermAggregate() { delete pragmaTable; }
383 virtual TIntermAggregate* getAsAggregate() { return this; }
384 virtual void setOperator(TOperator o) { op = o; }
385 virtual TIntermSequence& getSequence() { return sequence; }
386 virtual void setName(const TString& n) { name = n; }
387 virtual const TString& getName() const { return name; }
388 virtual void traverse(TIntermTraverser*);
389 virtual void setUserDefined() { userDefined = true; }
390 virtual bool isUserDefined() { return userDefined; }
391 virtual TQualifierList& getQualifier() { return qualifier; }
392 void setOptimize(bool o) { optimize = o; }
393 void setDebug(bool d) { debug = d; }
394 bool getOptimize() { return optimize; }
395 bool getDebug() { return debug; }
396 void addToPragmaTable(const TPragmaTable& pTable);
397 const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000398protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000399 TIntermAggregate(const TIntermAggregate&); // disallow copy constructor
400 TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator
401 TIntermSequence sequence;
402 TQualifierList qualifier;
403 TString name;
404 bool userDefined; // used for user defined function names
405 bool optimize;
406 bool debug;
407 TPragmaTable *pragmaTable;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000408};
409
410//
411// For if tests. Simplified since there is no switch statement.
412//
413class TIntermSelection : public TIntermTyped {
414public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000415 TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB) :
416 TIntermTyped(TType(EbtVoid)), condition(cond), trueBlock(trueB), falseBlock(falseB) {}
417 TIntermSelection(TIntermTyped* cond, TIntermNode* trueB, TIntermNode* falseB, const TType& type) :
418 TIntermTyped(type), condition(cond), trueBlock(trueB), falseBlock(falseB) {}
419 virtual void traverse(TIntermTraverser*);
420 bool usesTernaryOperator() const { return getBasicType() != EbtVoid; }
421 virtual TIntermNode* getCondition() const { return condition; }
422 virtual TIntermNode* getTrueBlock() const { return trueBlock; }
423 virtual TIntermNode* getFalseBlock() const { return falseBlock; }
424 virtual TIntermSelection* getAsSelectionNode() { return this; }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000425protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000426 TIntermTyped* condition;
427 TIntermNode* trueBlock;
428 TIntermNode* falseBlock;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000429};
430
431enum Visit
432{
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000433 PreVisit,
434 InVisit,
435 PostVisit
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000436};
437
438//
439// For traversing the tree. User should derive from this,
440// put their traversal specific data in it, and then pass
441// it to a Traverse method.
442//
443// When using this, just fill in the methods for nodes you want visited.
444// Return false from a pre-visit to skip visiting that node's subtree.
445//
446class TIntermTraverser
447{
448public:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000449 POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000450
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000451 TIntermTraverser(bool preVisit = true, bool inVisit = false, bool postVisit = false, bool rightToLeft = false) :
452 preVisit(preVisit),
453 inVisit(inVisit),
454 postVisit(postVisit),
455 rightToLeft(rightToLeft),
456 depth(0) {}
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000457
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000458 virtual void visitSymbol(TIntermSymbol*) {}
459 virtual void visitConstantUnion(TIntermConstantUnion*) {}
460 virtual bool visitBinary(Visit visit, TIntermBinary*) {return true;}
461 virtual bool visitUnary(Visit visit, TIntermUnary*) {return true;}
462 virtual bool visitSelection(Visit visit, TIntermSelection*) {return true;}
463 virtual bool visitAggregate(Visit visit, TIntermAggregate*) {return true;}
464 virtual bool visitLoop(Visit visit, TIntermLoop*) {return true;}
465 virtual bool visitBranch(Visit visit, TIntermBranch*) {return true;}
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000466
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000467 void incrementDepth() {depth++;}
468 void decrementDepth() {depth--;}
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000469
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000470 const bool preVisit;
471 const bool inVisit;
472 const bool postVisit;
473 const bool rightToLeft;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000474
475protected:
alokp@chromium.org2cf17712010-03-30 20:33:18 +0000476 int depth;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000477};
478
479#endif // __INTERMEDIATE_H