From: Peep P. <so...@us...> - 2004-06-07 15:41:22
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8081 Modified Files: interpret.h Log Message: Bytecode instructions moved to instr.h Index: interpret.h =================================================================== RCS file: /cvsroot/agd/server/src/interpret.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- interpret.h 3 Apr 2004 20:19:08 -0000 1.13 +++ interpret.h 7 Jun 2004 15:41:13 -0000 1.14 @@ -1,65 +1,6 @@ #ifndef _INTERPRET_H #define _INTERPRET_H -/* instructions for the virtual machine */ - -#define F_JMP 1 /* Relative jump (jump forward by <n> instructions) */ -#define F_JMPF 2 /* Jump if false. Pops variable off the stack, jumps - forward by <n> if it's false. */ - -#define F_PUSH_INT 3 -#define F_PUSH_STRING 4 -#define F_PUSH_NULL_OBJECT 5 -#define F_PUSH_VOID 6 /* For 'return;' */ -#define F_PUSH_ARRAY 7 - -#define F_POP 10 /* Pops a variable off the stack. */ -#define F_PUSH_LVAR 11 /* Pushes local variable <n> on stack. */ -#define F_PUSH_LVAR_LVALUE 12 /* Pushes T_LVALUE to local var <n> */ -#define F_PUSH_GVAR 13 /* Pushes global variable <n> on stack. */ -#define F_PUSH_GVAR_LVALUE 14 -#define F_RETURN 15 -#define F_CALL_LFUN 16 -#define F_CALL_DFUN 17 -#define F_CALL_OTHER 18 -#define F_ASSIGN 19 /* Pops two variables off the stack, and assigns upper one's value - to the lower one. (the lower one should be a T_LVALUE) */ -#define F_ADD 20 -#define F_ADDA 21 -#define F_SUB 22 -#define F_SUBA 23 -#define F_MUL 24 -#define F_MULA 25 -#define F_DIV 26 -#define F_DIVA 27 -#define F_MOD 28 -#define F_MODA 29 -#define F_NOT 30 -#define F_EQ 31 -#define F_NE 32 -#define F_GT 33 -#define F_GE 34 -#define F_LT 35 -#define F_LE 36 -#define F_NEG 37 -#define F_AND 38 /* Have to keep these in because of check_operand() */ -#define F_OR 39 /* */ -#define F_POSTINC 40 -#define F_PREINC 41 -#define F_POSTDEC 42 -#define F_PREDEC 43 -#define F_INDEX 44 /* Single index into an array or string. */ -#define F_INDEX_LVALUE 45 -#define F_SLICE 46 -#define F_SLICE_LVALUE 47 -#define F_COMM 48 -#define F_POW 49 -#define F_POWE 50 - -#define F_HIGHEST F_POWE - -#define F_NEWLINE 51 /* Increases the line number. Not used ATM. */ - variable_t *apply(object_t *ob, char *fun, char *argfmt, ...); void runtime(char *s); @@ -71,7 +12,8 @@ int num_arg; int *cp; - array_t *code; + int **code; + int codelen; int fun, line; |