add OP_PUSHCONST

This commit is contained in:
Yuichi Nishiwaki
2013-10-21 09:29:56 +09:00
parent 5e43fe58fe
commit a49675c322
9 changed files with 63 additions and 4 deletions
+1
View File
@@ -14,6 +14,7 @@
#define PIC_IREP_SIZE 256
#define PIC_GLOBALS_SIZE 1024
#define PIC_SYM_TBL_SIZE 128
#define PIC_POOL_SIZE 1024
/* enable all debug flags */
#define DEBUG 1
+2
View File
@@ -34,6 +34,8 @@ typedef struct {
size_t glen, gcapa;
struct pic_irep **irep;
size_t ilen, icapa;
pic_value *pool;
size_t plen, pcapa;
jmp_buf *jmp;
const char *errmsg;
+1
View File
@@ -7,6 +7,7 @@ enum pic_opcode {
OP_PUSHTRUE,
OP_PUSHFALSE,
OP_PUSHNUM,
OP_PUSHCONST,
OP_GREF,
OP_GSET,
OP_LREF,