if (cons == orig_cons) {
ret = car;
+ ao_scheme_cons_stash(0, cons);
if (cons->cdr == AO_SCHEME_NIL) {
switch (op) {
case builtin_minus:
break;
}
}
+ cons = ao_scheme_cons_fetch(0);
} else if (ao_scheme_integer_typep(rt) && ao_scheme_integer_typep(ct)) {
int32_t r = ao_scheme_poly_integer(ret);
int32_t c = ao_scheme_poly_integer(car);
default:
break;
}
+ ao_scheme_cons_stash(0, cons);
ret = ao_scheme_integer_poly(r);
+ cons = ao_scheme_cons_fetch(0);
} else if (ao_scheme_number_typep(rt) && ao_scheme_number_typep(ct)) {
float r, c;
inexact:
default:
break;
}
+ ao_scheme_cons_stash(0, cons);
ret = ao_scheme_float_get(r);
+ cons = ao_scheme_cons_fetch(0);
}
-
- else if (rt == AO_SCHEME_STRING && ct == AO_SCHEME_STRING && op == builtin_plus)
+ else if (rt == AO_SCHEME_STRING && ct == AO_SCHEME_STRING && op == builtin_plus) {
+ ao_scheme_cons_stash(0, cons);
ret = ao_scheme_string_poly(ao_scheme_string_cat(ao_scheme_poly_string(ret),
- ao_scheme_poly_string(car)));
+ ao_scheme_poly_string(car)));
+ cons = ao_scheme_cons_fetch(0);
+ if (!ret)
+ return ret;
+ }
else
return ao_scheme_error(AO_SCHEME_INVALID, "invalid args");
}