[Pas2js] Disable optimization in specific units/blocks

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jan 10 23:41:55 CET 2019


On Thu, 10 Jan 2019 19:31:25 -0300
silvioprog <silvioprog at gmail.com> wrote:

>[...]
> It would be nice some keyword (e.g: *volatile*), directive and/or some
> special comment like "{%no-optimize}" to disable the optimization in
> specific unit parts. Any unconditional compiler behavior that removes
> things from the programmer code maybe will cause serious problems in
> large applications. Just my 2 cents.

"unconditional"? The condition is pretty simple: Referenced by
Pascal code.
Note that contrary to asm-blocks of Delphi/FPC, JS code cannot be
reliably parsed at compile time.

We all agree that $push, $pop, $optimization and some way to annotate
asm-blocks are needed.

Mattias


More information about the Pas2js mailing list