Mercurial > hg-old > index.cgi
comparison src/insn_gen.c @ 37:538e15927776
Added symbol handling to expression subsystem; adpated instruction handlers to the new scheme; misc fixes
author | lost |
---|---|
date | Sat, 03 Jan 2009 04:20:49 +0000 |
parents | b29eec6f3819 |
children | da1337724ecd |
comparison
equal
deleted
inserted
replaced
36:99e3b3310bac | 37:538e15927776 |
---|---|
59 else if (**optr == '>') | 59 else if (**optr == '>') |
60 { | 60 { |
61 (*optr)++; | 61 (*optr)++; |
62 f16 = 1; | 62 f16 = 1; |
63 } | 63 } |
64 s = lwasm_expr_eval(*optr, NULL); | 64 s = lwasm_evaluate_expr(as, l, *optr, NULL); |
65 if (!s) | 65 if (!s) |
66 { | 66 { |
67 register_error(as, l, 1, "Bad expression"); | 67 register_error(as, l, 1, "Bad expression"); |
68 return; | 68 return; |
69 } | 69 } |
136 | 136 |
137 if (**p == '#') | 137 if (**p == '#') |
138 { | 138 { |
139 lwasm_emitop(as, l, instab[opnum].ops[3]); | 139 lwasm_emitop(as, l, instab[opnum].ops[3]); |
140 (*p)++; | 140 (*p)++; |
141 s = lwasm_expr_eval(*p, NULL); | 141 s = lwasm_evaluate_expr(as, l, *p, NULL); |
142 if (!s) | 142 if (!s) |
143 { | 143 { |
144 register_error(as, l, 1, "Bad expression"); | 144 register_error(as, l, 1, "Bad expression"); |
145 rval = 0; | 145 rval = 0; |
146 } | 146 } |
167 | 167 |
168 if (**p == '#') | 168 if (**p == '#') |
169 { | 169 { |
170 lwasm_emitop(as, l, instab[opnum].ops[3]); | 170 lwasm_emitop(as, l, instab[opnum].ops[3]); |
171 (*p)++; | 171 (*p)++; |
172 s = lwasm_expr_eval(*p, NULL); | 172 s = lwasm_evaluate_expr(as, l, *p, NULL); |
173 if (!s) | 173 if (!s) |
174 { | 174 { |
175 register_error(as, l, 1, "Bad expression"); | 175 register_error(as, l, 1, "Bad expression"); |
176 rval = 0; | 176 rval = 0; |
177 } | 177 } |
197 | 197 |
198 if (**p == '#') | 198 if (**p == '#') |
199 { | 199 { |
200 lwasm_emitop(as, l, instab[opnum].ops[3]); | 200 lwasm_emitop(as, l, instab[opnum].ops[3]); |
201 (*p)++; | 201 (*p)++; |
202 s = lwasm_expr_eval(*p, NULL); | 202 s = lwasm_evaluate_expr(as, l, *p, NULL); |
203 if (!s) | 203 if (!s) |
204 { | 204 { |
205 register_error(as, l, 1, "Bad expression"); | 205 register_error(as, l, 1, "Bad expression"); |
206 rval = 0; | 206 rval = 0; |
207 } | 207 } |
229 | 229 |
230 if (**p == '#') | 230 if (**p == '#') |
231 { | 231 { |
232 lwasm_emitop(as, l, instab[opnum].ops[0]); | 232 lwasm_emitop(as, l, instab[opnum].ops[0]); |
233 (*p)++; | 233 (*p)++; |
234 s = lwasm_expr_eval(*p, NULL); | 234 s = lwasm_evaluate_expr(as, l, *p, NULL); |
235 if (!s) | 235 if (!s) |
236 { | 236 { |
237 register_error(as, l, 1, "Bad expression"); | 237 register_error(as, l, 1, "Bad expression"); |
238 rval = 0; | 238 rval = 0; |
239 } | 239 } |