Hi Noah, On Sun 21 Apr 2013 17:50, Noah Lavine <noah.b.lav...@gmail.com> writes:
> + ((assemble-program > + '((begin-program foo) > + (assert-nargs-ee/locals 0 1) > + (bind-rest 0) > + ;; nonintuitive, but the output of bind-rest has to count as an > + ;; argument for reserve-locals to work. therefore, even if we > + ;; started with 0 arguments, we end up with one. > + (assert-nargs-ee 1) > + (return 0) > + (end-program))))) Do I understand you correctly that you're just making a sequence of non-idiomatic instructions because you know that doing the assert-nargs-ee will check nargs? I would think in a normal case you'd want to do "assert-nargs-ge 0", then "bind-rest 0", then "reserve-locals 0" (or not; in this case it would not be necessary). However the bug you have seen with bind-rest is probably also present with keyword arguments. We should probably just change the reserve-locals instruction to also take "nargs" as a value, given that we know it statically at compile-time. Does that make sense to you? Andy -- http://wingolog.org/