From 010ee9ddb64b1a658232b16004f1c713181d1c7c Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 28 Mar 2014 12:07:02 +0900 Subject: [PATCH] get rid of redundant symbol to value cast --- src/codegen.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/codegen.c b/src/codegen.c index 59f01553..a2a02e26 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -324,13 +324,11 @@ analyze_free_var(analyze_state *state, pic_sym sym, int depth) } static pic_value -analyze_var(analyze_state *state, pic_value obj) +analyze_var(analyze_state *state, pic_sym sym) { pic_state *pic = state->pic; - pic_sym sym; int depth; - sym = pic_sym(obj); if ((depth = find_var(state, sym)) == -1) { pic_errorf(pic, "unbound variable %s", pic_symbol_name(pic, sym)); } @@ -410,7 +408,7 @@ analyze_declare(analyze_state *state, pic_sym var) { define_var(state, var); - return analyze_var(state, pic_sym_value(var)); + return analyze_var(state, var); } static pic_value @@ -708,7 +706,7 @@ analyze_node(analyze_state *state, pic_value obj, bool tailpos) switch (pic_type(obj)) { case PIC_TT_SYMBOL: { - return analyze_var(state, obj); + return analyze_var(state, pic_sym(obj)); } case PIC_TT_PAIR: { pic_value proc;