diff --git a/codegen.c b/codegen.c index 1fa4167b..b593a5d1 100644 --- a/codegen.c +++ b/codegen.c @@ -1501,5 +1501,5 @@ pic_compile(pic_state *pic, pic_value obj, struct pic_lib *lib) pic_gc_arena_restore(pic, ai); pic_gc_protect(pic, pic_obj_value(irep)); - return pic_proc_new_irep(pic, irep, NULL); + return pic_make_proc_irep(pic, irep, NULL); } diff --git a/cont.c b/cont.c index 6839c586..695e39b0 100644 --- a/cont.c +++ b/cont.c @@ -283,7 +283,7 @@ pic_callcc(pic_state *pic, struct pic_proc *proc) else { struct pic_proc *c; - c = pic_proc_new(pic, cont_call, ""); + c = pic_make_proc(pic, cont_call, ""); /* save the continuation object in proc */ pic_attr_set(pic, c, "@@cont", pic_obj_value(cont)); @@ -304,7 +304,7 @@ pic_callcc_trampoline(pic_state *pic, struct pic_proc *proc) else { struct pic_proc *c; - c = pic_proc_new(pic, cont_call, ""); + c = pic_make_proc(pic, cont_call, ""); /* save the continuation object in proc */ pic_attr_set(pic, c, "@@cont", pic_obj_value(cont)); diff --git a/include/picrin/proc.h b/include/picrin/proc.h index b91960de..b443d3d9 100644 --- a/include/picrin/proc.h +++ b/include/picrin/proc.h @@ -46,8 +46,8 @@ struct pic_proc { #define pic_env_p(o) (pic_type(o) == PIC_TT_ENV) #define pic_env_ptr(o) ((struct pic_env *)pic_ptr(o)) -struct pic_proc *pic_proc_new(pic_state *, pic_func_t, const char *); -struct pic_proc *pic_proc_new_irep(pic_state *, struct pic_irep *, struct pic_env *); +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 *); pic_sym pic_proc_name(struct pic_proc *); diff --git a/macro.c b/macro.c index 7db0775e..17f12cc6 100644 --- a/macro.c +++ b/macro.c @@ -430,7 +430,7 @@ pic_defmacro(pic_state *pic, pic_sym name, pic_sym id, pic_func_t func) pic_put_rename(pic, pic->lib->env, name, id); /* symbol registration */ - define_macro(pic, id, pic_proc_new(pic, func, pic_symbol_name(pic, name)), NULL); + define_macro(pic, id, pic_make_proc(pic, func, pic_symbol_name(pic, name)), NULL); /* auto export! */ pic_export(pic, name); diff --git a/proc.c b/proc.c index c604c87e..a518214f 100644 --- a/proc.c +++ b/proc.c @@ -9,7 +9,7 @@ #include "picrin/dict.h" struct pic_proc * -pic_proc_new(pic_state *pic, pic_func_t func, const char *name) +pic_make_proc(pic_state *pic, pic_func_t func, const char *name) { struct pic_proc *proc; @@ -25,7 +25,7 @@ pic_proc_new(pic_state *pic, pic_func_t func, const char *name) } struct pic_proc * -pic_proc_new_irep(pic_state *pic, struct pic_irep *irep, struct pic_env *env) +pic_make_proc_irep(pic_state *pic, struct pic_irep *irep, struct pic_env *env) { struct pic_proc *proc; diff --git a/read.c b/read.c index 5f3bd383..48ca7498 100644 --- a/read.c +++ b/read.c @@ -788,7 +788,7 @@ pic_define_reader(pic_state *pic, const char *str, pic_func_t reader) } trie = trie->table[c]; } - trie->proc = pic_proc_new(pic, reader, "reader"); + trie->proc = pic_make_proc(pic, reader, "reader"); } #define DEFINE_READER(name) \ diff --git a/vm.c b/vm.c index 044c5eb2..b13f3fb6 100644 --- a/vm.c +++ b/vm.c @@ -456,7 +456,7 @@ pic_defun(pic_state *pic, const char *name, pic_func_t cfunc) { struct pic_proc *proc; - proc = pic_proc_new(pic, cfunc, name); + proc = pic_make_proc(pic, cfunc, name); pic_define(pic, name, pic_obj_value(proc)); } @@ -906,7 +906,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv) vm_push_env(pic); } - proc = pic_proc_new_irep(pic, irep->irep[c.u.i], pic->ci->env); + proc = pic_make_proc_irep(pic, irep->irep[c.u.i], pic->ci->env); PUSH(pic_obj_value(proc)); pic_gc_arena_restore(pic, ai); NEXT;