Exemplo n.º 1
0
static void evalOperands(Register result, List list)
{
    Register regResult = regGetTemp();
    void* value;

    ListIterator li;
    regMakeNull(result);
    /* Walk the list from tail to head so we can use cons to build the result */
    for (li = lstGetIteratorTail(list); !liIsNull(li); liPrev(li)) {
	liGetValue(li, &value);
	execInput(regResult, (Input)value);
	cons(result, regResult, result);
    }
    liDelete(li);
    regFreeTemp(regResult);
}
Exemplo n.º 2
0
	void Proc::execStype() {
		Word opcode = W_OM_SOPC((*prg_)[pc_]);
		
		switch (opcode) {
			case sNoop:
				//
				break;
			case sCmpz:
				execCmpz();
				break;
			case sSqrt:
				execSqrt();
				break;
			case sCopy:
				execCopy();
				break;
			case sInput:
				execInput();
				break;
			default:
				assert(false);
		}
	}