Skip to content

Commit

Permalink
Forgot to actually apply the stack builder optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
smuuf committed Feb 23, 2020
1 parent 2d3c1a1 commit d4422d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hafriedlander/Peg/Compiler/Token/Recurse.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function match_code( $value ) {
return PHPBuilder::build()->l(
'$matcher = \'match_\'.'.$function.'; $key = $matcher; $pos = $this->pos;',
$debug_header,
'$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(\array_merge($stack, array($result))) ) );',
'$subres = $this->packhas($key, $pos) ? $this->packread($key, $pos) : $this->packwrite($key, $pos, $this->$matcher($newStack));',
$this->match_fail_conditional( '$subres !== \false',
PHPBuilder::build()->l(
$debug_match,
Expand Down

0 comments on commit d4422d0

Please sign in to comment.