diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
commit | fc61780b35af913801d72086456f493f63197da6 (patch) | |
tree | f85891288a7bd988da9f0f15ae64e5c63f00d493 /gfx/angle/src/compiler/translator/SymbolTable.h | |
parent | 69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff) | |
parent | 50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff) | |
download | UXP-2018.07.18.tar UXP-2018.07.18.tar.gz UXP-2018.07.18.tar.lz UXP-2018.07.18.tar.xz UXP-2018.07.18.zip |
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts:
# browser/app/profile/firefox.js
# browser/components/preferences/jar.mn
Diffstat (limited to 'gfx/angle/src/compiler/translator/SymbolTable.h')
-rwxr-xr-x | gfx/angle/src/compiler/translator/SymbolTable.h | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/gfx/angle/src/compiler/translator/SymbolTable.h b/gfx/angle/src/compiler/translator/SymbolTable.h index 7c4d3aab3..60e0b9929 100755 --- a/gfx/angle/src/compiler/translator/SymbolTable.h +++ b/gfx/angle/src/compiler/translator/SymbolTable.h @@ -38,16 +38,16 @@ #include "compiler/translator/InfoSink.h" #include "compiler/translator/IntermNode.h" -namespace sh -{ - // Symbol base class. (Can build functions or variables out of these...) class TSymbol : angle::NonCopyable { public: POOL_ALLOCATOR_NEW_DELETE(); - TSymbol(const TString *n); - + TSymbol(const TString *n) + : uniqueId(0), + name(n) + { + } virtual ~TSymbol() { // don't delete name, it's from the pool @@ -69,6 +69,10 @@ class TSymbol : angle::NonCopyable { return false; } + void setUniqueId(int id) + { + uniqueId = id; + } int getUniqueId() const { return uniqueId; @@ -83,7 +87,7 @@ class TSymbol : angle::NonCopyable } private: - const int uniqueId; + int uniqueId; // For real comparing during code generation const TString *name; TString extension; }; @@ -225,8 +229,6 @@ class TFunction : public TSymbol mangledName = nullptr; } - void swapParameters(const TFunction ¶metersSource); - const TString &getMangledName() const override { if (mangledName == nullptr) @@ -260,8 +262,6 @@ class TFunction : public TSymbol } private: - void clearParameters(); - const TString *buildMangledName() const; typedef TVector<TConstParameter> TParamList; @@ -459,11 +459,8 @@ class TSymbolTable : angle::NonCopyable TSymbol *find(const TString &name, int shaderVersion, bool *builtIn = NULL, bool *sameScope = NULL) const; - - TSymbol *findGlobal(const TString &name) const; - TSymbol *findBuiltIn(const TString &name, int shaderVersion) const; - + TSymbolTableLevel *getOuterLevel() { assert(currentLevel() >= 1); @@ -474,15 +471,15 @@ class TSymbolTable : angle::NonCopyable bool setDefaultPrecision(const TPublicType &type, TPrecision prec) { - if (!SupportsPrecision(type.getBasicType())) + if (!SupportsPrecision(type.type)) return false; - if (type.getBasicType() == EbtUInt) + if (type.type == EbtUInt) return false; // ESSL 3.00.4 section 4.5.4 if (type.isAggregate()) return false; // Not allowed to set for aggregate types int indexOfLastElement = static_cast<int>(precisionStack.size()) - 1; // Uses map operator [], overwrites the current value - (*precisionStack[indexOfLastElement])[type.getBasicType()] = prec; + (*precisionStack[indexOfLastElement])[type.type] = prec; return true; } @@ -544,6 +541,4 @@ class TSymbolTable : angle::NonCopyable static int uniqueIdCounter; }; -} // namespace sh - #endif // COMPILER_TRANSLATOR_SYMBOLTABLE_H_ |