Re: Do everything in Java…
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Wed Dec 10 15:17:29 PST 2014
"H. S. Teoh via Digitalmars-d" wrote in message
news:mailman.3042.1418240846.9932.digitalmars-d at puremagic.com...
> Also, storing a full AST is probably overkill -- lexing and parsing the
> source generally doesn't take up too much of the compiler's time, so we
> might as well just use the source code instead.
Exactly
> What makes it more
> worthwhile is if the AST has already been somewhat processed, e.g.,
> constants have been folded, etc.. Probably after semantic1 and semantic2
> have been run (though I'm not sure how far one can get if the template
> hasn't been instantiated yet).
Not very far at all.
> This way, work that has already been done
> doesn't need to be repeated again.
When it's templates that haven't been instantiated, you haven't done any of
the work yet.
More information about the Digitalmars-d
mailing list