Memory management hygiene: Use compare() instead of substr(), and put a few more things intrinsically in the memory pool.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23467 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-10-11 16:28:43 +00:00
parent 3afe67dcc2
commit 4c70685382
10 changed files with 45 additions and 41 deletions

View file

@ -800,7 +800,7 @@ block_structure
identifier_list
: COMMA IDENTIFIER {
$$ = NewPoolTIdentifierList();
$$ = new TIdentifierList;
$$->push_back($2.string);
}
| identifier_list COMMA IDENTIFIER {
@ -1291,12 +1291,12 @@ type_specifier
array_specifier
: LEFT_BRACKET RIGHT_BRACKET {
$$.loc = $1.loc;
$$.arraySizes = NewPoolTArraySizes();
$$.arraySizes = new TArraySizes;
$$.arraySizes->setSize(0);
}
| LEFT_BRACKET constant_expression RIGHT_BRACKET {
$$.loc = $1.loc;
$$.arraySizes = NewPoolTArraySizes();
$$.arraySizes = new TArraySizes;
int size;
parseContext.arraySizeCheck($2->getLoc(), $2, size);
@ -2051,7 +2051,7 @@ struct_declaration
struct_declarator_list
: struct_declarator {
$$ = NewPoolTTypeList();
$$ = new TTypeList;
$$->push_back($1);
}
| struct_declarator_list COMMA struct_declarator {