pic_env -> pic_context
This commit is contained in:
@@ -59,10 +59,10 @@ typedef struct {
|
||||
int argc, retc;
|
||||
pic_code *ip;
|
||||
pic_value *fp;
|
||||
struct pic_env *env;
|
||||
struct pic_context *cxt;
|
||||
int regc;
|
||||
pic_value *regs;
|
||||
struct pic_env *up;
|
||||
struct pic_context *up;
|
||||
} pic_callinfo;
|
||||
|
||||
typedef void *(*pic_allocf)(void *, size_t);
|
||||
|
||||
@@ -15,11 +15,11 @@ struct pic_func {
|
||||
pic_sym *name;
|
||||
};
|
||||
|
||||
struct pic_env {
|
||||
struct pic_context {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_value *regs;
|
||||
int regc;
|
||||
struct pic_env *up;
|
||||
struct pic_context *up;
|
||||
pic_value storage[1];
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ struct pic_proc {
|
||||
struct pic_func func;
|
||||
struct pic_irep *irep;
|
||||
} u;
|
||||
struct pic_env *env;
|
||||
struct pic_context *cxt;
|
||||
};
|
||||
|
||||
#define PIC_PROC_KIND_FUNC 1
|
||||
@@ -42,11 +42,11 @@ struct pic_proc {
|
||||
#define pic_proc_p(o) (pic_type(o) == PIC_TT_PROC)
|
||||
#define pic_proc_ptr(o) ((struct pic_proc *)pic_ptr(o))
|
||||
|
||||
#define pic_env_p(o) (pic_type(o) == PIC_TT_ENV)
|
||||
#define pic_env_ptr(o) ((struct pic_env *)pic_ptr(o))
|
||||
#define pic_context_p(o) (pic_type(o) == PIC_TT_CXT)
|
||||
#define pic_context_ptr(o) ((struct pic_context *)pic_ptr(o))
|
||||
|
||||
struct pic_proc *pic_make_proc(pic_state *, pic_func_t, const char *);
|
||||
struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_env *);
|
||||
struct pic_proc *pic_make_proc_irep(pic_state *, struct pic_irep *, struct pic_context *);
|
||||
|
||||
pic_sym *pic_proc_name(struct pic_proc *);
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ enum pic_tt {
|
||||
PIC_TT_PROC,
|
||||
PIC_TT_PORT,
|
||||
PIC_TT_ERROR,
|
||||
PIC_TT_ENV,
|
||||
PIC_TT_CXT,
|
||||
PIC_TT_SENV,
|
||||
PIC_TT_LIB,
|
||||
PIC_TT_IREP,
|
||||
@@ -306,8 +306,8 @@ pic_type_repr(enum pic_tt tt)
|
||||
return "port";
|
||||
case PIC_TT_ERROR:
|
||||
return "error";
|
||||
case PIC_TT_ENV:
|
||||
return "env";
|
||||
case PIC_TT_CXT:
|
||||
return "cxt";
|
||||
case PIC_TT_PROC:
|
||||
return "proc";
|
||||
case PIC_TT_SENV:
|
||||
|
||||
Reference in New Issue
Block a user