s/num_val/valuec/g
This commit is contained in:
parent
c24560de12
commit
d0602303e3
|
@ -11,7 +11,7 @@
|
|||
|
||||
struct pic_code;
|
||||
|
||||
typedef struct pic_callinfo {
|
||||
typedef struct {
|
||||
int argc;
|
||||
struct pic_code *pc;
|
||||
pic_value *fp;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
struct pic_env {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_value *values;
|
||||
int num_val;
|
||||
int valuec;
|
||||
struct pic_env *up;
|
||||
};
|
||||
|
||||
|
|
2
src/gc.c
2
src/gc.c
|
@ -159,7 +159,7 @@ gc_mark_object(pic_state *pic, struct pic_object *obj)
|
|||
struct pic_env *env = (struct pic_env *)obj;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < env->num_val; ++i) {
|
||||
for (i = 0; i < env->valuec; ++i) {
|
||||
gc_mark(pic, env->values[i]);
|
||||
}
|
||||
if (env->up) {
|
||||
|
|
6
src/vm.c
6
src/vm.c
|
@ -370,9 +370,9 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
|
|||
/* prepare env */
|
||||
ci->env = (struct pic_env *)pic_obj_alloc(pic, sizeof(struct pic_env), PIC_TT_ENV);
|
||||
ci->env->up = proc->env;
|
||||
ci->env->num_val = proc->u.irep->argc + proc->u.irep->localc;
|
||||
ci->env->values = (pic_value *)pic_calloc(pic, ci->env->num_val, sizeof(pic_value));
|
||||
for (i = 0; i < ci->env->num_val; ++i) {
|
||||
ci->env->valuec = proc->u.irep->argc + proc->u.irep->localc;
|
||||
ci->env->values = (pic_value *)pic_calloc(pic, ci->env->valuec, sizeof(pic_value));
|
||||
for (i = 0; i < ci->env->valuec; ++i) {
|
||||
ci->env->values[i] = ci->fp[i];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue