Value* allocate(Value v) { Value *loc; pushreg(&v); loc = allocloc(); popreg(&v); assert(loc != NULL); *loc = v; return loc; }
void invoke_setter(methodmap_method_t *method, int save) { if (!method->setter) { error(152, method->name); return; } if (save) pushreg(sPRI); pushreg(sPRI); pushreg(sALT); ffcall(method->setter, NULL, 2); if (save) popreg(sPRI); if (sc_status != statSKIP) markusage(method->setter, uREAD); }
// Load the hidden array argument into ALT. void load_hidden_arg() { pushreg(sPRI); // Compute an address to the first argument, then add the argument count // to find the address after the final argument: // addr.alt 0xc ; Compute &first_arg // load.s.alt 0x8 ; Load arg count // idxaddr ; Compute (&first_arg) + argcount // load.i ; Load *(&first_arg + argcount) // move.alt ; Move result into ALT. addr_reg(0xc, sALT); load_argcount(sPRI); idxaddr(); load_i(); move_alt(); popreg(sPRI); }