Mercurial > hg > Members > anatofuz > MoarVM
comparison 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 |
comparison
equal
deleted
inserted
replaced
49:2d03fdcd8b7f | 50:a28c50b4c875 |
---|---|
40 #define GET_UI16(pc, idx) *((MVMuint16 *)(pc + idx)) | 40 #define GET_UI16(pc, idx) *((MVMuint16 *)(pc + idx)) |
41 #define GET_I32(pc, idx) *((MVMint32 *)(pc + idx)) | 41 #define GET_I32(pc, idx) *((MVMint32 *)(pc + idx)) |
42 #define GET_UI32(pc, idx) *((MVMuint32 *)(pc + idx)) | 42 #define GET_UI32(pc, idx) *((MVMuint32 *)(pc + idx)) |
43 #define GET_N32(pc, idx) *((MVMnum32 *)(pc + idx)) | 43 #define GET_N32(pc, idx) *((MVMnum32 *)(pc + idx)) |
44 | 44 |
45 #define ddd(x) (op_count++>200?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)cur_op):0) | 45 #define ddd(x) ((op_count++,cbc_trace)?printf("count=%d op=%d\n", op_count, *(MVMuint16 *)cur_op):0) |
46 // #define ddd(x) (op_count++) | |
46 | 47 |
47 #define NEXT_OP (ddd(0), op = *(MVMuint16 *)(cur_op), cur_op += 2, op) | 48 #define NEXT_OP (ddd(0), op = *(MVMuint16 *)(cur_op), cur_op += 2, op) |
48 | 49 |
49 #if MVM_CGOTO | 50 #if MVM_CGOTO |
50 #define DISPATCH(op) | 51 #define DISPATCH(op) |
58 | 59 |
59 static int tracing_enabled = 0; | 60 static int tracing_enabled = 0; |
60 | 61 |
61 int use_cbc = 0; | 62 int use_cbc = 0; |
62 int op_count = 0; | 63 int op_count = 0; |
64 int cbc_trace = 0; | |
63 extern void MVM_interp_run_cbc(MVMThreadContext *tc); | 65 extern void MVM_interp_run_cbc(MVMThreadContext *tc); |
64 typedef struct interp { | 66 typedef struct interp { |
65 MVMuint16 op; | 67 MVMuint16 op; |
66 MVMuint8 *cur_op; | 68 MVMuint8 *cur_op; |
67 MVMuint8 *bytecode_start; | 69 MVMuint8 *bytecode_start; |