aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index f85ab1aea..925950d78 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -4174,7 +4174,6 @@ static BC_STATUS zbc_parse_while(BcParse *p)
4174{ 4174{
4175 BcStatus s; 4175 BcStatus s;
4176 BcInstPtr ip; 4176 BcInstPtr ip;
4177 BcInstPtr *ipp;
4178 size_t *label; 4177 size_t *label;
4179 size_t n; 4178 size_t n;
4180 4179
@@ -4214,14 +4213,13 @@ static BC_STATUS zbc_parse_while(BcParse *p)
4214 bc_parse_push(p, BC_INST_JUMP); 4213 bc_parse_push(p, BC_INST_JUMP);
4215 bc_parse_pushIndex(p, n); 4214 bc_parse_pushIndex(p, n);
4216 4215
4217 ipp = bc_vec_top(&p->exits);
4218 label = bc_vec_top(&p->conds); 4216 label = bc_vec_top(&p->conds);
4219 4217
4220 dbg_lex("%s:%d BC_INST_JUMP to %d", __func__, __LINE__, *label); 4218 dbg_lex("%s:%d BC_INST_JUMP to %d", __func__, __LINE__, *label);
4221 bc_parse_push(p, BC_INST_JUMP); 4219 bc_parse_push(p, BC_INST_JUMP);
4222 bc_parse_pushIndex(p, *label); 4220 bc_parse_pushIndex(p, *label);
4223 4221
4224 label = bc_vec_item(&p->func->labels, ipp->idx); 4222 label = bc_vec_item(&p->func->labels, ip.idx);
4225 dbg_lex("%s:%d rewriting label: %d -> %d", __func__, __LINE__, *label, p->func->code.len); 4223 dbg_lex("%s:%d rewriting label: %d -> %d", __func__, __LINE__, *label, p->func->code.len);
4226 *label = p->func->code.len; 4224 *label = p->func->code.len;
4227 4225
@@ -4238,7 +4236,6 @@ static BC_STATUS zbc_parse_for(BcParse *p)
4238{ 4236{
4239 BcStatus s; 4237 BcStatus s;
4240 BcInstPtr ip; 4238 BcInstPtr ip;
4241 BcInstPtr *ipp;
4242 size_t *label; 4239 size_t *label;
4243 size_t cond_idx, exit_idx, body_idx, update_idx; 4240 size_t cond_idx, exit_idx, body_idx, update_idx;
4244 size_t n; 4241 size_t n;
@@ -4318,7 +4315,6 @@ static BC_STATUS zbc_parse_for(BcParse *p)
4318 bc_parse_push(p, BC_INST_JUMP); 4315 bc_parse_push(p, BC_INST_JUMP);
4319 bc_parse_pushIndex(p, n); 4316 bc_parse_pushIndex(p, n);
4320 4317
4321 ipp = bc_vec_top(&p->exits);
4322 label = bc_vec_top(&p->conds); 4318 label = bc_vec_top(&p->conds);
4323 4319
4324//TODO: commonalize? 4320//TODO: commonalize?
@@ -4326,7 +4322,7 @@ static BC_STATUS zbc_parse_for(BcParse *p)
4326 bc_parse_push(p, BC_INST_JUMP); 4322 bc_parse_push(p, BC_INST_JUMP);
4327 bc_parse_pushIndex(p, *label); 4323 bc_parse_pushIndex(p, *label);
4328 4324
4329 label = bc_vec_item(&p->func->labels, ipp->idx); 4325 label = bc_vec_item(&p->func->labels, ip.idx);
4330 dbg_lex("%s:%d rewriting label: %d -> %d", __func__, __LINE__, *label, p->func->code.len); 4326 dbg_lex("%s:%d rewriting label: %d -> %d", __func__, __LINE__, *label, p->func->code.len);
4331 *label = p->func->code.len; 4327 *label = p->func->code.len;
4332 4328