Re: Re: Prothon's parser is too naive

"Mark Hahn" <[email protected]>
Newsgroups gmane.comp.lang.prothon.user
Message-ID <000f01c46571$4b0a42d0$0d01a8c0@MarkVaio>
Paul Prescod wrote:

>> Prothon will never do static optimizations in the compiler.  It is a
>> dynamic language through and through.
>
> Maybe you mean static *type-based* optimizations.
>
> If not: are you saying that if I look at a series of Prothon's byte
> codes I will be unable to find any inefficiencies? i.e. byte code
> sequences that could be optimized to other byte code sequences without
> changing the semantics at all?
>
> If there are no such inefficiencies then I'm amazed.
>
> If there are such inefficiencies then why would you argue against
> optimizing them away at compile time? (anyhow, I don't see why you
> would decide in advance never, ever, to take advantage of type
> optimizations either. If the code says "3+5" why shouldn't the
> compiler replace it with "8")

OK, you've got me there.

I did just admit in another message that I will be doing register
optimization.  I just realized an easy way to do constant folding in my
current compiler.  I'll be dealing with all this in my next phase.  We'll
see then if we need an AST or not.  You know how much I like my simple
one-pass compiler. :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.