diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 48929976..da9de2d5 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1922" -#define GLSLANG_DATE "19-Mar-2017" +#define GLSLANG_REVISION "Overload400-PrecQual.1923" +#define GLSLANG_DATE "21-Mar-2017" diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp index ef7fa140..0e54be52 100755 --- a/hlsl/hlslGrammar.cpp +++ b/hlsl/hlslGrammar.cpp @@ -109,7 +109,6 @@ bool HlslGrammar::acceptIdentifier(HlslToken& idToken) token.string = idString; token.tokenClass = EHTokIdentifier; - token.symbol = nullptr; idToken = token; advanceToken(); @@ -1298,8 +1297,7 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) // An identifier could be for a user-defined type. // Note we cache the symbol table lookup, to save for a later rule // when this is not a type. - token.symbol = parseContext.lookupUserType(*token.string, type); - if (token.symbol != nullptr) { + if (parseContext.lookupUserType(*token.string, type) != nullptr) { advanceToken(); return true; } else @@ -2650,7 +2648,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node) return false; } } else if (! peekTokenClass(EHTokLeftParen)) { - node = parseContext.handleVariable(idToken.loc, idToken.symbol, idToken.string); + node = parseContext.handleVariable(idToken.loc, idToken.string); } else if (acceptFunctionCall(idToken, node)) { // function_call (nothing else to do yet) } else { diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index d7de0fdd..31aa1d32 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -601,10 +601,9 @@ int HlslParseContext::getMatrixComponentsColumn(int rows, const TSwizzleSelector // // Handle seeing a variable identifier in the grammar. // -TIntermTyped* HlslParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symbol, const TString* string) +TIntermTyped* HlslParseContext::handleVariable(const TSourceLoc& loc, const TString* string) { - if (symbol == nullptr) - symbol = symbolTable.find(*string); + TSymbol* symbol = symbolTable.find(*string); if (symbol && symbol->getAsVariable() && symbol->getAsVariable()->isUserType()) { error(loc, "expected symbol, not user-defined type", string->c_str(), ""); return nullptr; diff --git a/hlsl/hlslParseHelper.h b/hlsl/hlslParseHelper.h index aa529b67..b68f117e 100755 --- a/hlsl/hlslParseHelper.h +++ b/hlsl/hlslParseHelper.h @@ -62,7 +62,7 @@ public: bool builtInName(const TString&); void handlePragma(const TSourceLoc&, const TVector&) override; - TIntermTyped* handleVariable(const TSourceLoc&, TSymbol* symbol, const TString* string); + TIntermTyped* handleVariable(const TSourceLoc&, const TString* string); TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); TIntermTyped* handleBracketOperator(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void checkIndex(const TSourceLoc&, const TType&, int& index); diff --git a/hlsl/hlslScanContext.h b/hlsl/hlslScanContext.h index c6f47ff5..9d30a12e 100755 --- a/hlsl/hlslScanContext.h +++ b/hlsl/hlslScanContext.h @@ -54,7 +54,7 @@ class TPpToken; // Everything needed to fully describe a token. // struct HlslToken { - HlslToken() : string(nullptr), symbol(nullptr) { loc.init(); } + HlslToken() : string(nullptr) { loc.init(); } TSourceLoc loc; // location of token in the source EHlslTokenClass tokenClass; // what kind of token it is union { // what data the token holds @@ -64,7 +64,6 @@ struct HlslToken { bool b; double d; }; - glslang::TSymbol* symbol; // if a symbol-table lookup was done already, this is the result }; //