remove unused parameters

This commit is contained in:
Yuichi Nishiwaki 2017-04-15 18:59:41 +09:00
parent a5ee9f7661
commit 22d0a334ff
3 changed files with 11 additions and 11 deletions

View File

@ -184,14 +184,14 @@ pic_alloca(pic_state *pic, size_t n)
/* MARK */ /* MARK */
static bool PIC_STATIC_INLINE bool
is_marked(pic_state *PIC_UNUSED(pic), struct object *obj) is_marked(struct object *obj)
{ {
return obj->u.basic.tt & GC_MARK; return obj->u.basic.tt & GC_MARK;
} }
static void PIC_STATIC_INLINE void
mark(pic_state *PIC_UNUSED(pic), struct object *obj) mark(struct object *obj)
{ {
obj->u.basic.tt |= GC_MARK; obj->u.basic.tt |= GC_MARK;
} }
@ -211,10 +211,10 @@ gc_mark_object(pic_state *pic, struct object *obj)
{ {
loop: loop:
if (is_marked(pic, obj)) if (is_marked(obj))
return; return;
mark(pic, obj); mark(obj);
#define LOOP(o) obj = (struct object *)(o); goto loop #define LOOP(o) obj = (struct object *)(o); goto loop
@ -366,8 +366,8 @@ gc_mark_phase(pic_state *pic)
continue; continue;
key = kh_key(h, it); key = kh_key(h, it);
val = kh_val(h, it); val = kh_val(h, it);
if (is_marked(pic, key)) { if (is_marked(key)) {
if (obj_p(pic, val) && ! is_marked(pic, obj_ptr(pic, val))) { if (obj_p(pic, val) && ! is_marked(obj_ptr(pic, val))) {
gc_mark(pic, val); gc_mark(pic, val);
++j; ++j;
} }
@ -612,7 +612,7 @@ gc_sweep_phase(pic_state *pic)
if (! kh_exist(h, it)) if (! kh_exist(h, it))
continue; continue;
obj = kh_key(h, it); obj = kh_key(h, it);
if (! is_marked(pic, obj)) { if (! is_marked(obj)) {
kh_del(weak, h, it); kh_del(weak, h, it);
} }
} }
@ -624,7 +624,7 @@ gc_sweep_phase(pic_state *pic)
if (! kh_exist(s, it)) if (! kh_exist(s, it))
continue; continue;
sym = kh_val(s, it); sym = kh_val(s, it);
if (sym && ! is_marked(pic, (struct object *)sym)) { if (sym && ! is_marked((struct object *)sym)) {
kh_del(oblist, s, it); kh_del(oblist, s, it);
} }
} }

View File

@ -296,7 +296,6 @@ PIC_NORETURN void pic_panic(pic_state *, const char *msg);
pic_value pic_raise_continuable(pic_state *pic, pic_value err); pic_value pic_raise_continuable(pic_state *pic, pic_value err);
PIC_NORETURN void pic_raise(pic_state *, pic_value v); PIC_NORETURN void pic_raise(pic_state *, pic_value v);
PIC_NORETURN void pic_error(pic_state *, const char *msg, int n, ...); PIC_NORETURN void pic_error(pic_state *, const char *msg, int n, ...);
pic_value pic_make_error(pic_state *, const char *type, const char *msg, pic_value irrs);
#define pic_try pic_try_(PIC_GENSYM(cont), PIC_GENSYM(jmp)) #define pic_try pic_try_(PIC_GENSYM(cont), PIC_GENSYM(jmp))
#define pic_try_(cont, jmp) \ #define pic_try_(cont, jmp) \

View File

@ -273,6 +273,7 @@ pic_value pic_record_type(pic_state *pic, pic_value record);
pic_value pic_record_datum(pic_state *pic, pic_value record); pic_value pic_record_datum(pic_state *pic, pic_value record);
struct context; struct context;
pic_value pic_make_cont(pic_state *pic, struct context *cxt, pic_value k, pic_value dyn_env); pic_value pic_make_cont(pic_state *pic, struct context *cxt, pic_value k, pic_value dyn_env);
pic_value pic_make_error(pic_state *, const char *type, const char *msg, pic_value irrs);
struct rope *pic_rope_incref(struct rope *); struct rope *pic_rope_incref(struct rope *);
void pic_rope_decref(pic_state *, struct rope *); void pic_rope_decref(pic_state *, struct rope *);