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
3841b8e0
Commit
3841b8e0
authored
Sep 10, 2013
by
Shannon Woods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Eliminate bitfield enum members."
This reverts commit
56702e6d
.
parent
0d7e7d49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
35 deletions
+35
-35
Intermediate.cpp
src/compiler/Intermediate.cpp
+10
-10
Types.h
src/compiler/Types.h
+21
-21
intermediate.h
src/compiler/intermediate.h
+4
-4
No files found.
src/compiler/Intermediate.cpp
View file @
3841b8e0
...
@@ -1262,12 +1262,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1262,12 +1262,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
return
0
;
return
0
;
}
}
const
char
leftCols
=
getCols
();
const
int
leftCols
=
getCols
();
const
char
leftRows
=
getRows
();
const
int
leftRows
=
getRows
();
const
char
rightCols
=
constantNode
->
getType
().
getCols
();
const
int
rightCols
=
constantNode
->
getType
().
getCols
();
const
char
rightRows
=
constantNode
->
getType
().
getRows
();
const
int
rightRows
=
constantNode
->
getType
().
getRows
();
const
char
resultCols
=
rightCols
;
const
int
resultCols
=
rightCols
;
const
char
resultRows
=
leftRows
;
const
int
resultRows
=
leftRows
;
tempConstArray
=
new
ConstantUnion
[
resultCols
*
resultRows
];
tempConstArray
=
new
ConstantUnion
[
resultCols
*
resultRows
];
for
(
int
row
=
0
;
row
<
resultRows
;
row
++
)
for
(
int
row
=
0
;
row
<
resultRows
;
row
++
)
...
@@ -1347,8 +1347,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1347,8 +1347,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
return
0
;
return
0
;
}
}
const
char
matrixCols
=
getCols
();
const
int
matrixCols
=
getCols
();
const
char
matrixRows
=
getRows
();
const
int
matrixRows
=
getRows
();
tempConstArray
=
new
ConstantUnion
[
matrixRows
];
tempConstArray
=
new
ConstantUnion
[
matrixRows
];
...
@@ -1378,8 +1378,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1378,8 +1378,8 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
return
0
;
return
0
;
}
}
const
char
matrixCols
=
constantNode
->
getType
().
getCols
();
const
int
matrixCols
=
constantNode
->
getType
().
getCols
();
const
char
matrixRows
=
constantNode
->
getType
().
getRows
();
const
int
matrixRows
=
constantNode
->
getType
().
getRows
();
tempConstArray
=
new
ConstantUnion
[
matrixCols
];
tempConstArray
=
new
ConstantUnion
[
matrixCols
];
...
...
src/compiler/Types.h
View file @
3841b8e0
...
@@ -140,7 +140,7 @@ class TType
...
@@ -140,7 +140,7 @@ class TType
public
:
public
:
POOL_ALLOCATOR_NEW_DELETE
(
GlobalPoolAllocator
)
POOL_ALLOCATOR_NEW_DELETE
(
GlobalPoolAllocator
)
TType
()
{}
TType
()
{}
TType
(
TBasicType
t
,
TPrecision
p
,
TQualifier
q
=
EvqTemporary
,
char
ps
=
1
,
char
ss
=
1
,
bool
a
=
false
)
:
TType
(
TBasicType
t
,
TPrecision
p
,
TQualifier
q
=
EvqTemporary
,
int
ps
=
1
,
int
ss
=
1
,
bool
a
=
false
)
:
type
(
t
),
precision
(
p
),
qualifier
(
q
),
primarySize
(
ps
),
secondarySize
(
ss
),
array
(
a
),
layoutQualifier
(
TLayoutQualifier
::
create
()),
arraySize
(
0
),
type
(
t
),
precision
(
p
),
qualifier
(
q
),
primarySize
(
ps
),
secondarySize
(
ss
),
array
(
a
),
layoutQualifier
(
TLayoutQualifier
::
create
()),
arraySize
(
0
),
interfaceBlock
(
0
),
structure
(
0
)
interfaceBlock
(
0
),
structure
(
0
)
{
{
...
@@ -169,12 +169,12 @@ public:
...
@@ -169,12 +169,12 @@ public:
TLayoutQualifier
getLayoutQualifier
()
const
{
return
layoutQualifier
;
}
TLayoutQualifier
getLayoutQualifier
()
const
{
return
layoutQualifier
;
}
void
setLayoutQualifier
(
TLayoutQualifier
lq
)
{
layoutQualifier
=
lq
;
}
void
setLayoutQualifier
(
TLayoutQualifier
lq
)
{
layoutQualifier
=
lq
;
}
char
getNominalSize
()
const
{
return
primarySize
;
}
int
getNominalSize
()
const
{
return
primarySize
;
}
char
getSecondarySize
()
const
{
return
secondarySize
;
}
int
getSecondarySize
()
const
{
return
secondarySize
;
}
char
getCols
()
const
{
ASSERT
(
isMatrix
());
return
primarySize
;
}
int
getCols
()
const
{
ASSERT
(
isMatrix
());
return
primarySize
;
}
char
getRows
()
const
{
ASSERT
(
isMatrix
());
return
secondarySize
;
}
int
getRows
()
const
{
ASSERT
(
isMatrix
());
return
secondarySize
;
}
void
setPrimarySize
(
char
ps
)
{
primarySize
=
ps
;
}
void
setPrimarySize
(
int
ps
)
{
primarySize
=
ps
;
}
void
setSecondarySize
(
char
ss
)
{
secondarySize
=
ss
;
}
void
setSecondarySize
(
int
ss
)
{
secondarySize
=
ss
;
}
// Full size of single instance of type
// Full size of single instance of type
size_t
getObjectSize
()
const
;
size_t
getObjectSize
()
const
;
...
@@ -258,18 +258,18 @@ public:
...
@@ -258,18 +258,18 @@ public:
return
structure
?
structure
->
containsArrays
()
:
false
;
return
structure
?
structure
->
containsArrays
()
:
false
;
}
}
pr
ivate
:
pr
otected
:
TString
buildMangledName
()
const
;
TString
buildMangledName
()
const
;
size_t
getStructSize
()
const
;
size_t
getStructSize
()
const
;
void
computeDeepestStructNesting
();
void
computeDeepestStructNesting
();
TBasicType
type
;
TBasicType
type
:
6
;
TPrecision
precision
;
TPrecision
precision
:
4
;
TQualifier
qualifier
;
TQualifier
qualifier
:
7
;
unsigned
int
array
:
1
;
TLayoutQualifier
layoutQualifier
;
TLayoutQualifier
layoutQualifier
;
char
primarySize
;
// size of vector or cols matrix
int
primarySize
;
// size of vector or cols matrix
char
secondarySize
;
// rows of a matrix
int
secondarySize
;
// rows of a matrix
bool
array
;
int
arraySize
;
int
arraySize
;
// 0 unless this is an interface block, or interface block member variable
// 0 unless this is an interface block, or interface block member variable
...
@@ -296,8 +296,8 @@ struct TPublicType
...
@@ -296,8 +296,8 @@ struct TPublicType
TLayoutQualifier
layoutQualifier
;
TLayoutQualifier
layoutQualifier
;
TQualifier
qualifier
;
TQualifier
qualifier
;
TPrecision
precision
;
TPrecision
precision
;
char
primarySize
;
// size of vector or cols of matrix
int
primarySize
;
// size of vector or cols of matrix
char
secondarySize
;
// rows of matrix
int
secondarySize
;
// rows of matrix
bool
array
;
bool
array
;
int
arraySize
;
int
arraySize
;
TType
*
userDef
;
TType
*
userDef
;
...
@@ -317,12 +317,12 @@ struct TPublicType
...
@@ -317,12 +317,12 @@ struct TPublicType
line
=
ln
;
line
=
ln
;
}
}
void
setAggregate
(
char
size
)
void
setAggregate
(
int
size
)
{
{
primarySize
=
size
;
primarySize
=
size
;
}
}
void
setMatrix
(
char
c
,
char
r
)
void
setMatrix
(
int
c
,
int
r
)
{
{
ASSERT
(
c
>
1
&&
r
>
1
&&
c
<=
4
&&
r
<=
4
);
ASSERT
(
c
>
1
&&
r
>
1
&&
c
<=
4
&&
r
<=
4
);
primarySize
=
c
;
primarySize
=
c
;
...
@@ -355,19 +355,19 @@ struct TPublicType
...
@@ -355,19 +355,19 @@ struct TPublicType
return
primarySize
>
1
&&
secondarySize
==
1
;
return
primarySize
>
1
&&
secondarySize
==
1
;
}
}
char
getCols
()
const
int
getCols
()
const
{
{
ASSERT
(
isMatrix
());
ASSERT
(
isMatrix
());
return
primarySize
;
return
primarySize
;
}
}
char
getRows
()
const
int
getRows
()
const
{
{
ASSERT
(
isMatrix
());
ASSERT
(
isMatrix
());
return
secondarySize
;
return
secondarySize
;
}
}
char
getNominalSize
()
const
int
getNominalSize
()
const
{
{
return
primarySize
;
return
primarySize
;
}
}
...
...
src/compiler/intermediate.h
View file @
3841b8e0
...
@@ -266,10 +266,10 @@ public:
...
@@ -266,10 +266,10 @@ public:
TBasicType
getBasicType
()
const
{
return
type
.
getBasicType
();
}
TBasicType
getBasicType
()
const
{
return
type
.
getBasicType
();
}
TQualifier
getQualifier
()
const
{
return
type
.
getQualifier
();
}
TQualifier
getQualifier
()
const
{
return
type
.
getQualifier
();
}
TPrecision
getPrecision
()
const
{
return
type
.
getPrecision
();
}
TPrecision
getPrecision
()
const
{
return
type
.
getPrecision
();
}
char
getCols
()
const
{
return
type
.
getCols
();
}
int
getCols
()
const
{
return
type
.
getCols
();
}
char
getRows
()
const
{
return
type
.
getRows
();
}
int
getRows
()
const
{
return
type
.
getRows
();
}
char
getNominalSize
()
const
{
return
type
.
getNominalSize
();
}
int
getNominalSize
()
const
{
return
type
.
getNominalSize
();
}
char
getSecondarySize
()
const
{
return
type
.
getSecondarySize
();
}
int
getSecondarySize
()
const
{
return
type
.
getSecondarySize
();
}
bool
isInterfaceBlock
()
const
{
return
type
.
isInterfaceBlock
();
}
bool
isInterfaceBlock
()
const
{
return
type
.
isInterfaceBlock
();
}
bool
isMatrix
()
const
{
return
type
.
isMatrix
();
}
bool
isMatrix
()
const
{
return
type
.
isMatrix
();
}
...
...
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