-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add memory exports #243
Add memory exports #243
Conversation
|
On the Web platform, memory exporting means that JS gets an |
In the binary format there is just a bit to declare that the memory is On Wed, Feb 17, 2016 at 3:28 PM, Luke Wagner notifications@github.com
|
It just seems ad hoc and irregular, esp if we later have other kinds of exports. Also, given that export names will end up controlled by user code, yes, collision is a real concern (just like magic properties |
I'm for exporting the entire memory in MVP (@lukewagner's spec impl), but against exporting subsets: IMO subsets of memory exports are the same as cross-process shared memory from the POV of the wasm user. We need a solid design and we should consider what's been done before (export handles / IDs versus named shared memory, ...). The complexity tells me we should punt post-MVP and go with the simpler thing @lukewagner has now. |
Is there any where other than |
v8 and SpiderMonkey (using the proposed syntax in this PR). |
LGTM, if it's fine with everybody else. |
This PR made sense to me when memory exports were injected into the same namespace as function exports. More recent discussions suggests exports would have their own namespace object and memory would be separate, so it seems fine to stay with the current v8 design of:
That suggests reverting this patch and just adding an |
SGTM On Fri, Feb 26, 2016 at 12:16 PM, Luke Wagner notifications@github.com
|
Actually, thinking about this more: the reason for making memory a special kind of export is that it would need a getter on the proto (to be able to issue different |
* Add f32x4 add sub mul div neg sqrt This makes simd_f32x4_arith.wast pass. * Fix formatting Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org> * Split out simd shape into int and float Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org> * Nicer function name Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org> Co-authored-by: Andreas Rossberg <rossberg@mpi-sws.org>
In WebAssembly#243 I accepted some changes without pulling and running locally. My laziness is rewarded with compilation errors. This fixes the issue.
- Add missing `th` - Add missing `Then the compound instruction is valid with type [t1*]->[t2*].` - Add a link to "Throw Contexts" - Tidy up the equation for throw contexts - Add missing `epsilon`
When memory is exported, it needs to be given a name and exported into the same namespace as the normal (function) exports. In the future, other kinds of things may be exported too (for example, the immutable load-time-initialized global "symbols" needed for dynamic linking). All this suggests changing
export
to be a union ofExportFunction
andExportMemory
(and other cases in the future).