Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
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
angle
Commits
58aa4e40
Commit
58aa4e40
authored
Jul 18, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate isVariableBuiltIn.
TRAC #21840 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
d4ceab12
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
25 deletions
+3
-25
ParseHelper.cpp
src/compiler/ParseHelper.cpp
+0
-21
ParseHelper.h
src/compiler/ParseHelper.h
+1
-2
glslang.y
src/compiler/glslang.y
+1
-1
glslang_tab.cpp
src/compiler/glslang_tab.cpp
+1
-1
No files found.
src/compiler/ParseHelper.cpp
View file @
58aa4e40
...
...
@@ -926,27 +926,6 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& line, TFunction*
return
static_cast
<
const
TFunction
*>
(
symbol
);
}
bool
TParseContext
::
isVariableBuiltIn
(
const
TVariable
*
var
)
{
bool
builtIn
=
false
;
// First find by unmangled name to check whether the function name has been
// hidden by a variable name or struct typename.
const
TSymbol
*
symbol
=
symbolTable
.
find
(
var
->
getName
(),
&
builtIn
);
if
(
symbol
==
0
)
{
symbol
=
symbolTable
.
find
(
var
->
getMangledName
(),
&
builtIn
);
}
if
(
symbol
==
0
)
{
return
false
;
}
if
(
!
symbol
->
isVariable
())
{
return
false
;
}
return
builtIn
;
}
//
// Initializers show up in several places in the grammar. Have one set of
// code to handle them here.
...
...
src/compiler/ParseHelper.h
View file @
58aa4e40
//
// Copyright (c) 2002-201
2
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
...
...
@@ -105,7 +105,6 @@ struct TParseContext {
bool
containsSampler
(
TType
&
type
);
bool
areAllChildConst
(
TIntermAggregate
*
aggrNode
);
const
TFunction
*
findFunction
(
const
TSourceLoc
&
line
,
TFunction
*
pfnCall
,
bool
*
builtIn
=
0
);
bool
isVariableBuiltIn
(
const
TVariable
*
pVar
);
bool
executeInitializer
(
const
TSourceLoc
&
line
,
TString
&
identifier
,
TPublicType
&
pType
,
TIntermTyped
*
initializer
,
TIntermNode
*&
intermNode
,
TVariable
*
variable
=
0
);
...
...
src/compiler/glslang.y
View file @
58aa4e40
...
...
@@ -200,7 +200,7 @@ variable_identifier
variable = static_cast<const TVariable*>(symbol);
if (context->
isVariableBuiltIn(variable) &&
if (context->
symbolTable.findBuiltIn(variable->getName()) &&
!variable->getExtension().empty() &&
context->extensionErrorCheck(@1, variable->getExtension())) {
context->recover();
...
...
src/compiler/glslang_tab.cpp
View file @
58aa4e40
...
...
@@ -2265,7 +2265,7 @@ yyreduce:
variable
=
static_cast
<
const
TVariable
*>
(
symbol
);
if
(
context
->
isVariableBuiltIn
(
variable
)
&&
if
(
context
->
symbolTable
.
findBuiltIn
(
variable
->
getName
())
&&
!
variable
->
getExtension
().
empty
()
&&
context
->
extensionErrorCheck
((
yylsp
[(
1
)
-
(
1
)]),
variable
->
getExtension
()))
{
context
->
recover
();
...
...
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