move debug print

This commit is contained in:
Yuichi Nishiwaki 2014-07-26 15:08:04 +09:00
parent 4f957b6cc5
commit 5689abb483
1 changed files with 6 additions and 6 deletions

View File

@ -343,12 +343,6 @@ macroexpand_macro(pic_state *pic, struct pic_macro *mac, pic_value expr, struct
static pic_value static pic_value
macroexpand_node(pic_state *pic, pic_value expr, struct pic_senv *senv) macroexpand_node(pic_state *pic, pic_value expr, struct pic_senv *senv)
{ {
#if DEBUG
printf("[macroexpand] expanding... ");
pic_debug(pic, expr);
puts("");
#endif
switch (pic_type(expr)) { switch (pic_type(expr)) {
case PIC_TT_SYMBOL: { case PIC_TT_SYMBOL: {
return macroexpand_symbol(pic, pic_sym(expr), senv); return macroexpand_symbol(pic, pic_sym(expr), senv);
@ -405,6 +399,12 @@ macroexpand(pic_state *pic, pic_value expr, struct pic_senv *senv)
size_t ai = pic_gc_arena_preserve(pic); size_t ai = pic_gc_arena_preserve(pic);
pic_value v; pic_value v;
#if DEBUG
printf("[macroexpand] expanding... ");
pic_debug(pic, expr);
puts("");
#endif
v = macroexpand_node(pic, expr, senv); v = macroexpand_node(pic, expr, senv);
pic_gc_arena_restore(pic, ai); pic_gc_arena_restore(pic, ai);