summaryrefslogtreecommitdiff
path: root/src/scheme/ao_scheme_lambda.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-12-19 12:39:20 -0800
committerKeith Packard <keithp@keithp.com>2017-12-19 12:39:20 -0800
commited1f7b79abc7400a54b35fbf62c9db6855f9129a (patch)
treeaad2b1c704d4f4a32eb54e46784858ca7cb0bf2f /src/scheme/ao_scheme_lambda.c
parent71fb79492cb955af4bd52e79f1fa69d17e084dbc (diff)
altos/scheme: Replace per-type indexed stash with poly stash heap
Instead of having a random set of stash arrays with explicit indices used by callers, just have a general heap. Less error prone, and less code. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/scheme/ao_scheme_lambda.c')
-rw-r--r--src/scheme/ao_scheme_lambda.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scheme/ao_scheme_lambda.c b/src/scheme/ao_scheme_lambda.c
index e8ce0710..e818d7b0 100644
--- a/src/scheme/ao_scheme_lambda.c
+++ b/src/scheme/ao_scheme_lambda.c
@@ -89,9 +89,9 @@ ao_scheme_lambda_alloc(struct ao_scheme_cons *code, int args)
}
}
- ao_scheme_cons_stash(0, code);
+ ao_scheme_cons_stash(code);
lambda = ao_scheme_alloc(sizeof (struct ao_scheme_lambda));
- code = ao_scheme_cons_fetch(0);
+ code = ao_scheme_cons_fetch();
if (!lambda)
return AO_SCHEME_NIL;
@@ -160,9 +160,9 @@ ao_scheme_lambda_eval(void)
return ao_scheme_error(AO_SCHEME_INVALID, "need at least %d args, got %d", args_wanted, args_provided);
}
- ao_scheme_poly_stash(1, varargs);
+ ao_scheme_poly_stash(varargs);
next_frame = ao_scheme_frame_new(args_wanted + (varargs != AO_SCHEME_NIL));
- varargs = ao_scheme_poly_fetch(1);
+ varargs = ao_scheme_poly_fetch();
if (!next_frame)
return AO_SCHEME_NIL;