[Pas2js] Disable optimization in specific units/blocks

silvioprog silvioprog at gmail.com
Fri Jan 11 00:05:13 CET 2019


On Thu, Jan 10, 2019 at 7:42 PM Mattias Gaertner via Pas2js <
pas2js at lists.freepascal.org> wrote:
[...]

> "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.
>

Hm... I would have to study the compiler internals to get some idea to
solve it without putting dummy code above/below asm blocks. 🤔

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


Any option to notify the compiler not to remove our particular JS blocks
will be very useful. ☺ For now I'll do a small extra JS library and move
all polyfills into it.

--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20190110/4dfcc018/attachment.html>


More information about the Pas2js mailing list