minor #1772 Optimize the retrieval of reserved macro names (stof)

This PR was merged into the 1.x branch.

Discussion
----------

Optimize the retrieval of reserved macro names

The list of reserved names does not need to be reset for each template compilation.

Commits
-------

c267257 Optimize the retrieval of reserved macro names
This commit is contained in:
Fabien Potencier
2015-08-17 21:42:30 +02:00
+1 -1
View File
@@ -64,7 +64,7 @@ class Twig_Parser implements Twig_ParserInterface
{
// push all variables into the stack to keep the current state of the parser
$vars = get_object_vars($this);
unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser']);
unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']);
$this->stack[] = $vars;
// tag handlers