Mercurial > hg > Members > anatofuz > MoarVM
comparison src/core/cbc-interp.cbc @ 48:585f22dcc6aa
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 09 Dec 2018 16:04:54 +0900 |
parents | e3cd4e21b560 |
children | a28c50b4c875 |
comparison
equal
deleted
inserted
replaced
46:e3cd4e21b560 | 48:585f22dcc6aa |
---|---|
58 static int tracing_enabled = 0; | 58 static int tracing_enabled = 0; |
59 static int op_count=0; | 59 static int op_count=0; |
60 static int cbctrace=0; | 60 static int cbctrace=0; |
61 | 61 |
62 // #define ddd(x) printf("count=%d op=%d cur_op=%p reg[0]=%p reg[2]=%p \n", op_count++, *i->cur_op, i->cur_op, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o) | 62 // #define ddd(x) printf("count=%d op=%d cur_op=%p reg[0]=%p reg[2]=%p \n", op_count++, *i->cur_op, i->cur_op, GET_REG(i->cur_op, 0,i).o, GET_REG(i->cur_op, 2,i).o) |
63 #define ddd(x) printf("count=%d op=%d\n", op_count++, *(MVMuint16 *)i->cur_op) | 63 #define ddd(x) (op_count++>200?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)i->cur_op):0) |
64 // #define ddd(x) 0 | 64 // #define ddd(x) 0 |
65 | 65 |
66 __code cbc_next(INTERP i){ | 66 __code cbc_next(INTERP i){ |
67 __code (*c)(INTERP); | 67 __code (*c)(INTERP); |
68 if (cbctrace) | 68 ddd(0); |
69 ddd(0); | |
70 else op_count++; | |
71 if (op_count>343724) cbctrace = 1; | |
72 c = CODES[NEXT_OP(i)]; | 69 c = CODES[NEXT_OP(i)]; |
73 i->tc->gc_status=0; | 70 i->tc->gc_status=0; |
74 goto c(i); | 71 goto c(i); |
75 } | 72 } |
76 | 73 |