Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
f4ba25e0
Commit
f4ba25e0
authored
Mar 21, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Non-functional: the symbol field of a token was in practice unused; remove it.
Another precurser to getting member non-static functions working.
parent
5a839069
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
12 deletions
+8
-12
revision.h
glslang/Include/revision.h
+2
-2
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+2
-4
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-3
hlslParseHelper.h
hlsl/hlslParseHelper.h
+1
-1
hlslScanContext.h
hlsl/hlslScanContext.h
+1
-2
No files found.
glslang/Include/revision.h
View file @
f4ba25e0
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// 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).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.192
2
"
#define GLSLANG_REVISION "Overload400-PrecQual.192
3
"
#define GLSLANG_DATE "
19
-Mar-2017"
#define GLSLANG_DATE "
21
-Mar-2017"
hlsl/hlslGrammar.cpp
View file @
f4ba25e0
...
@@ -109,7 +109,6 @@ bool HlslGrammar::acceptIdentifier(HlslToken& idToken)
...
@@ -109,7 +109,6 @@ bool HlslGrammar::acceptIdentifier(HlslToken& idToken)
token
.
string
=
idString
;
token
.
string
=
idString
;
token
.
tokenClass
=
EHTokIdentifier
;
token
.
tokenClass
=
EHTokIdentifier
;
token
.
symbol
=
nullptr
;
idToken
=
token
;
idToken
=
token
;
advanceToken
();
advanceToken
();
...
@@ -1298,8 +1297,7 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList)
...
@@ -1298,8 +1297,7 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList)
// An identifier could be for a user-defined type.
// An identifier could be for a user-defined type.
// Note we cache the symbol table lookup, to save for a later rule
// Note we cache the symbol table lookup, to save for a later rule
// when this is not a type.
// when this is not a type.
token
.
symbol
=
parseContext
.
lookupUserType
(
*
token
.
string
,
type
);
if
(
parseContext
.
lookupUserType
(
*
token
.
string
,
type
)
!=
nullptr
)
{
if
(
token
.
symbol
!=
nullptr
)
{
advanceToken
();
advanceToken
();
return
true
;
return
true
;
}
else
}
else
...
@@ -2650,7 +2648,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
...
@@ -2650,7 +2648,7 @@ bool HlslGrammar::acceptPostfixExpression(TIntermTyped*& node)
return
false
;
return
false
;
}
}
}
else
if
(
!
peekTokenClass
(
EHTokLeftParen
))
{
}
else
if
(
!
peekTokenClass
(
EHTokLeftParen
))
{
node
=
parseContext
.
handleVariable
(
idToken
.
loc
,
idToken
.
s
ymbol
,
idToken
.
s
tring
);
node
=
parseContext
.
handleVariable
(
idToken
.
loc
,
idToken
.
string
);
}
else
if
(
acceptFunctionCall
(
idToken
,
node
))
{
}
else
if
(
acceptFunctionCall
(
idToken
,
node
))
{
// function_call (nothing else to do yet)
// function_call (nothing else to do yet)
}
else
{
}
else
{
...
...
hlsl/hlslParseHelper.cpp
View file @
f4ba25e0
...
@@ -601,10 +601,9 @@ int HlslParseContext::getMatrixComponentsColumn(int rows, const TSwizzleSelector
...
@@ -601,10 +601,9 @@ int HlslParseContext::getMatrixComponentsColumn(int rows, const TSwizzleSelector
//
//
// Handle seeing a variable identifier in the grammar.
// 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
)
TSymbol
*
symbol
=
symbolTable
.
find
(
*
string
);
symbol
=
symbolTable
.
find
(
*
string
);
if
(
symbol
&&
symbol
->
getAsVariable
()
&&
symbol
->
getAsVariable
()
->
isUserType
())
{
if
(
symbol
&&
symbol
->
getAsVariable
()
&&
symbol
->
getAsVariable
()
->
isUserType
())
{
error
(
loc
,
"expected symbol, not user-defined type"
,
string
->
c_str
(),
""
);
error
(
loc
,
"expected symbol, not user-defined type"
,
string
->
c_str
(),
""
);
return
nullptr
;
return
nullptr
;
...
...
hlsl/hlslParseHelper.h
View file @
f4ba25e0
...
@@ -62,7 +62,7 @@ public:
...
@@ -62,7 +62,7 @@ public:
bool
builtInName
(
const
TString
&
);
bool
builtInName
(
const
TString
&
);
void
handlePragma
(
const
TSourceLoc
&
,
const
TVector
<
TString
>&
)
override
;
void
handlePragma
(
const
TSourceLoc
&
,
const
TVector
<
TString
>&
)
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
*
handleBracketDereference
(
const
TSourceLoc
&
,
TIntermTyped
*
base
,
TIntermTyped
*
index
);
TIntermTyped
*
handleBracketOperator
(
const
TSourceLoc
&
,
TIntermTyped
*
base
,
TIntermTyped
*
index
);
TIntermTyped
*
handleBracketOperator
(
const
TSourceLoc
&
,
TIntermTyped
*
base
,
TIntermTyped
*
index
);
void
checkIndex
(
const
TSourceLoc
&
,
const
TType
&
,
int
&
index
);
void
checkIndex
(
const
TSourceLoc
&
,
const
TType
&
,
int
&
index
);
...
...
hlsl/hlslScanContext.h
View file @
f4ba25e0
...
@@ -54,7 +54,7 @@ class TPpToken;
...
@@ -54,7 +54,7 @@ class TPpToken;
// Everything needed to fully describe a token.
// Everything needed to fully describe a token.
//
//
struct
HlslToken
{
struct
HlslToken
{
HlslToken
()
:
string
(
nullptr
)
,
symbol
(
nullptr
)
{
loc
.
init
();
}
HlslToken
()
:
string
(
nullptr
)
{
loc
.
init
();
}
TSourceLoc
loc
;
// location of token in the source
TSourceLoc
loc
;
// location of token in the source
EHlslTokenClass
tokenClass
;
// what kind of token it is
EHlslTokenClass
tokenClass
;
// what kind of token it is
union
{
// what data the token holds
union
{
// what data the token holds
...
@@ -64,7 +64,6 @@ struct HlslToken {
...
@@ -64,7 +64,6 @@ struct HlslToken {
bool
b
;
bool
b
;
double
d
;
double
d
;
};
};
glslang
::
TSymbol
*
symbol
;
// if a symbol-table lookup was done already, this is the result
};
};
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment