WebAssembly / gc

Branch of the spec repo scoped to discussion of GC integration in WebAssembly
https://webassembly.github.io/gc/
Other
997 stars 72 forks source link

Rename i31.new mnemonic to ref.i31 #422

Closed rossberg closed 1 year ago

rossberg commented 1 year ago

This renames the i31.new mnemonic to ref.i31.

Rationale: We should reserve new for instructions that allocate a (fresh) object on the heap. The whole point of i31ref is that it does not allocate anything, nor create a distinguished new reference. The instruction hence rather is in the same category as ref.null and ref.func.

Only affects the text format.

tlively commented 1 year ago

Seems fine to me. @jakobkummerow, @eqrion, or anyone else, any objections?

jakobkummerow commented 1 year ago

No objections, it's just a name.