Compilation strategy

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Dec 18 07:53:32 PST 2012


On Tue, Dec 18, 2012 at 07:01:28AM -0800, Walter Bright wrote:
> On 12/18/2012 1:43 AM, Dmitry Olshansky wrote:
> >Compared to doing computations on AST tries (and looking up every
> >name in symbol table?), creating fake nodes when the result is
> >computed etc?
> 
> CTFE does not look up every (or any) name in the symbol table. I don't
> see any advantage to interpreting bytecode over interpreting ASTs. In
> fact, all the Java bytecode is is a serialized AST.

I've always thought that CTFE should run native code.

Yes, I'm aware of the objections related to cross-compiling, etc., but
honestly, how many people actually use a cross-compiler (or know what it
is)? Interpreting CTFE to me should be a fallback, not the default mode
of implementation.


T

-- 
Acid falls with the rain; with love comes the pain.


More information about the Digitalmars-d mailing list