[fpc-devel] Summer of code collaboration

Michael Van Canneyt michael at freepascal.org
Sat Feb 9 14:43:36 CET 2013



On Sat, 9 Feb 2013, Florian Klämpfl wrote:

> Am 09.02.2013 03:13, schrieb Vittorio Giovara:
>> To do that we are using a tool
>> named 'emscripten' which takes LLVM bytecode and generates Javascript,
>> without affecting performance too much. Yes, we had to write a horribly
>> hacked converter that took the small subset of Pascal used by Hedgewars
>> and convert it to C (on a side node, the converter is written in
>> Haskell) and reimplement the RTL.
>
> I still don't understand what's the use of generating LLVM code in
> between instead of generating directly Javascript ... The process
> pascal->llvm->js looks as well very fragile to me.

While I agree that if the end target is Javascript it would be better to
generate it directly, but generating LLVM may be useful in its own right.

(otherwise Jonas would not have started it to begin with ;))

Michael


More information about the fpc-devel mailing list