Skip to content

Conversation

@kripken
Copy link
Member

@kripken kripken commented Jul 22, 2016

I think this is right, but not sure I read the spec correctly.

Each global has a type and a normally-emitted expression, with a 0 ending, and it must contain one expression which is popped and used as the initial value for the global. @rossberg-chromium, is that correct?

@rossberg
Copy link
Member

Right. I was following WebAssembly/design#727, but still missing the mutability flag. The init expression is terminated by 0x0F (end) in the encoding. It must have a matching type.

Also note that the opcodes for get/set_global are probably not final yet, because of the conflict between design PRs #727 and #711.

@kripken
Copy link
Member Author

kripken commented Jul 22, 2016

Great, thanks. I think this is all correct currently.

(Looks like I misspoke earlier when I said 0, I meant the end marker, which is indeed 0x0F.)

@kripken kripken merged commit b17a18a into master Jul 22, 2016
@kripken kripken deleted the globals-binary branch July 22, 2016 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants