javascriptfirefoxgoogle-nativeclient

How to send Mozilla Firefox IonMonkey MIR over HTTP (like JavaScript)?


Google Native Client makes it possible to send standartized native code from server to browser and execute it. The code runs fast.

Recently Mozilla released new JavaScript VM called IonMonkey, that has got Middle-level Intermediate Representation. First, JavaScript is translated to MIR, then optimizations are applied, and then native code is generated.

Is it possible to send MIR from server to browser like it is done using Native Client?

Are there any plans from Mozilla to make it possible?

Can Mozilla IonMonkey MIR become something like Google Native Client code?


Solution

  • It's not possible to send MIR from server to browser.

    There are no plans to make that possible. That would require building an MIR validator, for one thing, and there are no plans to build one. Furthemore, the MIR depends on type information observed at runtime; making it serializable would require also serializing and deserializing this type information and propagating it to the non-MIR parts of the JS engine when deserializing. It's a good bit of work, for dubious benefit: the resulting code will be much larger than JS source, and it's not at all clear that it would be any faster to convert to binary code, once you're done with all the validating and whatnot.