summaryrefslogtreecommitdiff
path: root/graphics/asymptote/opcodes.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/opcodes.h
Initial commit
Diffstat (limited to 'graphics/asymptote/opcodes.h')
-rw-r--r--graphics/asymptote/opcodes.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/graphics/asymptote/opcodes.h b/graphics/asymptote/opcodes.h
new file mode 100644
index 0000000000..71c0de41aa
--- /dev/null
+++ b/graphics/asymptote/opcodes.h
@@ -0,0 +1,46 @@
+/*****
+ * opcodes.h
+ * Andy Hammerlindl 2010/10/24
+ *
+ * A list of the virtual machine opcodes, defined by the macro OPCODE.
+ *****/
+
+/* The first parameter is the name of the opcode. The second parameter is a
+ * character indicating what additional information (if any) is encoded with
+ * the opcode:
+ * x - nothing
+ * n - integer
+ * t - item
+ * b - builtin
+ * l - lambda pointer
+ * o - instruction offset
+ */
+
+OPCODE(nop, 'x')
+OPCODE(pop,'x')
+OPCODE(intpush,'n')
+OPCODE(constpush,'t')
+OPCODE(varpush,'n')
+OPCODE(varsave,'n')
+OPCODE(fieldpush,'n')
+OPCODE(fieldsave,'n')
+OPCODE(builtin,'b')
+OPCODE(jmp,'o')
+OPCODE(cjmp,'o')
+OPCODE(njmp,'o')
+OPCODE(popcall,'x')
+OPCODE(pushclosure,'x')
+OPCODE(makefunc,'l')
+OPCODE(ret,'x')
+OPCODE(pushframe,'n')
+OPCODE(popframe,'x')
+
+OPCODE(push_default,'x')
+OPCODE(jump_if_not_default,'o')
+
+#ifdef COMBO
+OPCODE(varpop,'n')
+OPCODE(fieldpop,'n')
+
+OPCODE(gejmp,'o')
+#endif