proc_new -> make_proc

This commit is contained in:
Yuichi Nishiwaki 2014-09-12 19:46:54 +09:00
parent d05a2a2da1
commit 1422840a84
7 changed files with 11 additions and 11 deletions

View File

@ -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);
}

4
cont.c
View File

@ -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, "<continuation-procedure>");
c = pic_make_proc(pic, cont_call, "<continuation-procedure>");
/* 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, "<continuation-procedure>");
c = pic_make_proc(pic, cont_call, "<continuation-procedure>");
/* save the continuation object in proc */
pic_attr_set(pic, c, "@@cont", pic_obj_value(cont));

View File

@ -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 *);

View File

@ -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);

4
proc.c
View File

@ -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;

2
read.c
View File

@ -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) \

4
vm.c
View File

@ -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;