Lines Matching defs:sw
1149 register Switch_t* sw = expr.swstate;
1151 exval.expr = exnewnode(expr.program, exvsp[-7].id->index, 1, INTEGER, exvsp[-5].expr, exnewnode(expr.program, DEFAULT, 1, 0, sw->defcase, sw->firstcase));
1153 if (sw->base)
1154 free(sw->base);
1155 if (sw != &swstate)
1156 free(sw);
1195 register Switch_t* sw;
1200 if (!(sw = newof(0, Switch_t, 1, 0)))
1203 sw = &swstate;
1205 sw->prev = expr.swstate;
1208 sw = &swstate;
1209 expr.swstate = sw;
1210 sw->type = expr.declare;
1211 sw->firstcase = 0;
1212 sw->lastcase = 0;
1213 sw->defcase = 0;
1214 sw->def = 0;
1216 if (!(sw->base = newof(0, Extype_t*, n, 0)))
1221 sw->cur = sw->base;
1222 sw->last = sw->base + n;
1228 register Switch_t* sw = expr.swstate;
1232 if (sw->cur > sw->base)
1234 if (sw->lastcase)
1235 sw->lastcase->data.select.next = exval.expr;
1237 sw->firstcase = exval.expr;
1238 sw->lastcase = exval.expr;
1239 n = sw->cur - sw->base;
1240 sw->cur = sw->base;
1242 memcpy(exval.expr->data.select.constant, sw->base, n * sizeof(Extype_t*));
1247 if (sw->def)
1249 sw->def = 0;
1250 if (sw->defcase)
1253 sw->defcase = exvsp[0].expr;