Fix destructuring alternation
Attempting to use the existing FORK_OPT opcode resulted in difficulty knowing when to pop an error message off the stack and when not to. This commit makes DESTRUCTURE_ALT a real opcode that is identical to FORK_OPT, except for never pushing the error message onto the stack when continuing from an error backtrack. Some small changes were necessary to the DUP/POP behavior surrounding destructuring to accomodate this.
This commit is contained in:
1 parent
3dc5f4e948
commit
0673dee1b3
4 files changed
+122
-21
No files matched your search
+1
-1
@@ -44,5 +44,5 @@ OP(DEPS, CONSTANT, 0, 0)
|
||||
OP(MODULEMETA, CONSTANT, 0, 0)
|
||||
OP(GENLABEL, NONE, 0, 1)
|
||||
|
||||
OP(DESTRUCTURE_ALT, NONE, 0, 0)
|
||||
OP(DESTRUCTURE_ALT, BRANCH, 0, 0)
|
||||
OP(STOREVN, VARIABLE, 1, 0)
|
||||
Reference in new issue
Block a user