diff Paper/src/cbc-interp-next.cbc @ 27:df723be56106

add about INTERP section
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Fri, 09 Nov 2018 01:12:22 +0900
parents
children f01d5bc55dea
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Paper/src/cbc-interp-next.cbc	Fri Nov 09 01:12:22 2018 +0900
@@ -0,0 +1,14 @@
+#define NEXT_OP(i) (i->op = *(MVMuint16 *)(i->cur_op), i->cur_op += 2, i->op)
+
+#define DISPATCH(op) {goto (CODES[op])(i);}
+#define OP(name) OP_ ## name
+#define NEXT(i) CODES[NEXT_OP(i)](i)
+static int tracing_enabled = 0;
+
+__code cbc_next(INTERP i){
+    goto NEXT(i);
+}
+
+__code cbc_no_op(INTERP i){
+    goto cbc_next(i);
+}