This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: After GOOPS integration: Computation with native types!
- To: djurfeldt at nada dot kth dot se
- Subject: Re: After GOOPS integration: Computation with native types!
- From: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Date: 16 Aug 2000 19:44:27 -0400
- Cc: guile at sourceware dot cygnus dot com
- References: <xy78ztygbwk.fsf_-_@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> GOOPS is prepared for a fairly advanced type of optimization, the main
> feature of which is to eliminate most type dispatches.
>
> The method compiler in GOOPS has the advantage that it *knows* the
> types of the method arguments. The "observers" of Jost's environment
> implementation, which Dirk is currently merging into Guile, allow us
> to safely replace many generic function invocations with method
> invocations, and we may even break closure borders and do some
> inlining.
>
> An example of the effect this has on method code is that most type
> dispatches in GOOPS object slot accessors can be removed from the
> method code.
>
> Now, with Keisuke's VM, things start to get *really* exciting. It
> will be possible to install a method compiler which compiles to byte
> codes. And since we're fairly free to introduce new byte code
> instructions, we can do the following:
(snip)
This is like something I have had in my mind. Is it possible for
a byte compiler to remove run-time type despatches? My compiler
has a facility of producing byte codes according to the type of
variables (if it is known), so I guess methods can be determined
at compile time.
Do I need to include some special feature in my VM? Hmm, but maybe
I shouldn't do that now...