Memory: Put pragma tables in the pool.
Fixes #916 (the last change covered by the PR). 3rd list item in #976.
This commit is contained in:
parent
cbdf871d7f
commit
fd1d07daf1
5 changed files with 12 additions and 9 deletions
|
|
@ -3170,10 +3170,10 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC
|
|||
node->getLoc());
|
||||
}
|
||||
|
||||
void TIntermAggregate::addToPragmaTable(const TPragmaTable& pTable)
|
||||
void TIntermAggregate::setPragmaTable(const TPragmaTable& pTable)
|
||||
{
|
||||
assert(!pragmaTable);
|
||||
pragmaTable = new TPragmaTable();
|
||||
assert(pragmaTable == nullptr);
|
||||
pragmaTable = new TPragmaTable;
|
||||
*pragmaTable = pTable;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2916,7 +2916,7 @@ function_definition
|
|||
// information. This information can be queried from the parse tree
|
||||
$$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
|
||||
$$->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
|
||||
$$->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
|
||||
$$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -7975,7 +7975,7 @@ yyreduce:
|
|||
// information. This information can be queried from the parse tree
|
||||
(yyval.interm.intermNode)->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize);
|
||||
(yyval.interm.intermNode)->getAsAggregate()->setDebug(parseContext.contextPragma.debug);
|
||||
(yyval.interm.intermNode)->getAsAggregate()->addToPragmaTable(parseContext.contextPragma.pragmaTable);
|
||||
(yyval.interm.intermNode)->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable);
|
||||
}
|
||||
#line 7981 "MachineIndependent/glslang_tab.cpp" /* yacc.c:1646 */
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue