pic_gc_run -> pic_gc

This commit is contained in:
Yuichi Nishiwaki 2016-02-14 13:17:12 +09:00
parent dc80bc5850
commit 5946c3ab39
3 changed files with 5 additions and 5 deletions

View File

@ -686,7 +686,7 @@ gc_sweep_phase(pic_state *pic)
}
void
pic_gc_run(pic_state *pic)
pic_gc(pic_state *pic)
{
if (! pic->gc_enable) {
return;
@ -702,12 +702,12 @@ pic_obj_alloc_unsafe(pic_state *pic, size_t size, enum pic_tt tt)
struct pic_object *obj;
#if GC_STRESS
pic_gc_run(pic);
pic_gc(pic);
#endif
obj = (struct pic_object *)heap_alloc(pic, size);
if (obj == NULL) {
pic_gc_run(pic);
pic_gc(pic);
obj = (struct pic_object *)heap_alloc(pic, size);
if (obj == NULL) {
heap_morecore(pic);

View File

@ -137,10 +137,10 @@ void pic_free(pic_state *, void *);
typedef pic_value (*pic_func_t)(pic_state *);
void pic_gc_run(pic_state *);
pic_value pic_gc_protect(pic_state *, pic_value);
size_t pic_gc_arena_preserve(pic_state *);
void pic_gc_arena_restore(pic_state *, size_t);
void pic_gc(pic_state *);
void pic_add_feature(pic_state *, const char *);

View File

@ -391,7 +391,7 @@ pic_close(pic_state *pic)
pic->libs = pic_nil_value();
/* free all heap objects */
pic_gc_run(pic);
pic_gc(pic);
#if 0
{