[Prev][Next][Index][Thread]
Re: jvm
Bruce Hoult" <bruce@hoult.org> wrote:
> That's a *big* problem for a Mindy-style (or javac-style) compiler, but
> it's not such a big deal if you're retargetting d2c. GF dispatch is
> slow even on real CPUs so the compiler tries pretty hard to avoid it
> whenever possible -- and the language design tries to help. If you use
> something like the GF dispatch algorithm in the recent Cecil/Vortex
> paper then you're doing GF dispatch by using an optomised sequence of
> single-argument dispatches, which *would* map onto what's in the jvm
> fairly well.
Right, but
1) The class structure of the generated code would not really match the
original code, making integration with Java code slightly obtuse.
2) Tail calls would be a problem. Note that they are also a problem with
d2c (except when the compiler is able to eliminate them, which is most of
the time), but JVMs often provide much smaller stack space than d2c-compiled
programs generally have avialable.
Cheers,
-Peter S. Housel- housel@acm.org http://members.home.com/housel/
References:
- Re: jvm
- From: Rob Myers <robm@h2g2.com>
- Re: jvm
- From: Bruce Hoult <bruce@hoult.org>