GithubHelp home page GithubHelp logo

Comments (6)

rossberg avatar rossberg commented on July 17, 2024

I believe something similar happened before with table.init, when we moved to multiple tables.

We could require the (memory 0) syntax to spell out the memory, following the syntax we use in other places. But for consistency, we'd then have to do that on all load/store instructions, which would be rather tedious.

I think we could still change the syntax for lanes (say, to lane=0), but keep allowing the current syntax as backwards compat form that you can only use without a memory index. But I suppose that doesn't actually fix your problem, because that would come after...

from multi-memory.

tlively avatar tlively commented on July 17, 2024

I actually wouldn't mind having (memory X) everywhere, but I do agree it could get tedious. I also wouldn't mind keeping the backtracking for these instructions; it's not like they should come up a lot and the backtracking is fairly minor and well contained.

from multi-memory.

tlively avatar tlively commented on July 17, 2024

I just noticed that we already define memuse ::= '(' memory x:memidx ') in the text format, so it already exists if we want to use it for memory references in instructions as well.

from multi-memory.

rossberg avatar rossberg commented on July 17, 2024

@tlively, yes, that's why I brought it up. But the tediousness argument still stands.

from multi-memory.

tlively avatar tlively commented on July 17, 2024

I just noticed that memory.init has a similar problem where e.g. figuring out whether the 5 in memory.init 5 is supposed to be a memory or data index requires backtracking.

Edit: ah, you already mentioned table.init, so I suppose this is already known. The difference is that memory.init is implemented in binaryen but table.init is not.

from multi-memory.

titzer avatar titzer commented on July 17, 2024

What about memory=N, to be more consistent with the offset=N syntax for load/store?

from multi-memory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.