blob: 6dc423ca00d8bad3d53a417081eaae6ae3befa7b [file] [log] [blame]
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00001//
Nicolas Capens1fbc2872014-01-03 14:12:09 -05002// Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00003// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
Geoff Lang0a73dd82014-11-19 16:18:08 -05007#ifndef COMPILER_TRANSLATOR_SYMBOLTABLE_H_
8#define COMPILER_TRANSLATOR_SYMBOLTABLE_H_
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +00009
10//
11// Symbol table for parsing. Has these design characteristics:
12//
13// * Same symbol table can be used to compile many shaders, to preserve
14// effort of creating and loading with the large numbers of built-in
15// symbols.
16//
17// * Name mangling will be used to give each function a unique name
18// so that symbol table lookups are never ambiguous. This allows
19// a simpler symbol table structure.
20//
21// * Pushing and popping of scope, so symbol table will really be a stack
22// of symbol tables. Searched from the top, with new inserts going into
23// the top.
24//
25// * Constants: Compile time constant symbols will keep their values
26// in the symbol table. The parser can substitute constants at parse
27// time, including doing constant folding and constant propagation.
28//
29// * No temporaries: Temporaries made from operations (+, --, .xy, etc.)
30// are tracked in the intermediate representation, not the symbol table.
31//
32
alokp@chromium.org4e4facd2010-06-02 15:21:22 +000033#include <assert.h>
Zhenyao Mo94ac7b72014-10-15 18:22:08 -070034#include <set>
alokp@chromium.orge4249f02010-07-26 18:13:52 +000035
Jamie Madill703cdd62013-07-08 15:07:30 -040036#include "common/angleutils.h"
Geoff Lang17732822013-08-29 13:46:49 -040037#include "compiler/translator/InfoSink.h"
Jamie Madillb1a85f42014-08-19 15:23:24 -040038#include "compiler/translator/IntermNode.h"
alokp@chromium.org43884872010-03-30 00:08:52 +000039
Zhenyao Mo9eedea02014-05-12 16:02:35 -070040// Symbol base class. (Can build functions or variables out of these...)
41class TSymbol
42{
43 public:
Alok Priyadarshi8156b6b2013-09-23 14:56:58 -040044 POOL_ALLOCATOR_NEW_DELETE();
Zhenyao Mo9eedea02014-05-12 16:02:35 -070045 TSymbol(const TString *n)
46 : uniqueId(0),
47 name(n)
48 {
49 }
50 virtual ~TSymbol()
51 {
52 // don't delete name, it's from the pool
53 }
Alok Priyadarshi8156b6b2013-09-23 14:56:58 -040054
Zhenyao Mo9eedea02014-05-12 16:02:35 -070055 const TString &getName() const
56 {
57 return *name;
58 }
59 virtual const TString &getMangledName() const
60 {
61 return getName();
62 }
63 virtual bool isFunction() const
64 {
65 return false;
66 }
67 virtual bool isVariable() const
68 {
69 return false;
70 }
71 void setUniqueId(int id)
72 {
73 uniqueId = id;
74 }
75 int getUniqueId() const
76 {
77 return uniqueId;
78 }
79 void relateToExtension(const TString &ext)
80 {
81 extension = ext;
82 }
83 const TString &getExtension() const
84 {
85 return extension;
86 }
Nicolas Capensba60ad32013-06-04 15:55:47 -040087
Zhenyao Mo9eedea02014-05-12 16:02:35 -070088 private:
Jamie Madill703cdd62013-07-08 15:07:30 -040089 DISALLOW_COPY_AND_ASSIGN(TSymbol);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000090
Zhenyao Mo9eedea02014-05-12 16:02:35 -070091 int uniqueId; // For real comparing during code generation
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000092 const TString *name;
Jamie Madill2aeb26a2013-07-08 14:02:55 -040093 TString extension;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000094};
95
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000096// Variable class, meaning a symbol that's not a function.
97//
98// There could be a separate class heirarchy for Constant variables;
99// Only one of int, bool, or float, (or none) is correct for
100// any particular use, but it's easy to do this way, and doesn't
101// seem worth having separate classes, and "getConst" can't simply return
102// different values for different types polymorphically, so this is
103// just simple and pragmatic.
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700104class TVariable : public TSymbol
105{
106 public:
107 TVariable(const TString *name, const TType &t, bool uT = false)
108 : TSymbol(name),
109 type(t),
110 userType(uT),
111 unionArray(0)
112 {
113 }
114 virtual ~TVariable()
115 {
116 }
117 virtual bool isVariable() const
118 {
119 return true;
120 }
121 TType &getType()
122 {
123 return type;
124 }
125 const TType &getType() const
126 {
127 return type;
128 }
129 bool isUserType() const
130 {
131 return userType;
132 }
133 void setQualifier(TQualifier qualifier)
134 {
135 type.setQualifier(qualifier);
136 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000137
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700138 ConstantUnion *getConstPointer()
alokp@chromium.org43884872010-03-30 00:08:52 +0000139 {
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000140 if (!unionArray)
alokp@chromium.org6ff56fd2010-05-05 16:37:50 +0000141 unionArray = new ConstantUnion[type.getObjectSize()];
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000142
143 return unionArray;
144 }
145
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700146 ConstantUnion *getConstPointer() const
147 {
148 return unionArray;
149 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000150
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700151 void shareConstPointer(ConstantUnion *constArray)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000152 {
alokp@chromium.org6c82caf2010-10-14 16:08:56 +0000153 if (unionArray == constArray)
154 return;
155
156 delete[] unionArray;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000157 unionArray = constArray;
158 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000159
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700160 private:
Jamie Madill703cdd62013-07-08 15:07:30 -0400161 DISALLOW_COPY_AND_ASSIGN(TVariable);
162
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000163 TType type;
164 bool userType;
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700165 // we are assuming that Pool Allocator will free the memory
166 // allocated to unionArray when this object is destroyed.
alokp@chromium.org6ff56fd2010-05-05 16:37:50 +0000167 ConstantUnion *unionArray;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000168};
169
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000170// The function sub-class of symbols and the parser will need to
171// share this definition of a function parameter.
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700172struct TParameter
173{
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000174 TString *name;
Nicolas Capensbd10cf52013-06-20 09:51:51 -0400175 TType *type;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000176};
177
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000178// The function sub-class of a symbol.
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700179class TFunction : public TSymbol
180{
181 public:
182 TFunction(TOperator o)
183 : TSymbol(0),
184 returnType(TType(EbtVoid, EbpUndefined)),
185 op(o),
186 defined(false)
187 {
188 }
Nicolas Capensadfffe42014-06-17 02:13:36 -0400189 TFunction(const TString *name, const TType &retType, TOperator tOp = EOpNull)
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700190 : TSymbol(name),
191 returnType(retType),
192 mangledName(TFunction::mangleName(*name)),
193 op(tOp),
194 defined(false)
195 {
196 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000197 virtual ~TFunction();
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700198 virtual bool isFunction() const
199 {
200 return true;
201 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000202
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700203 static TString mangleName(const TString &name)
204 {
205 return name + '(';
206 }
207 static TString unmangleName(const TString &mangledName)
alokp@chromium.org43884872010-03-30 00:08:52 +0000208 {
209 return TString(mangledName.c_str(), mangledName.find_first_of('('));
210 }
211
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700212 void addParameter(TParameter &p)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000213 {
214 parameters.push_back(p);
215 mangledName = mangledName + p.type->getMangledName();
216 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000217
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700218 const TString &getMangledName() const
219 {
220 return mangledName;
221 }
222 const TType &getReturnType() const
223 {
224 return returnType;
225 }
alokp@chromium.org8815d7f2010-09-09 17:30:03 +0000226
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700227 void relateToOperator(TOperator o)
228 {
229 op = o;
230 }
231 TOperator getBuiltInOp() const
232 {
233 return op;
234 }
alokp@chromium.org8815d7f2010-09-09 17:30:03 +0000235
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700236 void setDefined()
237 {
238 defined = true;
239 }
240 bool isDefined()
241 {
242 return defined;
243 }
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000244
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700245 size_t getParamCount() const
246 {
247 return parameters.size();
248 }
249 const TParameter &getParam(size_t i) const
250 {
251 return parameters[i];
252 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000253
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700254 private:
Jamie Madill703cdd62013-07-08 15:07:30 -0400255 DISALLOW_COPY_AND_ASSIGN(TFunction);
256
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000257 typedef TVector<TParameter> TParamList;
alokp@chromium.org43884872010-03-30 00:08:52 +0000258 TParamList parameters;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000259 TType returnType;
260 TString mangledName;
261 TOperator op;
262 bool defined;
263};
264
shannonwoods@chromium.org5668c5d2013-05-30 00:11:48 +0000265// Interface block name sub-symbol
shannonwoods@chromium.org5668c5d2013-05-30 00:11:48 +0000266class TInterfaceBlockName : public TSymbol
267{
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700268 public:
shannonwoods@chromium.org5668c5d2013-05-30 00:11:48 +0000269 TInterfaceBlockName(const TString *name)
270 : TSymbol(name)
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700271 {
272 }
shannonwoods@chromium.org5668c5d2013-05-30 00:11:48 +0000273
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700274 virtual ~TInterfaceBlockName()
275 {
276 }
shannonwoods@chromium.org5668c5d2013-05-30 00:11:48 +0000277};
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000278
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700279class TSymbolTableLevel
280{
281 public:
282 typedef TMap<TString, TSymbol *> tLevel;
alokp@chromium.org43884872010-03-30 00:08:52 +0000283 typedef tLevel::const_iterator const_iterator;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000284 typedef const tLevel::value_type tLevelPair;
285 typedef std::pair<tLevel::iterator, bool> tInsertResult;
286
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700287 TSymbolTableLevel()
288 {
289 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000290 ~TSymbolTableLevel();
291
Nicolas Capensadfffe42014-06-17 02:13:36 -0400292 bool insert(TSymbol *symbol);
Nicolas Capensbd10cf52013-06-20 09:51:51 -0400293
Jamie Madillbfa91f42014-06-05 15:45:18 -0400294 TSymbol *find(const TString &name) const;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000295
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700296 void relateToOperator(const char *name, TOperator op);
297 void relateToExtension(const char *name, const TString &ext);
alokp@chromium.org43884872010-03-30 00:08:52 +0000298
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700299 protected:
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000300 tLevel level;
301};
302
Gus Fernandez964df492014-10-13 11:54:39 -0700303// Define ESymbolLevel as int rather than an enum since level can go
304// above GLOBAL_LEVEL and cause atBuiltInLevel() to fail if the
305// compiler optimizes the >= of the last element to ==.
306typedef int ESymbolLevel;
307const int COMMON_BUILTINS = 0;
308const int ESSL1_BUILTINS = 1;
309const int ESSL3_BUILTINS = 2;
310const int LAST_BUILTIN_LEVEL = ESSL3_BUILTINS;
311const int GLOBAL_LEVEL = 3;
shannonwoods@chromium.org6e10a0e2013-05-30 00:02:13 +0000312
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700313class TSymbolTable
314{
315 public:
Nicolas Capensbd10cf52013-06-20 09:51:51 -0400316 TSymbolTable()
Zhenyao Mo94ac7b72014-10-15 18:22:08 -0700317 : mGlobalInvariant(false)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000318 {
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000319 // The symbol table cannot be used until push() is called, but
320 // the lack of an initial call to push() can be used to detect
321 // that the symbol table has not been preloaded with built-ins.
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000322 }
323
Alok Priyadarshibc3f1ac2013-09-23 14:57:02 -0400324 ~TSymbolTable();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000325
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000326 // When the symbol table is initialized with the built-ins, there should
327 // 'push' calls, so that built-ins are at level 0 and the shader
328 // globals are at level 1.
Zhenyao Moe740add2014-07-18 17:01:01 -0700329 bool isEmpty() const
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700330 {
331 return table.empty();
332 }
Zhenyao Moe740add2014-07-18 17:01:01 -0700333 bool atBuiltInLevel() const
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700334 {
335 return currentLevel() <= LAST_BUILTIN_LEVEL;
336 }
Zhenyao Moe740add2014-07-18 17:01:01 -0700337 bool atGlobalLevel() const
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700338 {
339 return currentLevel() <= GLOBAL_LEVEL;
340 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000341 void push()
alokp@chromium.orge4249f02010-07-26 18:13:52 +0000342 {
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000343 table.push_back(new TSymbolTableLevel);
Alok Priyadarshibc3f1ac2013-09-23 14:57:02 -0400344 precisionStack.push_back(new PrecisionStackLevel);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000345 }
346
alokp@chromium.org43884872010-03-30 00:08:52 +0000347 void pop()
Alok Priyadarshibc3f1ac2013-09-23 14:57:02 -0400348 {
349 delete table.back();
350 table.pop_back();
351
352 delete precisionStack.back();
daniel@transgaming.coma5d76232010-05-17 09:58:47 +0000353 precisionStack.pop_back();
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000354 }
355
Nicolas Capensadfffe42014-06-17 02:13:36 -0400356 bool declare(TSymbol *symbol)
shannonwoods@chromium.org1c848092013-05-30 00:02:34 +0000357 {
358 return insert(currentLevel(), symbol);
359 }
360
Nicolas Capensadfffe42014-06-17 02:13:36 -0400361 bool insert(ESymbolLevel level, TSymbol *symbol)
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000362 {
shannonwoods@chromium.org1c848092013-05-30 00:02:34 +0000363 return table[level]->insert(symbol);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000364 }
alokp@chromium.org43884872010-03-30 00:08:52 +0000365
Nicolas Capens49a88872013-06-20 09:54:03 -0400366 bool insertConstInt(ESymbolLevel level, const char *name, int value)
367 {
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700368 TVariable *constant = new TVariable(
369 NewPoolTString(name), TType(EbtInt, EbpUndefined, EvqConst, 1));
Nicolas Capens49a88872013-06-20 09:54:03 -0400370 constant->getConstPointer()->setIConst(value);
Nicolas Capensadfffe42014-06-17 02:13:36 -0400371 return insert(level, constant);
Nicolas Capens49a88872013-06-20 09:54:03 -0400372 }
373
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700374 void insertBuiltIn(ESymbolLevel level, TType *rvalue, const char *name,
375 TType *ptype1, TType *ptype2 = 0, TType *ptype3 = 0,
376 TType *ptype4 = 0, TType *ptype5 = 0);
Nicolas Capens759b9942014-02-14 17:57:14 -0500377
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700378 TSymbol *find(const TString &name, int shaderVersion,
Zhenyao Moe740add2014-07-18 17:01:01 -0700379 bool *builtIn = NULL, bool *sameScope = NULL) const;
380 TSymbol *findBuiltIn(const TString &name, int shaderVersion) const;
shannonwoods@chromium.org6e10a0e2013-05-30 00:02:13 +0000381
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700382 TSymbolTableLevel *getOuterLevel()
383 {
shannonwoods@chromium.org6e10a0e2013-05-30 00:02:13 +0000384 assert(currentLevel() >= 1);
daniel@transgaming.com5dd6d092012-03-20 20:10:28 +0000385 return table[currentLevel() - 1];
386 }
387
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700388 void relateToOperator(ESymbolLevel level, const char *name, TOperator op)
389 {
shannonwoods@chromium.org6e10a0e2013-05-30 00:02:13 +0000390 table[level]->relateToOperator(name, op);
alokp@chromium.org8815d7f2010-09-09 17:30:03 +0000391 }
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700392 void relateToExtension(ESymbolLevel level, const char *name, const TString &ext)
393 {
shannonwoods@chromium.org6e10a0e2013-05-30 00:02:13 +0000394 table[level]->relateToExtension(name, ext);
alokp@chromium.org8815d7f2010-09-09 17:30:03 +0000395 }
Alok Priyadarshibc3f1ac2013-09-23 14:57:02 -0400396 void dump(TInfoSink &infoSink) const;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000397
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700398 bool setDefaultPrecision(const TPublicType &type, TPrecision prec)
399 {
Zhenyao Moed14b792014-05-08 11:21:07 -0700400 if (!SupportsPrecision(type.type))
Zhenyao Moa5a1dfc2013-09-23 14:57:03 -0400401 return false;
shannonwoods@chromium.org09e09882013-05-30 00:18:25 +0000402 if (type.isAggregate())
shannon.woods@transgaming.comd25a6b32013-02-28 23:19:13 +0000403 return false; // Not allowed to set for aggregate types
daniel@transgaming.coma5d76232010-05-17 09:58:47 +0000404 int indexOfLastElement = static_cast<int>(precisionStack.size()) - 1;
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700405 // Uses map operator [], overwrites the current value
406 (*precisionStack[indexOfLastElement])[type.type] = prec;
shannon.woods@transgaming.comd25a6b32013-02-28 23:19:13 +0000407 return true;
daniel@transgaming.coma5d76232010-05-17 09:58:47 +0000408 }
409
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700410 // Searches down the precisionStack for a precision qualifier
411 // for the specified TBasicType
Zhenyao Moe740add2014-07-18 17:01:01 -0700412 TPrecision getDefaultPrecision(TBasicType type) const;
shannonwoods@chromium.org6b709912013-05-30 00:20:04 +0000413
Zhenyao Mo94ac7b72014-10-15 18:22:08 -0700414 // This records invariant varyings declared through
415 // "invariant varying_name;".
Jamie Madill2c433252014-12-03 12:36:54 -0500416 void addInvariantVarying(const std::string &originalName)
Zhenyao Mo94ac7b72014-10-15 18:22:08 -0700417 {
418 mInvariantVaryings.insert(originalName);
419 }
420 // If this returns false, the varying could still be invariant
421 // if it is set as invariant during the varying variable
422 // declaration - this piece of information is stored in the
423 // variable's type, not here.
Jamie Madill2c433252014-12-03 12:36:54 -0500424 bool isVaryingInvariant(const std::string &originalName) const
Zhenyao Mo94ac7b72014-10-15 18:22:08 -0700425 {
426 return (mGlobalInvariant ||
427 mInvariantVaryings.count(originalName) > 0);
428 }
429
430 void setGlobalInvariant() { mGlobalInvariant = true; }
431 bool getGlobalInvariant() const { return mGlobalInvariant; }
432
Jamie Madillbfa91f42014-06-05 15:45:18 -0400433 static int nextUniqueId()
434 {
435 return ++uniqueIdCounter;
436 }
437
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700438 private:
439 ESymbolLevel currentLevel() const
440 {
441 return static_cast<ESymbolLevel>(table.size() - 1);
daniel@transgaming.coma5d76232010-05-17 09:58:47 +0000442 }
443
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700444 std::vector<TSymbolTableLevel *> table;
Alok Priyadarshibc3f1ac2013-09-23 14:57:02 -0400445 typedef TMap<TBasicType, TPrecision> PrecisionStackLevel;
Zhenyao Mo9eedea02014-05-12 16:02:35 -0700446 std::vector< PrecisionStackLevel *> precisionStack;
Jamie Madillbfa91f42014-06-05 15:45:18 -0400447
Jamie Madill2c433252014-12-03 12:36:54 -0500448 std::set<std::string> mInvariantVaryings;
Zhenyao Mo94ac7b72014-10-15 18:22:08 -0700449 bool mGlobalInvariant;
450
Jamie Madillbfa91f42014-06-05 15:45:18 -0400451 static int uniqueIdCounter;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +0000452};
453
Geoff Lang0a73dd82014-11-19 16:18:08 -0500454#endif // COMPILER_TRANSLATOR_SYMBOLTABLE_H_