[Vm-dev] tracking WebAssembly

Ben Coman btc at openinworld.com
Sat Mar 30 05:38:53 UTC 2019

On Tue, 19 Mar 2019 at 16:47, Ben Coman <btc at openinworld.com> wrote:

> On Sun, 17 Mar 2019 at 02:49, Eliot Miranda <eliot.miranda at gmail.com>
> wrote:
>> Hi Ben,
>> On Fri, Mar 15, 2019 at 2:13 AM Ben Coman <btc at openinworld.com> wrote:
>>> Found some recent WebAssembly articles that may impact issues previously
>>> raised as impediments to Smalltalk-on-WebAssembly.
>>> Do these indicate anything useful for the possibility of running
>>> Squeak/Pharo on WebAssembly...
>>> Calls between JavaScript and WebAssembly are finally fast
>>> https://hacks.mozilla.org/2018/10/calls-between-javascript-and-webassembly-are-finally-fast-%F0%9F%8E%89/
>>> WebAssembly architecture for Go
>>> https://docs.google.com/document/d/131vjr4DH6JFnb-blm_uRdaC0_Nv3OUwjEY5qVCxCup4/preview#
>> Good to read.  What can you find that discusses the range of stack frame
>> formats?  To map the StackInterpreter to WebAssembly conveniently we would
>> need there ability to store the current method/closure in each frame.
>From WebAssembly Illustrated...
* Slide 23 - Call stack

I haven't spent any time trying to understand the code in this link, but
does it give some hints...?

Something formal...

At a stretch for hints, V8 handling of walking WebAssembly frames...

 cheers -ben

> Can you point me to the code where this happens?
> And is there a good general description of this that I could refer to if I
> was discussing this with someone outside our community?

P.S. I vaguely remember a concern about non-local-returns
described as  "A blockClosure has a direct pointer to its outerContext, the
context that created the blockClosure. With this variable, the blockClosure
can ... perform non local return. ... A blockClosure can return either to
its sender (see our example with false as argument) or to its homeContext
sender. This non local returns requires the virtual machine to walk up the
stack until it finds the stack frame to return to. This can be done only
using the outerContext field."

I wonder if such walking-the-stack could be helped by using WebAssembly
described as "Traps are bubbled up through nested instruction sequences"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190330/223a8ce5/attachment.html>

More information about the Vm-dev mailing list