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


On Sun, 17 Mar 2019 at 02:49, Eliot Miranda <eliot.miranda@gmail.com> wrote:
 
Hi Ben,

On Fri, Mar 15, 2019 at 2:13 AM Ben Coman <btc@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


WebAssembly architecture for Go

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.

* 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 traps
described as "Traps are bubbled up through nested instruction sequences"