topEntryFrame is usually on VM, but for a no-VM WebAssembly we need to hold topEntryFrame elsewhere, and generated code cannot hard-code where topEntryFrame live. Do this at creation time of Wasm::Instance, and then generated code will just load from wherever Wasm::Instance was told topEntryFrame is. In a JavaScript embedding this is still from VM, so all of the unwinding machinery stays the same.
Created attachment 324611 [details] patch
Comment on attachment 324611 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=324611&action=review > Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:137 > + EntryFrame** m_topEntryFramePointer { nullptr }; Why have this in both JSWebAssemblyInstance and WasmInstance?
(In reply to Saam Barati from comment #2) > Comment on attachment 324611 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=324611&action=review > > > Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:137 > > + EntryFrame** m_topEntryFramePointer { nullptr }; > > Why have this in both JSWebAssemblyInstance and WasmInstance? JSWebAssemblyInstance copies a bunch of things from Wasm::Instance for now, because the goal I'm driving towards is having Wasm::Context be Wasm::Instance (not JSWebAssemblyInstance), and I want the swap to be as trivial as possible (i.e. change one line to do that swap, then delete all the copies from JSWebAssemblyInstance). If I do it right everything else will be the same.
Created attachment 324613 [details] patch
Comment on attachment 324613 [details] patch Clearing flags on attachment: 324613 Committed r223866: <https://trac.webkit.org/changeset/223866>
All reviewed patches have been landed. Closing bug.
I think this broke the windows build? https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/5466/steps/compile-webkit/logs/stdio
Re-opened since this is blocked by bug 178699
Committed r223875: <https://trac.webkit.org/changeset/223875>
(In reply to Keith Miller from comment #7) > I think this broke the windows build? > https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/ > 5466/steps/compile-webkit/logs/stdio lolwut?
<rdar://problem/35568509>