summaryrefslogtreecommitdiffstats
path: root/src/opcode_list.h
diff options
context:
space:
mode:
authorWilliam Langford <wlangfor@gmail.com>2017-02-17 00:35:26 -0500
committerNicolas Williams <nico@cryptonector.com>2017-03-26 05:36:22 -0500
commit3a8c8f4747313d324f4309af66e2211319eccffd (patch)
treea9a627074e8704cf78cb06abdaec72ac3d77846e /src/opcode_list.h
parentb142d484d58696e7e5be33b196d131169a032a76 (diff)
Add alternation destructuring operator `?//`
This is a first pass to show the implementation. It needs tests and evaluation, but doesn't break any existing tests. NOT READY FOR MERGING
Diffstat (limited to 'src/opcode_list.h')
-rw-r--r--src/opcode_list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opcode_list.h b/src/opcode_list.h
index e38d6843..ffb27d2f 100644
--- a/src/opcode_list.h
+++ b/src/opcode_list.h
@@ -2,6 +2,7 @@ OP(LOADK, CONSTANT, 1, 1)
OP(DUP, NONE, 1, 2)
OP(DUPN, NONE, 1, 2)
OP(DUP2, NONE, 2, 3)
+OP(PUSHK_UNDER, CONSTANT, 1, 2)
OP(POP, NONE, 1, 0)
OP(LOADV, VARIABLE, 1, 1)
OP(LOADVN, VARIABLE, 1, 1)
@@ -42,3 +43,6 @@ OP(CLOSURE_PARAM_REGULAR, DEFINITION, 0, 0)
OP(DEPS, CONSTANT, 0, 0)
OP(MODULEMETA, CONSTANT, 0, 0)
OP(GENLABEL, NONE, 0, 1)
+
+OP(DESTRUCTURE_ALT, NONE, 0, 0)
+OP(STOREVN, VARIABLE, 1, 0)