Commit fd35e3dd by alokp@chromium.org

We don't need to keep the param variable around for function prototypes.

Saves 20% memory for global symbol initialization R=alokp@chromium.org Review URL: https://codereview.appspot.com/9152043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@2196 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e0b8416a
......@@ -967,9 +967,9 @@ declaration
const TParameter &param = function.getParam(i);
if (param.name != 0)
{
TVariable *variable = new TVariable(param.name, *param.type);
TVariable variable(param.name, *param.type);
prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), $1.line), $1.line);
prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), $1.line), $1.line);
}
else
{
......
......@@ -3085,9 +3085,9 @@ yyreduce:
const TParameter &param = function.getParam(i);
if (param.name != 0)
{
TVariable *variable = new TVariable(param.name, *param.type);
TVariable variable(param.name, *param.type);
prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable->getUniqueId(), variable->getName(), variable->getType(), (yyvsp[(1) - (2)].interm).line), (yyvsp[(1) - (2)].interm).line);
prototype = context->intermediate.growAggregate(prototype, context->intermediate.addSymbol(variable.getUniqueId(), variable.getName(), variable.getType(), (yyvsp[(1) - (2)].interm).line), (yyvsp[(1) - (2)].interm).line);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment