diff src/core/interp.c @ 50:a28c50b4c875

fix compunitmainline read eval loop worked
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 10 Dec 2018 08:59:08 +0900
parents 585f22dcc6aa
children 0eaa19833fe4
line wrap: on
line diff
--- a/src/core/interp.c	Sun Dec 09 16:05:26 2018 +0900
+++ b/src/core/interp.c	Mon Dec 10 08:59:08 2018 +0900
@@ -42,7 +42,8 @@
 #define GET_UI32(pc, idx)   *((MVMuint32 *)(pc + idx))
 #define GET_N32(pc, idx)    *((MVMnum32 *)(pc + idx))
 
-#define ddd(x) (op_count++>200?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)cur_op):0)
+#define ddd(x) ((op_count++,cbc_trace)?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)cur_op):0)
+// #define ddd(x) (op_count++)
 
 #define NEXT_OP (ddd(0), op = *(MVMuint16 *)(cur_op), cur_op += 2, op)
 
@@ -60,6 +61,7 @@
 
 int use_cbc = 0;
 int op_count = 0;
+int cbc_trace = 0;
 extern void MVM_interp_run_cbc(MVMThreadContext *tc);
 typedef struct interp {
      MVMuint16 op;