Monday, May 19th, 2008

Having a Tamarin trace a Spidermonkey

Category: Firefox, JavaScript, Performance

David Mandelin has posted about Tracehydra, which is the idea that the traced based JIT engine that is being worked on as part of Tamarin could be hooked up to Spidermonkey.

Tracehydra would be the fluffy cloud that translates Spidermonkey bytecode to Tamarin IL (or possibly LIR-the details get confusing fast). (In the interest of reducing confusion slightly, I’ll say that IL stands for intermediate language, and is roughly a synonym for bytecode. TT people often refer to their IL as “Forth” because they based the design on Forth or something, but I know nothing more about Forth than that it involves stacks, so that doesn’t help me.)

Specifically, Tracehydra means using Treehydra to translate the Spidermonkey (SM hereafter) C code that interprets each bytecode into C++ that emits equivalent (to the C) Tamarin IL. So I guess it reduces the problem from translating SM bytecode TT IL to translating SM C cases to TT IL-building code. Put that way, it’s not clear this actually helps, but I think SM bytecode is believed to have complex semantics that would be difficult to code in TT IL by hand, and maybe the C in SM has fewer constructs that are easier to translate. Seems possible, anyway.

David then goes on to digg into Tamarin, which is weak on docs (according to him). He walks through the various pieces of Tamarin and explains the ABC bytecode vs. the IL etc. A very nice read, and maybe Tracehydra will be the first form that we see Tamarin in Firefox?

Posted by Dion Almaer at 7:15 am

3.2 rating from 17 votes


Comments feed TrackBack URI

nitpick corner: digg is the website, the english word still has just one g ;)

i wouldn’t be posting this if i hadn’t made the same mistake last week :)

Comment by AlliXSenoS — May 19, 2008

That’s just confusing. He should learn Forth and then write the article again.

Comment by Nosredna — May 19, 2008

Leave a comment

You must be logged in to post a comment.