guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Planning work


From: Keisuke Nishida
Subject: Re: Planning work
Date: Sun, 06 May 2001 13:55:02 -0400
User-agent: Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.102 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

At 05 May 2001 21:58:26 -0500,
Rob Browning wrote:
> 
> Marius Vollmer <address@hidden> writes:
> 
> > Yes, looks very reasonable.  I would be careful with the term
> > "translator", tho.  The translators that Thomas ants to work on are
> > probably something different from the ones in your figures.  I'd say a
> > translator should target Scheme, not our intermediate format.
> 
> Oh, right.  I would consider a translator in that sense to go at the
> front of each of the lists I presented.  Perhaps I should have used
> the name "codegen" for the backend bit.  So then you'd have:
> 
>  {awk,elisp,whatever}-translator -> sexp -> compiler -> primitive-rep
>    -> hobbit-codegen -> gcc -> .so - - -> dynamic-link

How would you maintain source properties (i.e., rows and columns)
when you translate a target language into Scheme?  Using
`set-source-properties!'?  I think translating into an intermediate
representation is more convenient.  Is there a really good reason
for a translator to target Scheme?

I'm thinking of the following compilation steps:

               reader               translator
  Source code  ----->  Parse Tree    -------->  Intermediate Language
    (text)        (language specific)         (internal representation)

  compiler                        codegen
  ------->  Primitive Language    ------> tree, bytecode, machine code, ...
         (internal representation)

The intermediate language should be based on Scheme, but not necessary
to be Scheme itself, I think.  We don't need to use lists to represent
the intermediate language; instead, we can use more compiler-friendly
representation during compilation.

Keisuke



reply via email to

[Prev in Thread] Current Thread [Next in Thread]