[Vm-dev] Re: [squeak-dev] re: compiled squeakjs

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Mon Jan 19 18:33:01 UTC 2015


On Mon, Jan 19, 2015 at 6:21 AM, Craig Latta <craig at netjam.org> wrote:
>
>> As I understand it, running under NaCl requires reworking the JIT and
>> has real problems doing the self-modifying code involved in inline
>> caches, etc.
>
>      Yep, you rebuild your app to use the NaCl instruction set, and it
> translates to physical instructions on demand. The "safety" constraints
> it places on the code you generate are substantial. If you were even
> allowed to run the code you want, the performance goal would be demolished.

"Demolished" is probably a too strong word; The Mono JIT they ported
to NaCl only slowed down something like 7%.  (Not going through the
PNaCl layer but just x86 nacl code.)  So that is not that bad...
However,

>      But worse, you've also demolished the "run anywhere" goal from the
> outset, by limiting yourself to browsers that support NaCl. And I don't
> see how to meet this goal with any browser-plugin approach. There just
> isn't a widely-supported mechanism anymore, after the death of the
> Netscape-style plugin.

Yes, this is a real issue.  In that regard, asm.js has a better
chance, but still trying to stay on the JavaScript level, and taking
the advantage of JavaScript's JIT is a practical solution, even though
it may not give us the real Cog performance.

-- 
-- Yoshiki


More information about the Vm-dev mailing list