Mercurial > hg-old > index.cgi
comparison src/lwasm.c @ 52:b9856da2674a
Added file inclusion
author | lost |
---|---|
date | Sun, 04 Jan 2009 20:16:38 +0000 |
parents | 4bb7b723e5b7 |
children | 8e32696380f3 |
comparison
equal
deleted
inserted
replaced
51:04868fa52a15 | 52:b9856da2674a |
---|---|
168 { | 168 { |
169 lwasm_symbol_ent_t *se; | 169 lwasm_symbol_ent_t *se; |
170 struct symstateinfo *st; | 170 struct symstateinfo *st; |
171 | 171 |
172 st = state; | 172 st = state; |
173 | 173 debug_message(3, "lwasm_expr_lookup_symbol(): find '%s' (context=%d)", sym, st -> as -> context); |
174 | |
174 // look for local symbol first then global symbol | 175 // look for local symbol first then global symbol |
175 se = lwasm_find_symbol(st -> as, sym, st -> as -> context); | 176 se = lwasm_find_symbol(st -> as, sym, st -> as -> context); |
176 if (!se) | 177 if (!se) |
177 se = lwasm_find_symbol(st -> as, sym, -1); | 178 se = lwasm_find_symbol(st -> as, sym, -1); |
179 debug_message(3, "lwasm_expr_lookup_symbol(): got '%p'", se); | |
178 if (!se) | 180 if (!se) |
179 return -1; | 181 return -1; |
180 *val = se -> value; | 182 *val = se -> value; |
181 return 0; | 183 return 0; |
182 } | 184 } |