Skip to content
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

[spec/interpreter/test] Rename memory instructions #649

Closed
wants to merge 2 commits into from

Conversation

rossberg
Copy link
Member

This is a PR to implement #627. It renames:

  • current_memory -> mem.size
  • grow_memory -> mem.grow
  • memory -> mem (in memory declarations, imports, and exports)

It also adjusts the naming conventions in the interpreter and adapts all tests.

@jfbastien
Copy link
Member

Can discuss and vote on this in the next CG meeting before doing the change? I don't think it's purely editorial given that some tooling already relies on it.

@rossberg
Copy link
Member Author

@jfbastien, absolutely. Didn't plan to land this before that.

text: 𝗂𝟥𝟤.𝖼𝗈𝗇𝗌𝗍
text: 𝖿𝟥𝟤.𝖼𝗈𝗇𝗌𝗍
text: 𝖿𝟨𝟦.𝖼𝗈𝗇𝗌𝗍
text: 헂ퟨퟦ.햼허헇헌헍
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o_O

What happened here? :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, no idea. I think my editor barfed on the extended Unicode. Fixed, but @littledan, why this fancy? I for one have no idea how I would even input these characters if I needed to edit any of this.

@@ -38,5 +38,5 @@ let lookup name t =
| "global", ExternGlobalType t -> ExternGlobal (global t)
| "global", _ -> ExternGlobal (global (GlobalType (I32Type, Immutable)))
| "table", _ -> ExternTable table
| "memory", _ -> ExternMemory memory
| "memory", _ -> ExternMem mem
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"mem" too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ballercat
Copy link

This only affects text encoding correct? All binary encoding and opcodes remain the same, yes?

@rossberg
Copy link
Member Author

rossberg commented Feb 9, 2018

@ballercat, yes.

@binji
Copy link
Member

binji commented Feb 22, 2018

This came up at the Feb 21st CG meeting. There wasn't much discussion, other than some mentioning they didn't like memory -> mem for the section name.

I see now that all we really needed was a CG vote for this, but that didn't happen unfortunately. Perhaps the best thing to do for now is update this PR and wait for the next one to get an official vote?

@rossberg
Copy link
Member Author

Alternative PR with long names: #720.

@rossberg
Copy link
Member Author

rossberg commented Apr 4, 2018

Abandoned in favour of #720 after CG decision.

@rossberg rossberg closed this Apr 4, 2018
@rossberg rossberg deleted the spec.mem-instructions branch April 4, 2018 13:44
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.

4 participants