guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for wip-rtl


From: Andy Wingo
Subject: Re: Patches for wip-rtl
Date: Mon, 22 Apr 2013 22:27:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Noah,

On Sun 21 Apr 2013 17:50, Noah Lavine <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]