Mercurial > hg > Members > anatofuz > MoarVM
changeset 52:0eaa19833fe4
split interp struct to headerfile
author | anatofuz |
---|---|
date | Tue, 11 Dec 2018 15:04:06 +0900 |
parents | 2cba07b40fd1 |
children | 00bd9b3e6d86 |
files | src/core/interp.c src/core/interp_strunct.h src/core/oplables-cbc-codes.h |
diffstat | 3 files changed, 23 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- /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;
--- 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);