# HG changeset patch # User anatofuz # Date 1544508246 -32400 # Node ID 0eaa19833fe4c23135e1f9c63b50f3aebdf67c4c # Parent 2cba07b40fd1291df77691e8c2e8255472d685b2 split interp struct to headerfile diff -r 2cba07b40fd1 -r 0eaa19833fe4 src/core/interp.c --- a/src/core/interp.c Mon Dec 10 14:03:01 2018 +0900 +++ b/src/core/interp.c Tue Dec 11 15:04:06 2018 +0900 @@ -3,6 +3,7 @@ #include "platform/time.h" #include "platform/sys.h" #include "strings/unicode_ops.h" +#include "interp_strunct.h" /* Macros for getting things from the bytecode stream. */ #if MVM_GC_DEBUG == 2 @@ -63,16 +64,6 @@ int op_count = 0; int cbc_trace = 0; extern void MVM_interp_run_cbc(MVMThreadContext *tc); -typedef struct interp { - MVMuint16 op; - MVMuint8 *cur_op; - MVMuint8 *bytecode_start; - MVMRegister *reg_base; - MVMCompUnit *cu; - MVMCallsite *cur_callsite; - MVMThreadContext *tc; - } INTER,*INTERP; - /* This is the interpreter run loop. We have one of these per thread. */ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContext *, void *), void *invoke_data) { diff -r 2cba07b40fd1 -r 0eaa19833fe4 src/core/interp_strunct.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/core/interp_strunct.h Tue Dec 11 15:04:06 2018 +0900 @@ -0,0 +1,21 @@ +typedef struct interp { + MVMuint16 op; //elimination + /* Points to the place in the bytecode right after the current opcode. */ + /* See the NEXT_OP macro for making sense of this */ + MVMuint8 *cur_op; + + /* The current frame's bytecode start. */ + MVMuint8 *bytecode_start; + + /* Points to the base of the current register set for the frame we + * are presently in. */ + MVMRegister *reg_base; + + /* Points to the current compilation unit. */ + MVMCompUnit *cu; + + /* The current call site we're constructing. */ + MVMCallsite *cur_callsite; //elimination + + MVMThreadContext *tc; +} INTER,*INTERP; diff -r 2cba07b40fd1 -r 0eaa19833fe4 src/core/oplables-cbc-codes.h --- a/src/core/oplables-cbc-codes.h Mon Dec 10 14:03:01 2018 +0900 +++ b/src/core/oplables-cbc-codes.h Tue Dec 11 15:04:06 2018 +0900 @@ -1,24 +1,5 @@ -typedef struct interp { - MVMuint16 op; - /* Points to the place in the bytecode right after the current opcode. */ - /* See the NEXT_OP macro for making sense of this */ - MVMuint8 *cur_op; - - /* The current frame's bytecode start. */ - MVMuint8 *bytecode_start; +#include "interp_strunct.h" - /* Points to the base of the current register set for the frame we - * are presently in. */ - MVMRegister *reg_base; - - /* Points to the current compilation unit. */ - MVMCompUnit *cu; - - /* The current call site we're constructing. */ - MVMCallsite *cur_callsite; - - MVMThreadContext *tc; - } INTER,*INTERP; __code cbc_no_op(INTERP); __code cbc_const_i8(INTERP); __code cbc_const_i16(INTERP);