remove pic_define_syntactic_keyword
This commit is contained in:
parent
c547d3a281
commit
e0df3f1ecc
|
@ -7,12 +7,10 @@
|
|||
static void
|
||||
setup_default_env(pic_state *pic, struct pic_env *env)
|
||||
{
|
||||
void pic_define_syntactic_keyword(pic_state *, struct pic_env *, pic_sym *, pic_sym *);
|
||||
|
||||
pic_define_syntactic_keyword(pic, env, pic->sDEFINE_LIBRARY, pic->uDEFINE_LIBRARY);
|
||||
pic_define_syntactic_keyword(pic, env, pic->sIMPORT, pic->uIMPORT);
|
||||
pic_define_syntactic_keyword(pic, env, pic->sEXPORT, pic->uEXPORT);
|
||||
pic_define_syntactic_keyword(pic, env, pic->sCOND_EXPAND, pic->uCOND_EXPAND);
|
||||
pic_put_variable(pic, env, pic_obj_value(pic->sDEFINE_LIBRARY), pic->uDEFINE_LIBRARY);
|
||||
pic_put_variable(pic, env, pic_obj_value(pic->sIMPORT), pic->uIMPORT);
|
||||
pic_put_variable(pic, env, pic_obj_value(pic->sEXPORT), pic->uEXPORT);
|
||||
pic_put_variable(pic, env, pic_obj_value(pic->sCOND_EXPAND), pic->uCOND_EXPAND);
|
||||
}
|
||||
|
||||
struct pic_lib *
|
||||
|
|
|
@ -112,10 +112,10 @@ pic_features(pic_state *pic)
|
|||
#define DONE pic_gc_arena_restore(pic, ai);
|
||||
|
||||
#define define_builtin_syntax(uid, name) \
|
||||
pic_define_syntactic_keyword_(pic, pic->lib->env, pic_intern(pic, name), uid)
|
||||
pic_put_variable(pic, pic->lib->env, pic_obj_value(pic_intern(pic, name)), uid)
|
||||
|
||||
#define VM(uid, name) \
|
||||
pic_define_syntactic_keyword_(pic, pic->lib->env, pic_intern(pic, name), uid)
|
||||
pic_put_variable(pic, pic->lib->env, pic_obj_value(pic_intern(pic, name)), uid)
|
||||
|
||||
#define VM3(name) \
|
||||
pic->c##name = pic_vm_gref_slot(pic, pic->u##name);
|
||||
|
@ -126,7 +126,6 @@ pic_features(pic_state *pic)
|
|||
static void
|
||||
pic_init_core(pic_state *pic)
|
||||
{
|
||||
void pic_define_syntactic_keyword_(pic_state *, struct pic_env *, pic_sym *, pic_sym *);
|
||||
struct pic_box *pic_vm_gref_slot(pic_state *, pic_sym *);
|
||||
|
||||
pic_init_features(pic);
|
||||
|
|
|
@ -1086,22 +1086,6 @@ pic_apply5(pic_state *pic, struct pic_proc *proc, pic_value arg1, pic_value arg2
|
|||
return pic_apply(pic, proc, pic_list5(pic, arg1, arg2, arg3, arg4, arg5));
|
||||
}
|
||||
|
||||
void
|
||||
pic_define_syntactic_keyword_(pic_state *pic, struct pic_env *env, pic_sym *sym, pic_sym *uid)
|
||||
{
|
||||
pic_put_variable(pic, env, pic_obj_value(sym), uid);
|
||||
}
|
||||
|
||||
void
|
||||
pic_define_syntactic_keyword(pic_state *pic, struct pic_env *env, pic_sym *sym, pic_sym *uid)
|
||||
{
|
||||
pic_define_syntactic_keyword_(pic, env, sym, uid);
|
||||
|
||||
if (pic->lib && pic->lib->env == env) {
|
||||
pic_export(pic, sym);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
pic_define_(pic_state *pic, const char *name, pic_value val)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue