JIT JS for Odyssey
  • Just looking around
    Posts: 5 from 2014/9/29
    Did you know that at the time development of JavaScript JIT for OWB was started there already existed a working MacroAssembler for JSC? (I had ported it from TenFourFox to WebKit.)
    However I did never try to get the JavaScript JIT working (backporting of whole WebKit is keeping me busy enough) using that assembler but YarrJIT (regular expressions) is working well using it.
    Unfortunately I didn't know of a way to get in contact with bigfoot, until now - I'd really like to port this to Leopard WebKit (mainly targetted at PowerPC OS X 10.5).

    Please keep me updated in the progress of this - I'm also willing to cooperate in order to get this fully working in the not too distant future.
  • »01.10.14 - 18:34
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > at the time development of JavaScript JIT for OWB was started there already existed
    > a working MacroAssembler for JSC [...] (I had ported it from TenFourFox to WebKit.)
    > However I did never try to get the JavaScript JIT working [...] using that assembler but
    > YarrJIT (regular expressions) is working well using it.

    I remember the author of Odyssey talking about this here on MorphZone.

    > I'm also willing to cooperate in order to get this fully working in the not too distant future.

    That's a nice offer and I hope bigfoot can make use of it coming from a skilled person like you. And btw, thanks for fixing LLInt for 32-bit big endian.
  • »01.10.14 - 20:56
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 510 from 2003/4/11
    Quote:

    internetzel wrote:
    Did you know that at the time development of JavaScript JIT for OWB was started there already existed a working MacroAssembler for JSC? (I had ported it from TenFourFox to WebKit.)
    However I did never try to get the JavaScript JIT working (backporting of whole WebKit is keeping me busy enough) using that assembler but YarrJIT (regular expressions) is working well using it.
    Unfortunately I didn't know of a way to get in contact with bigfoot, until now - I'd really like to port this to Leopard WebKit (mainly targetted at PowerPC OS X 10.5).


    The problem is not implementing the macro assembler... That was the easy part of this project :) The problem is that Webkit's JIT engine heavily depends on the machine it runs on being little endian. This dependency/assumption is embedded so deep into JSC that 90% of my time has been spent on fixing/working around this.

    As an example, Webkit has a structure that looks something like this:

    Code:

    union EndianFucked
    {
    double DoubleValue;
    int IntegerValue;
    };


    Then when accessing IntegerValue, it expects to get the lower half of DoubleValue. The JIT engine itself also expects this layout - it assumes that at a 32 pointer to a Javascript value lies the lower half of a 64 bit value, often in ways that are difficult or impossible to detect automatically. Which means I've spent a lot of time running websites, watch the generated code crash, generate hundreds of MB of debug logs over serial, spotting where it could look like that values got swapped, try to figure out where that happened in the JIT generator, and so on.

    This is also why this project is as delayed as it is. When I initially looked at it, it looked like I "just" had to implement a PPC code generator to get this working - but it turned out that that part would be less than 10% of the final project. Fixing these endian issues in Webkit is what keeps me busy.

    [ Edited by bigfoot 02.10.2014 - 03:46 ]
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »02.10.14 - 04:46
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 165 from 2004/11/18
    Bigfoot many thanks for your incredible work on this project, you're the best pizza coder for sure ;-)
  • »02.10.14 - 21:33
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Cego
    Posts: 733 from 2006/5/28
    From: Germany
    hey bigfoot! is there any progress on this?

    thanks for your hard work!
    Pegasos II G4 @1.0GHz, 1GB DDR Ram, Radeon 9200Pro, 240GB SSD+160GB HD, MorphOS 3.18, AmigaOS4.1 FE, Debian 8
  • »01.03.15 - 23:40
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    tolkien
    Posts: 523 from 2013/5/29
    No pressures but how is It going? Any advance? Thanks!
    MorphOS: PowerMac G5 - PowerBook G4 - MacMini.
    Classic: Amiga 1200/060 - A500 PiStorm
  • »14.08.15 - 05:05
    Profile