[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] WASM Compile Target? (#387)

Craig Latta craig at blackpagedigital.com
Sat Mar 30 07:30:00 UTC 2019

Hi Ben--

> > In the meantime, I'm getting very good results running Squeak in web
> > browser and on Node with SqueakJS. The simple bytecode-to-JS dynamic
> > translator that Bert wrote for it is a big win. You get a decent
> > translation of bytecodes to native code via the underlying JS engine
> > (V8 et al).
> btw, Is that then a Slang to SqueakJS writer? Or is the bytecode-to-JS
> happening as some other level?

     It takes a Smalltalk CompiledMethod object, and transcribes the
instructions (bytecodes) into a JavaScript method, and makes sure to run
that instead, whenever the CompiledMethod would normally run. Then V8
optimizes the hell out of the native code for that transcribed JS
method. It's pretty neat, and makes a huge difference for lots of
things, including the UI.


Craig Latta
Black Page Digital
Amsterdam :: San Francisco
craig at blackpagedigital.com
+31   6 2757 7177
+ 1 415  287 3547

More information about the Vm-dev mailing list