Coder Social home page Coder Social logo

Comments (2)

rossberg avatar rossberg commented on May 30, 2024

Re 1: That would be okay, but is there really a collision? 0x40 is not a proper type opcode, but more like an escape code. A decoder can first check for 0x40, and then decode the type separately – which I think is a more efficient factoring anyway, since it avoids populating the internal type representation with a pseudotype that you then have to check for retroactively, and in all other places, too.

Re 2: The primary unit of parsing here is the table type (elemtype+limits), which occurs in other places that do not have initialisers (e.g., table imports). Putting the initialiser inside the table type would clearly be in conflict with that. Putting it before would be inconsistent with the rest of the language – in all other places we know the expected result type of an instruction sequence before we decode it, and decoders may be factored towards that assumption. In either case, to parse type+initialiser as a unit you'd have to give up parsing table types as a unit, which would strike me as a very odd choice with no benefit.

from function-references.

titzer avatar titzer commented on May 30, 2024

I suppose that I should just think of 0x40 as the escape for "not a value type" since it indicates an empty block type, and here, an extended global type. For 2, it is only a minor annoyance that I can fix with a few lines of code :-)

from function-references.

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.