cardinal-dev
[Top][All Lists]
Advanced

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

Re: [Cardinal-dev] Compiler structure / AST format


From: Dan Sugalski
Subject: Re: [Cardinal-dev] Compiler structure / AST format
Date: Thu, 25 Apr 2002 11:53:47 -0400

At 4:05 AM +0300 4/25/02, Einar Karttunen wrote:
On 24.04 17:39, Phil Tomson wrote:
 > The intermediate would make it eaiser to 'bolt-on' other VMs or to compile
 the intermediate to native code (like what is done in .NET and it's clr).


The reason for the immediate is the optimiser pass and the complexity of backends.
* backends need to only know about the intermediate code not the AST
* frontends and backends can be switched with no recoding
* some optimisations common to all backends are very unnatural at the AST level

I'll point out that some optimisations common to all backends are very natural to do at the AST level. Most compilers I know of have at least three different intermediate representations of the code for the optimiser because of the different characteristics of the different optimisations. Some work best with a high-level representation, some with a medium-level representation, and some with a low-level representation.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
address@hidden                         have teddy bears and even
                                      teddy bears get drunk



reply via email to

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