[fpc-devel] Pascal to Javascript - Call for Help
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Sat Apr 5 18:36:56 CEST 2014
Michael Van Canneyt wrote:
> Hello,
>
> After many years of dreaming of an open source version of Morfik
> Appsbuilder,
> (and more recently Smart Mobile Studio), I've finally committed a first
> version of the pascal-to-javascript conversion engine.
:-)
> As a consequence, not all pascal constructs will be supported (pointers,
> direct memory access jump to mind).
I've spent time over the last few months converting some Javascript to
Pascal. The thing that really stood out in the original code was that
bitwise manipulation of integers (specifically, integers of the order of
48 bits) was poor, resulting in gross overuse of multiply and mod operators.
As a side effect of this (unless, of course, everything works first
time), I'm hoping to put time into some comparison utilities that- if
things work out- will be smart enough to locate corresponding statements
in two different languages. If my recollection of the algorithms is
correct, central to doing this is that the relative size of lines stays
more or less the same, i.e. the longest lines in the Javascript
translate to the longest lines in Pascal (and, obviously, vice versa).
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list