bulk-memory-operations icon indicating copy to clipboard operation
bulk-memory-operations copied to clipboard

Fix variable names in `memory.init` execution

Open fitzgen opened this issue 5 years ago • 3 comments

The values popped from the stack were named cnt, src, and dst but then later referred to as n, s, and d respectively. I've updated all uses to the names given when popped from the stack.

fitzgen avatar Mar 09 '20 19:03 fitzgen

I think @rossberg preferred the single letter names; in particular, ISTR without them you need to bracket the letters (or they'll be interpreted as implicit multiplication). In any case, these are the only places in the file where cnt, dst and src are used.

binji avatar Mar 10 '20 07:03 binji

https://webassembly.github.io/bulk-memory-operations/core/exec/instructions.html#exec-memory-init is currently inconsistent. Looks like someone needs to make a convicing call which names to use.

nomeata avatar May 25 '20 21:05 nomeata

@nomeata, the spec doc on this proposal is inconsistent in a number of ways, due to its circular dependency with the reference types proposal. This should be rectified in the ref types spec draft, which includes this one (at some point backporting clean-ups became too much effort).

rossberg avatar May 26 '20 04:05 rossberg