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
54e47cc2
Commit
54e47cc2
authored
Jul 28, 2015
by
Lei Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use const reference for TSourceLoc in interfaces.
parent
780a2f44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
56 additions
and
56 deletions
+56
-56
InfoSink.h
glslang/Include/InfoSink.h
+2
-2
Types.h
glslang/Include/Types.h
+2
-2
intermediate.h
glslang/Include/intermediate.h
+2
-2
Constant.cpp
glslang/MachineIndependent/Constant.cpp
+2
-2
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+18
-18
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+0
-0
ParseHelper.h
glslang/MachineIndependent/ParseHelper.h
+0
-0
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+10
-10
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+20
-20
No files found.
glslang/Include/InfoSink.h
View file @
54e47cc2
...
...
@@ -95,7 +95,7 @@ public:
default
:
append
(
"UNKOWN ERROR: "
);
break
;
}
}
void
location
(
TSourceLoc
loc
)
{
void
location
(
const
TSourceLoc
&
loc
)
{
const
int
maxSize
=
24
;
char
locText
[
maxSize
];
if
(
loc
.
name
!=
nullptr
)
{
...
...
@@ -112,7 +112,7 @@ public:
append
(
s
);
append
(
"
\n
"
);
}
void
message
(
TPrefixType
message
,
const
char
*
s
,
TSourceLoc
loc
)
{
void
message
(
TPrefixType
message
,
const
char
*
s
,
const
TSourceLoc
&
loc
)
{
prefix
(
message
);
location
(
loc
);
append
(
s
);
...
...
glslang/Include/Types.h
View file @
54e47cc2
...
...
@@ -798,7 +798,7 @@ public:
const
TType
*
userDef
;
TSourceLoc
loc
;
void
initType
(
TSourceLoc
l
)
void
initType
(
const
TSourceLoc
&
l
)
{
basicType
=
EbtVoid
;
vectorSize
=
1
;
...
...
@@ -816,7 +816,7 @@ public:
qualifier
.
storage
=
EvqGlobal
;
}
void
init
(
TSourceLoc
loc
,
bool
global
=
false
)
void
init
(
const
TSourceLoc
&
loc
,
bool
global
=
false
)
{
initType
(
loc
);
sampler
.
clear
();
...
...
glslang/Include/intermediate.h
View file @
54e47cc2
...
...
@@ -407,8 +407,8 @@ public:
POOL_ALLOCATOR_NEW_DELETE
(
glslang
::
GetThreadPoolAllocator
())
TIntermNode
()
{
loc
.
init
();
}
virtual
glslang
::
TSourceLoc
getLoc
()
const
{
return
loc
;
}
virtual
void
setLoc
(
glslang
::
TSourceLoc
l
)
{
loc
=
l
;
}
virtual
const
glslang
::
TSourceLoc
&
getLoc
()
const
{
return
loc
;
}
virtual
void
setLoc
(
const
glslang
::
TSourceLoc
&
l
)
{
loc
=
l
;
}
virtual
void
traverse
(
glslang
::
TIntermTraverser
*
)
=
0
;
virtual
glslang
::
TIntermTyped
*
getAsTyped
()
{
return
0
;
}
virtual
glslang
::
TIntermOperator
*
getAsOperator
()
{
return
0
;
}
...
...
glslang/MachineIndependent/Constant.cpp
View file @
54e47cc2
...
...
@@ -854,7 +854,7 @@ TIntermTyped* TIntermediate::foldConstructor(TIntermAggregate* aggrNode)
// dereference. Can handle any thing except a multi-character swizzle, though
// all swizzles may go to foldSwizzle().
//
TIntermTyped
*
TIntermediate
::
foldDereference
(
TIntermTyped
*
node
,
int
index
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
foldDereference
(
TIntermTyped
*
node
,
int
index
,
const
TSourceLoc
&
loc
)
{
TType
dereferencedType
(
node
->
getType
(),
index
);
dereferencedType
.
getQualifier
().
storage
=
EvqConst
;
...
...
@@ -883,7 +883,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, TSou
// Make a constant vector node or constant scalar node, representing a given
// constant vector and constant swizzle into it.
//
TIntermTyped
*
TIntermediate
::
foldSwizzle
(
TIntermTyped
*
node
,
TVectorFields
&
fields
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
foldSwizzle
(
TIntermTyped
*
node
,
TVectorFields
&
fields
,
const
TSourceLoc
&
loc
)
{
const
TConstUnionArray
&
unionArray
=
node
->
getAsConstantUnion
()
->
getConstArray
();
TConstUnionArray
constArray
(
fields
.
num
);
...
...
glslang/MachineIndependent/Intermediate.cpp
View file @
54e47cc2
...
...
@@ -59,7 +59,7 @@ namespace glslang {
//
// Returns the added node.
//
TIntermSymbol
*
TIntermediate
::
addSymbol
(
int
id
,
const
TString
&
name
,
const
TType
&
type
,
TSourceLoc
loc
)
TIntermSymbol
*
TIntermediate
::
addSymbol
(
int
id
,
const
TString
&
name
,
const
TType
&
type
,
const
TSourceLoc
&
loc
)
{
TIntermSymbol
*
node
=
new
TIntermSymbol
(
id
,
name
,
type
);
node
->
setLoc
(
loc
);
...
...
@@ -67,7 +67,7 @@ TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType
return
node
;
}
TIntermSymbol
*
TIntermediate
::
addSymbol
(
const
TVariable
&
variable
,
TSourceLoc
loc
)
TIntermSymbol
*
TIntermediate
::
addSymbol
(
const
TVariable
&
variable
,
const
TSourceLoc
&
loc
)
{
return
addSymbol
(
variable
.
getUniqueId
(),
variable
.
getName
(),
variable
.
getType
(),
loc
);
}
...
...
@@ -267,7 +267,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSo
return
node
;
}
TIntermTyped
*
TIntermediate
::
addBuiltInFunctionCall
(
TSourceLoc
loc
,
TOperator
op
,
bool
unary
,
TIntermNode
*
childNode
,
const
TType
&
returnType
)
TIntermTyped
*
TIntermediate
::
addBuiltInFunctionCall
(
const
TSourceLoc
&
loc
,
TOperator
op
,
bool
unary
,
TIntermNode
*
childNode
,
const
TType
&
returnType
)
{
if
(
unary
)
{
//
...
...
@@ -658,7 +658,7 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
return
aggNode
;
}
TIntermAggregate
*
TIntermediate
::
growAggregate
(
TIntermNode
*
left
,
TIntermNode
*
right
,
TSourceLoc
loc
)
TIntermAggregate
*
TIntermediate
::
growAggregate
(
TIntermNode
*
left
,
TIntermNode
*
right
,
const
TSourceLoc
&
loc
)
{
TIntermAggregate
*
aggNode
=
growAggregate
(
left
,
right
);
if
(
aggNode
)
...
...
@@ -684,7 +684,7 @@ TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node)
return
aggNode
;
}
TIntermAggregate
*
TIntermediate
::
makeAggregate
(
TIntermNode
*
node
,
TSourceLoc
loc
)
TIntermAggregate
*
TIntermediate
::
makeAggregate
(
TIntermNode
*
node
,
const
TSourceLoc
&
loc
)
{
if
(
node
==
0
)
return
0
;
...
...
@@ -703,7 +703,7 @@ TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc loc
//
// Returns the selection node created.
//
TIntermNode
*
TIntermediate
::
addSelection
(
TIntermTyped
*
cond
,
TIntermNodePair
nodePair
,
TSourceLoc
loc
)
TIntermNode
*
TIntermediate
::
addSelection
(
TIntermTyped
*
cond
,
TIntermNodePair
nodePair
,
const
TSourceLoc
&
loc
)
{
//
// Don't prune the false path for compile-time constants; it's needed
...
...
@@ -717,7 +717,7 @@ TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nod
}
TIntermTyped
*
TIntermediate
::
addComma
(
TIntermTyped
*
left
,
TIntermTyped
*
right
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
addComma
(
TIntermTyped
*
left
,
TIntermTyped
*
right
,
const
TSourceLoc
&
loc
)
{
// However, the lowest precedence operators of the sequence operator ( , ) and the assignment operators
// ... are not included in the operators that can create a constant expression.
...
...
@@ -736,7 +736,7 @@ TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, T
return
commaAggregate
;
}
TIntermTyped
*
TIntermediate
::
addMethod
(
TIntermTyped
*
object
,
const
TType
&
type
,
const
TString
*
name
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
addMethod
(
TIntermTyped
*
object
,
const
TType
&
type
,
const
TString
*
name
,
const
TSourceLoc
&
loc
)
{
TIntermMethod
*
method
=
new
TIntermMethod
(
object
,
type
,
*
name
);
method
->
setLoc
(
loc
);
...
...
@@ -751,7 +751,7 @@ TIntermTyped* TIntermediate::addMethod(TIntermTyped* object, const TType& type,
//
// Returns the selection node created, or 0 if one could not be.
//
TIntermTyped
*
TIntermediate
::
addSelection
(
TIntermTyped
*
cond
,
TIntermTyped
*
trueBlock
,
TIntermTyped
*
falseBlock
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
addSelection
(
TIntermTyped
*
cond
,
TIntermTyped
*
trueBlock
,
TIntermTyped
*
falseBlock
,
const
TSourceLoc
&
loc
)
{
//
// Get compatible types.
...
...
@@ -799,7 +799,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
// Returns the constant union node created.
//
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
const
TConstUnionArray
&
unionArray
,
const
TType
&
t
,
TSourceLoc
loc
,
bool
literal
)
const
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
const
TConstUnionArray
&
unionArray
,
const
TType
&
t
,
const
TSourceLoc
&
loc
,
bool
literal
)
const
{
TIntermConstantUnion
*
node
=
new
TIntermConstantUnion
(
unionArray
,
t
);
node
->
setLoc
(
loc
);
...
...
@@ -809,7 +809,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(const TConstUnionArray& un
return
node
;
}
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
int
i
,
TSourceLoc
loc
,
bool
literal
)
const
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
int
i
,
const
TSourceLoc
&
loc
,
bool
literal
)
const
{
TConstUnionArray
unionArray
(
1
);
unionArray
[
0
].
setIConst
(
i
);
...
...
@@ -817,7 +817,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(int i, TSourceLoc loc, boo
return
addConstantUnion
(
unionArray
,
TType
(
EbtInt
,
EvqConst
),
loc
,
literal
);
}
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
unsigned
int
u
,
TSourceLoc
loc
,
bool
literal
)
const
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
unsigned
int
u
,
const
TSourceLoc
&
loc
,
bool
literal
)
const
{
TConstUnionArray
unionArray
(
1
);
unionArray
[
0
].
setUConst
(
u
);
...
...
@@ -825,7 +825,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(unsigned int u, TSourceLoc
return
addConstantUnion
(
unionArray
,
TType
(
EbtUint
,
EvqConst
),
loc
,
literal
);
}
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
bool
b
,
TSourceLoc
loc
,
bool
literal
)
const
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
bool
b
,
const
TSourceLoc
&
loc
,
bool
literal
)
const
{
TConstUnionArray
unionArray
(
1
);
unionArray
[
0
].
setBConst
(
b
);
...
...
@@ -833,7 +833,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(bool b, TSourceLoc loc, bo
return
addConstantUnion
(
unionArray
,
TType
(
EbtBool
,
EvqConst
),
loc
,
literal
);
}
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
double
d
,
TBasicType
baseType
,
TSourceLoc
loc
,
bool
literal
)
const
TIntermConstantUnion
*
TIntermediate
::
addConstantUnion
(
double
d
,
TBasicType
baseType
,
const
TSourceLoc
&
loc
,
bool
literal
)
const
{
assert
(
baseType
==
EbtFloat
||
baseType
==
EbtDouble
);
...
...
@@ -843,7 +843,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(double d, TBasicType baseT
return
addConstantUnion
(
unionArray
,
TType
(
baseType
,
EvqConst
),
loc
,
literal
);
}
TIntermTyped
*
TIntermediate
::
addSwizzle
(
TVectorFields
&
fields
,
TSourceLoc
loc
)
TIntermTyped
*
TIntermediate
::
addSwizzle
(
TVectorFields
&
fields
,
const
TSourceLoc
&
loc
)
{
TIntermAggregate
*
node
=
new
TIntermAggregate
(
EOpSequence
);
...
...
@@ -863,7 +863,7 @@ TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc loc)
//
// Create loop nodes.
//
TIntermLoop
*
TIntermediate
::
addLoop
(
TIntermNode
*
body
,
TIntermTyped
*
test
,
TIntermTyped
*
terminal
,
bool
testFirst
,
TSourceLoc
loc
)
TIntermLoop
*
TIntermediate
::
addLoop
(
TIntermNode
*
body
,
TIntermTyped
*
test
,
TIntermTyped
*
terminal
,
bool
testFirst
,
const
TSourceLoc
&
loc
)
{
TIntermLoop
*
node
=
new
TIntermLoop
(
body
,
test
,
terminal
,
testFirst
);
node
->
setLoc
(
loc
);
...
...
@@ -874,12 +874,12 @@ TIntermLoop* TIntermediate::addLoop(TIntermNode* body, TIntermTyped* test, TInte
//
// Add branches.
//
TIntermBranch
*
TIntermediate
::
addBranch
(
TOperator
branchOp
,
TSourceLoc
loc
)
TIntermBranch
*
TIntermediate
::
addBranch
(
TOperator
branchOp
,
const
TSourceLoc
&
loc
)
{
return
addBranch
(
branchOp
,
0
,
loc
);
}
TIntermBranch
*
TIntermediate
::
addBranch
(
TOperator
branchOp
,
TIntermTyped
*
expression
,
TSourceLoc
loc
)
TIntermBranch
*
TIntermediate
::
addBranch
(
TOperator
branchOp
,
TIntermTyped
*
expression
,
const
TSourceLoc
&
loc
)
{
TIntermBranch
*
node
=
new
TIntermBranch
(
branchOp
,
expression
);
node
->
setLoc
(
loc
);
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
54e47cc2
This diff is collapsed.
Click to expand it.
glslang/MachineIndependent/ParseHelper.h
View file @
54e47cc2
This diff is collapsed.
Click to expand it.
glslang/MachineIndependent/Versions.cpp
View file @
54e47cc2
...
...
@@ -281,7 +281,7 @@ const char* TParseContext::getPreamble()
// Operation: If the current profile is not one of the profileMask,
// give an error message.
//
void
TParseContext
::
requireProfile
(
TSourceLoc
loc
,
int
profileMask
,
const
char
*
featureDesc
)
void
TParseContext
::
requireProfile
(
const
TSourceLoc
&
loc
,
int
profileMask
,
const
char
*
featureDesc
)
{
if
(
!
(
profile
&
profileMask
))
error
(
loc
,
"not supported with this profile:"
,
featureDesc
,
ProfileName
(
profile
));
...
...
@@ -320,7 +320,7 @@ const char* StageName(EShLanguage stage)
//
// entry point that takes multiple extensions
void
TParseContext
::
profileRequires
(
TSourceLoc
loc
,
int
profileMask
,
int
minVersion
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
)
void
TParseContext
::
profileRequires
(
const
TSourceLoc
&
loc
,
int
profileMask
,
int
minVersion
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
)
{
if
(
profile
&
profileMask
)
{
bool
okay
=
false
;
...
...
@@ -345,7 +345,7 @@ void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVers
}
// entry point for the above that takes a single extension
void
TParseContext
::
profileRequires
(
TSourceLoc
loc
,
int
profileMask
,
int
minVersion
,
const
char
*
extension
,
const
char
*
featureDesc
)
void
TParseContext
::
profileRequires
(
const
TSourceLoc
&
loc
,
int
profileMask
,
int
minVersion
,
const
char
*
extension
,
const
char
*
featureDesc
)
{
profileRequires
(
loc
,
profileMask
,
minVersion
,
extension
?
1
:
0
,
&
extension
,
featureDesc
);
}
...
...
@@ -357,7 +357,7 @@ void TParseContext::profileRequires(TSourceLoc loc, int profileMask, int minVers
//
// Operation: If the current stage is not present, give an error message.
//
void
TParseContext
::
requireStage
(
TSourceLoc
loc
,
EShLanguageMask
languageMask
,
const
char
*
featureDesc
)
void
TParseContext
::
requireStage
(
const
TSourceLoc
&
loc
,
EShLanguageMask
languageMask
,
const
char
*
featureDesc
)
{
if
(((
1
<<
language
)
&
languageMask
)
==
0
)
error
(
loc
,
"not supported in this stage:"
,
featureDesc
,
StageName
(
language
));
...
...
@@ -365,7 +365,7 @@ void TParseContext::requireStage(TSourceLoc loc, EShLanguageMask languageMask, c
// If only one stage supports a feature, this can be called. But, all supporting stages
// must be specified with one call.
void
TParseContext
::
requireStage
(
TSourceLoc
loc
,
EShLanguage
stage
,
const
char
*
featureDesc
)
void
TParseContext
::
requireStage
(
const
TSourceLoc
&
loc
,
EShLanguage
stage
,
const
char
*
featureDesc
)
{
requireStage
(
loc
,
static_cast
<
EShLanguageMask
>
(
1
<<
stage
),
featureDesc
);
}
...
...
@@ -374,7 +374,7 @@ void TParseContext::requireStage(TSourceLoc loc, EShLanguage stage, const char*
// Within a set of profiles, see if a feature is deprecated and give an error or warning based on whether
// a future compatibility context is being use.
//
void
TParseContext
::
checkDeprecated
(
TSourceLoc
loc
,
int
profileMask
,
int
depVersion
,
const
char
*
featureDesc
)
void
TParseContext
::
checkDeprecated
(
const
TSourceLoc
&
loc
,
int
profileMask
,
int
depVersion
,
const
char
*
featureDesc
)
{
if
(
profile
&
profileMask
)
{
if
(
version
>=
depVersion
)
{
...
...
@@ -391,7 +391,7 @@ void TParseContext::checkDeprecated(TSourceLoc loc, int profileMask, int depVers
// Within a set of profiles, see if a feature has now been removed and if so, give an error.
// The version argument is the first version no longer having the feature.
//
void
TParseContext
::
requireNotRemoved
(
TSourceLoc
loc
,
int
profileMask
,
int
removedVersion
,
const
char
*
featureDesc
)
void
TParseContext
::
requireNotRemoved
(
const
TSourceLoc
&
loc
,
int
profileMask
,
int
removedVersion
,
const
char
*
featureDesc
)
{
if
(
profile
&
profileMask
)
{
if
(
version
>=
removedVersion
)
{
...
...
@@ -407,7 +407,7 @@ void TParseContext::requireNotRemoved(TSourceLoc loc, int profileMask, int remov
// Use when there are no profile/version to check, it's just an error if one of the
// extensions is not present.
//
void
TParseContext
::
requireExtensions
(
TSourceLoc
loc
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
)
void
TParseContext
::
requireExtensions
(
const
TSourceLoc
&
loc
,
int
numExtensions
,
const
char
*
const
extensions
[],
const
char
*
featureDesc
)
{
// First, see if any of the extensions are enabled
for
(
int
i
=
0
;
i
<
numExtensions
;
++
i
)
{
...
...
@@ -567,7 +567,7 @@ void TParseContext::updateExtensionBehavior(const char* extension, TExtensionBeh
//
// Call for any operation needing full GLSL integer data-type support.
//
void
TParseContext
::
fullIntegerCheck
(
TSourceLoc
loc
,
const
char
*
op
)
void
TParseContext
::
fullIntegerCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
{
profileRequires
(
loc
,
ENoProfile
,
130
,
nullptr
,
op
);
profileRequires
(
loc
,
EEsProfile
,
300
,
nullptr
,
op
);
...
...
@@ -576,7 +576,7 @@ void TParseContext::fullIntegerCheck(TSourceLoc loc, const char* op)
//
// Call for any operation needing GLSL double data-type support.
//
void
TParseContext
::
doubleCheck
(
TSourceLoc
loc
,
const
char
*
op
)
void
TParseContext
::
doubleCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
{
requireProfile
(
loc
,
ECoreProfile
|
ECompatibilityProfile
,
op
);
profileRequires
(
loc
,
ECoreProfile
,
400
,
nullptr
,
op
);
...
...
glslang/MachineIndependent/localintermediate.h
View file @
54e47cc2
...
...
@@ -155,42 +155,42 @@ public:
int
getNumErrors
()
const
{
return
numErrors
;
}
bool
isRecursive
()
const
{
return
recursive
;
}
TIntermSymbol
*
addSymbol
(
int
Id
,
const
TString
&
,
const
TType
&
,
TSourceLoc
);
TIntermSymbol
*
addSymbol
(
const
TVariable
&
,
TSourceLoc
);
TIntermSymbol
*
addSymbol
(
int
Id
,
const
TString
&
,
const
TType
&
,
const
TSourceLoc
&
);
TIntermSymbol
*
addSymbol
(
const
TVariable
&
,
const
TSourceLoc
&
);
TIntermTyped
*
addConversion
(
TOperator
,
const
TType
&
,
TIntermTyped
*
)
const
;
TIntermTyped
*
addBinaryMath
(
TOperator
,
TIntermTyped
*
left
,
TIntermTyped
*
right
,
TSourceLoc
);
TIntermTyped
*
addAssign
(
TOperator
op
,
TIntermTyped
*
left
,
TIntermTyped
*
right
,
TSourceLoc
);
TIntermTyped
*
addIndex
(
TOperator
op
,
TIntermTyped
*
base
,
TIntermTyped
*
index
,
TSourceLoc
);
TIntermTyped
*
addUnaryMath
(
TOperator
,
TIntermTyped
*
child
,
TSourceLoc
);
TIntermTyped
*
addBuiltInFunctionCall
(
TSourceLoc
line
,
TOperator
,
bool
unary
,
TIntermNode
*
,
const
TType
&
returnType
);
TIntermTyped
*
addBuiltInFunctionCall
(
const
TSourceLoc
&
line
,
TOperator
,
bool
unary
,
TIntermNode
*
,
const
TType
&
returnType
);
bool
canImplicitlyPromote
(
TBasicType
from
,
TBasicType
to
)
const
;
TIntermAggregate
*
growAggregate
(
TIntermNode
*
left
,
TIntermNode
*
right
);
TIntermAggregate
*
growAggregate
(
TIntermNode
*
left
,
TIntermNode
*
right
,
TSourceLoc
);
TIntermAggregate
*
growAggregate
(
TIntermNode
*
left
,
TIntermNode
*
right
,
const
TSourceLoc
&
);
TIntermAggregate
*
makeAggregate
(
TIntermNode
*
node
);
TIntermAggregate
*
makeAggregate
(
TIntermNode
*
node
,
TSourceLoc
);
TIntermAggregate
*
makeAggregate
(
TIntermNode
*
node
,
const
TSourceLoc
&
);
TIntermTyped
*
setAggregateOperator
(
TIntermNode
*
,
TOperator
,
const
TType
&
type
,
TSourceLoc
);
bool
areAllChildConst
(
TIntermAggregate
*
aggrNode
);
TIntermNode
*
addSelection
(
TIntermTyped
*
cond
,
TIntermNodePair
code
,
TSourceLoc
);
TIntermTyped
*
addSelection
(
TIntermTyped
*
cond
,
TIntermTyped
*
trueBlock
,
TIntermTyped
*
falseBlock
,
TSourceLoc
);
TIntermTyped
*
addComma
(
TIntermTyped
*
left
,
TIntermTyped
*
right
,
TSourceLoc
);
TIntermTyped
*
addMethod
(
TIntermTyped
*
,
const
TType
&
,
const
TString
*
,
TSourceLoc
);
TIntermConstantUnion
*
addConstantUnion
(
const
TConstUnionArray
&
,
const
TType
&
,
TSourceLoc
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
int
,
TSourceLoc
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
unsigned
int
,
TSourceLoc
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
bool
,
TSourceLoc
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
double
,
TBasicType
,
TSourceLoc
,
bool
literal
=
false
)
const
;
TIntermNode
*
addSelection
(
TIntermTyped
*
cond
,
TIntermNodePair
code
,
const
TSourceLoc
&
);
TIntermTyped
*
addSelection
(
TIntermTyped
*
cond
,
TIntermTyped
*
trueBlock
,
TIntermTyped
*
falseBlock
,
const
TSourceLoc
&
);
TIntermTyped
*
addComma
(
TIntermTyped
*
left
,
TIntermTyped
*
right
,
const
TSourceLoc
&
);
TIntermTyped
*
addMethod
(
TIntermTyped
*
,
const
TType
&
,
const
TString
*
,
const
TSourceLoc
&
);
TIntermConstantUnion
*
addConstantUnion
(
const
TConstUnionArray
&
,
const
TType
&
,
const
TSourceLoc
&
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
int
,
const
TSourceLoc
&
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
unsigned
int
,
const
TSourceLoc
&
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
bool
,
const
TSourceLoc
&
,
bool
literal
=
false
)
const
;
TIntermConstantUnion
*
addConstantUnion
(
double
,
TBasicType
,
const
TSourceLoc
&
,
bool
literal
=
false
)
const
;
TIntermTyped
*
promoteConstantUnion
(
TBasicType
,
TIntermConstantUnion
*
)
const
;
bool
parseConstTree
(
TIntermNode
*
,
TConstUnionArray
,
TOperator
,
const
TType
&
,
bool
singleConstantParam
=
false
);
TIntermLoop
*
addLoop
(
TIntermNode
*
,
TIntermTyped
*
,
TIntermTyped
*
,
bool
testFirst
,
TSourceLoc
);
TIntermBranch
*
addBranch
(
TOperator
,
TSourceLoc
);
TIntermBranch
*
addBranch
(
TOperator
,
TIntermTyped
*
,
TSourceLoc
);
TIntermTyped
*
addSwizzle
(
TVectorFields
&
,
TSourceLoc
);
TIntermLoop
*
addLoop
(
TIntermNode
*
,
TIntermTyped
*
,
TIntermTyped
*
,
bool
testFirst
,
const
TSourceLoc
&
);
TIntermBranch
*
addBranch
(
TOperator
,
const
TSourceLoc
&
);
TIntermBranch
*
addBranch
(
TOperator
,
TIntermTyped
*
,
const
TSourceLoc
&
);
TIntermTyped
*
addSwizzle
(
TVectorFields
&
,
const
TSourceLoc
&
);
// Constant folding (in Constant.cpp)
TIntermTyped
*
fold
(
TIntermAggregate
*
aggrNode
);
TIntermTyped
*
foldConstructor
(
TIntermAggregate
*
aggrNode
);
TIntermTyped
*
foldDereference
(
TIntermTyped
*
node
,
int
index
,
TSourceLoc
);
TIntermTyped
*
foldSwizzle
(
TIntermTyped
*
node
,
TVectorFields
&
fields
,
TSourceLoc
);
TIntermTyped
*
foldDereference
(
TIntermTyped
*
node
,
int
index
,
const
TSourceLoc
&
);
TIntermTyped
*
foldSwizzle
(
TIntermTyped
*
node
,
TVectorFields
&
fields
,
const
TSourceLoc
&
);
// Linkage related
void
addSymbolLinkageNodes
(
TIntermAggregate
*&
linkage
,
EShLanguage
,
TSymbolTable
&
);
...
...
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