Re: Re: ?int - what's the representation?

Daniel Bonniot <[email protected]> Fri, 17 Sep 2004 10:48:17 +0200
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
Hello Adam!

> One possible optimization would be boolean+int (to keep things off the
> heap).

Right. Note however that this would only work when using the value with the 
type ?int. For instance, if you want to put it inside a Collection<Object> or 
pass to a generic method <T> void foo(T); I don't see how the wrapping can be 
avoided.

The optimization would be interesting nonetheless.

> In general, it would be neat to see this sort of
> unboxing-heapvals-as-multiple-stackvals.  I've been looking into
> automated bytecode transformations to do this sort of thing
> post-compilation.

And how did it go?

I guess it would be easier to do it during compilation, when you have all the 
typing information.

By the way, what happened to your project to extend Nice with pattern matching 
on fields of the arguments?

Cheers,

Daniel


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php