Comments (4)
That would require first-class references to memories. That is something that has been discussed a couple of times, but it is a way more advanced extension and beyond the scope of this specific proposal. Here, we just introduce the same thing we already have for table and globals.
from multi-memory.
Maybe I am missing something, but why are memory references needed? I was more thinking about extending memory instructions in such a way that they would require an i32 operand which specifies the memory index on which to perform the operation. Instead of adding a set of new instructions a new bitflag could be devoted in existing ones which if enabled makes these instructions to take a new operand with the memory index.
I have no idea how it might be supported on the toolchain side though. I suspect that augmenting a pointer with additional memory index might just not work.
from multi-memory.
Static index spaces and dynamic operands are completely disjoint universes. If you could select a static index with a dynamic operand then all sorts of things would break, e.g., you could no longer merge modules.
To do it safely, you'll need an indirection through a table to do that, as for functions. But that would require the ability to put references to memory objects into tables.
from multi-memory.
Ah, now I see, thanks!
from multi-memory.
Related Issues (20)
- Possibility to dynamically add memories at runtime? HOT 2
- Overlap with recent issue raised on the main WASM design repo HOT 5
- Contradiction in multi-memory binary format instruction rules HOT 3
- A question about high level language interaction HOT 7
- Referencing locations across memories HOT 10
- Text format: parsing `v128.loadX_lane` and `v128.storeX_lane` requires backtracking HOT 6
- Multi-Memory Lowering & Memory Imports HOT 1
- Use-case for multi-memory: Flutter Web Engine linking with wasm-compiled skia (C++) and ICU4X (Rust) HOT 5
- Use-case for multi-memory: dart2wasm to implement ByteBuffer/TypedList objects with linear memory HOT 8
- Use-case for multi-memory: Component Model object transfer browser polyfill HOT 2
- Additional test cases for multi-memory HOT 3
- Use-case for multi-memory: Less overhead tracking of store calls to facilitate networked rollback HOT 1
- Use case for multi-memory: Sharing persistent datastructures between threads
- Toolchain support for multiple memories HOT 22
- Implementation support HOT 4
- JS-API limits test still tests for limit of 1 memory
- Tracking Phase 4 Requirements HOT 8
- Is there a way to access a non-hardcoded memory? HOT 2
- A Bug in multi memory test? HOT 2
- Spec for instantiation of active data segments is incorrect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multi-memory.