[fpc-pascal] p2js - pascal to javascript compiler

Michael Van Canneyt michael at freepascal.org
Sun Jun 7 09:28:46 CEST 2015



On Sun, 7 Jun 2015, Bee wrote:

> The interesting part of this product is it tries to compile all the FPC RTL into Javascript as well. Unlike Smart Pascal. So we don't just have Pascal to Javascript
> translator but also with all the useful RTL.

As far as I can see, this is not correct. The rtl units have been hand-crafted.
Many of them contain assembler code, and this is simply impossible to translate.

> Btw, it seems that it targets only Windows platform. I failed when I tried to compile it on Ubuntu Linux using FPC 2.6.4 Is there a way to compile it on Linux,
> Michael? Can you do that?

I have asked Florian to take a look at integrating it back in the compiler (that is be.
I myself will take some ideas from it and see how far it gets me in the external tool.
The var param support was bugging me, and they use an interesting technique for it with closures.

Michael.



More information about the fpc-pascal mailing list