Skip to content

Commit

Permalink
Fix bad regex code-gen assumptions.
Browse files Browse the repository at this point in the history
It relied on the attribute auto-viv in P6opaque being NYI, and thus
breaks on implementing it.
  • Loading branch information
jnthn committed Dec 1, 2013
1 parent db12e00 commit d423302
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vm/moar/QAST/QASTRegexCompilerMAST.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ class QAST::MASTRegexCompiler {
op('gt_i', $i0, $i0, $zero),
op('unless_i', $i0, $donelabel),
op('pop_i', $i19, $bstack),
op('isnull', $i0, $cstack),
op('if_i', $i0, $cstacklabel),
op('islist', $i0, $cstack),
op('unless_i', $i0, $cstacklabel),
op('elems', $i0, $cstack),
op('gt_i', $i0, $i0, $zero),
op('unless_i', $i0, $cstacklabel),
Expand All @@ -167,6 +167,7 @@ class QAST::MASTRegexCompiler {
# backtrack the cursor stack
op('isnull', $i0, $cstack),
op('if_i', $i0, $jumplabel),
op('unless_o', $cstack, $jumplabel),
op('elems', $i18, $bstack),
op('le_i', $i0, $i18, $zero),
op('if_i', $i0, $cutlabel),
Expand Down

0 comments on commit d423302

Please sign in to comment.