On Jan 6, 2011, at 10:59 AM, Mark Roos wrote:
> My goal was to do the port at the byte code level so that there would be a
> high degree of confidence
> that the 500K of existing code will work as it does today. It is a stack
> based VM so changing the arg
> order could add some pain for me (another thing I try to avoid). Since I am
> not calling Java methods
> the order is consistent within the Smalltalk world so the only rough spot is
> in guard with test.
>
> I was thinking of either permute (just move one arg), drop or collect. All
> would need to be specific for
> a given airity. Since this is for the test path of guard with test the args
> are discarded so it seems any
> of the above would work. Any thoughts on which might be the least overhead?
> ( or best optimized?).
> I was guessing permute ( as you suggested)
If I understand the issue, you want to have the GWT predicate look at the
*last* argument instead of the *first*.
In that case, the simplest way to go is to generate your GWT predicate as a
unary MH, but then wrap it in a dropArguments so it can take *all* the
arguments but drop all but the last. Then pass the the wrapped predicate to
guardWithTest.
-- John
_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev