This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Translating into Scheme, not byte code


On Sat, Aug 12, 2000 at 03:17:27AM +0200, Mikael Djurfeldt wrote:
> Keisuke Nishida <kxn30@po.cwru.edu> writes:
> > BTW, my VM has a %jump instruction, and the intermediate code of the
> > compiler has #:label and #:goto keywords.  I think writing a compiler
> > could be easier than writing a translator when we have a VM.
> 
> I think what we'll try to focus on, at least to start with, is to
> translate into Scheme, and then, from there, to byte code.
> 
> The idea here is to modularize the process.  We want to treat the
> following problems as independently from each other as possible:
> 
> 1. Lang X --> Scheme problem
> 
> 2. Scheme --> byte code problem
> 
> 3. Scheme --> machine code problem
> 
> This has obvious gains:
> 
> * Efforts we put into solving problems 2 and 3 makes gains for all
>   languages in 1.
> 
> * We get fewer problems, in total, to solve.
> 
> * Solutions to anyone of problems 1-3 can, in principle, be replaced
>   with new versions or alternatives without the need to replace the
>   other parts.

Another advantage is that all of these can be worked on in parallel.
If you can do A and B seperately, or you can do A for half the effort
but it requires B to be finished, it may seem making A depend on B is
faster.  But Worse Is Better, and doing them seperately will be
faster.  The wacky world of volunteered resources.

>   1. We want the efforts of people writing translators to be
>      long-lasting.  If they would translate into code for your VM,
>      they would stop working the day we switch to something
>      different.

To make translators long-lasting is it more important to have a strong
user-base than to commit to long-lasting code.  If translators are an
important and well-used part of Guile, it won't be that big a deal to
reimplement them.  That said, I think what is required for translators
to become popular right now is more robustness and ease of use than
speed or other considerations, and so translating into Scheme is the
best choice right now.

  -- Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]