Lines Matching +defs:t +defs:exec
62 assert(r->t != BC_RESULT_VOID);
74 * @param t The type that the result should be.
77 bc_program_type_match(BcResult* r, BcType t)
79 if (BC_ERR((r->t != BC_RESULT_ARRAY) != (!t))) bc_err(BC_ERR_EXEC_TYPE);
210 res.t = type;
310 // I don't want to do this on other platforms because this procedure
316 switch (r->t)
336 BcType type = (r->t == BC_RESULT_VAR) ? BC_TYPE_VAR : BC_TYPE_ARRAY;
345 if (r->t == BC_RESULT_ARRAY_ELEM)
353 // it. The reason we don't need to worry about it for returning
379 // Because bc_vec_top() and bc_vec_item() return a void*, we don't
454 if (BC_ERR((*r)->t == BC_RESULT_VOID)) bc_err(BC_ERR_EXEC_VOID_VAL);
499 lt = (*l)->t;
503 assert(lt != BC_RESULT_VOID && (*r)->t != BC_RESULT_VOID);
509 if (lt == (*r)->t && (lt == BC_RESULT_VAR || lt == BC_RESULT_ARRAY_ELEM))
567 lt = (*l)->t;
574 good = ((*r)->t == BC_RESULT_STR && lt <= BC_RESULT_ARRAY_ELEM);
576 assert(BC_PROG_STR(*rn) || (*r)->t != BC_RESULT_STR);
652 // Allocate if we haven't yet.
749 // We need to parse, but we don't want to use the existing parser
794 if (BC_ERR(vm->read_prs.l.t != BC_LEX_NLINE &&
795 vm->read_prs.l.t != BC_LEX_EOF))
980 if (r->t == BC_RESULT_VOID)
1206 * @param t The type to copy to. This could be a variable or an array.
1209 bc_program_copyToVar(BcProgram* p, size_t idx, BcType t)
1214 bool var = (t == BC_TYPE_VAR);
1233 bc_program_type_match(ptr, t);
1237 vec = bc_program_vec(p, idx, t);
1241 if (ptr->t == BC_RESULT_STR)
1278 ref = (v->size == sizeof(BcNum) && t == BC_TYPE_REF);
1281 // (okay, a lot; it just doesn't look that way) different from
1288 if (ref || (ref_size && t == BC_TYPE_REF))
1297 vec = bc_program_vec(p, idx, t);
1321 else if (ref_size && t != BC_TYPE_REF)
1437 assert(left->t != BC_RESULT_STR);
1440 if (right->t == BC_RESULT_STR)
1452 if (left->t == BC_RESULT_ARRAY_ELEM)
1481 res.t = BC_RESULT_STR;
1503 // freed. We also don't have to worry about BC_RESULT_STR because it's
1505 if (right->t == BC_RESULT_TEMP || right->t >= BC_RESULT_IBASE)
1512 right->t = BC_RESULT_ZERO;
1547 ob = (left->t == BC_RESULT_OBASE);
1548 sc = (left->t == BC_RESULT_SCALE);
1552 if (ob || sc || left->t == BC_RESULT_IBASE)
1561 else if (left->t == BC_RESULT_SEED) bc_program_assignSeed(p, l);
1571 res.t = BC_RESULT_TEMP;
1600 r.t = BC_RESULT_VAR;
1630 r.t = BC_RESULT_TEMP;
1648 r.t = BC_RESULT_STR;
1689 r.t = BC_RESULT_ARRAY;
1699 r.t = BC_RESULT_ARRAY_ELEM;
1732 copy.t = BC_RESULT_TEMP;
1740 res.t = BC_RESULT_ONE;
1809 if (BC_ERR(arg->t == BC_RESULT_VOID)) bc_err(BC_ERR_EXEC_VOID_VAL);
1871 // If this isn't true, there was a missing call somewhere.
1874 // If this isn't true, the parser screwed by giving us no value when we
1897 res->t = BC_RESULT_STR;
1910 else if (inst == BC_INST_RET_VOID) res->t = BC_RESULT_VOID;
1981 // We need to ensure that strings and arrays aren't passed to most builtins.
2051 if (opd->t == BC_RESULT_ARRAY)
2126 // We don't need to update the pointer because
2188 if (r1->t == BC_RESULT_ARRAY_ELEM && (r1->t == r2->t || r1->t == r3->t))
2253 assert(BC_IS_BC || r->t != BC_RESULT_ARRAY);
2257 if (r->t == BC_RESULT_ARRAY)
2331 res.t = BC_RESULT_STR;
2443 // If we don't have enough executions, just quit.
2514 bool exec;
2526 exec = (r->d.n.len != 0);
2528 idx = exec ? then_idx : else_idx;
2535 // not exist, we don't execute. The goto skips all of the setup for the
2537 if (exec || (else_idx != SIZE_MAX))
2553 assert(r->t != BC_RESULT_VAR);
2555 if (r->t != BC_RESULT_STR) return;
2592 // Parse. Only one expression is needed, so stdin isn't used.
2602 assert(vm->read_prs.l.t == BC_LEX_EOF);
2678 BcResultType t;
2684 t = inst - BC_INST_IBASE + BC_RESULT_IBASE;
2685 bc_program_pushBigdig(p, p->globals[inst - BC_INST_IBASE], t);
2740 res->t = BC_RESULT_SEED;
2992 // XXX: We don't do this in dc because other dc implementations don't.
3060 // BC_INST_INVALID is a marker for the end so that we don't have to have an
3374 r.t = BC_RESULT_ZERO + (inst - BC_INST_ZERO);
3401 r.t = BC_RESULT_STR;