go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
904 stars 148 forks source link

What's the 'arity' in the control instruction means?[Not bug, but ask for your help] #99

Closed mohanson closed 5 years ago

mohanson commented 5 years ago

This is not a bug or question about your code, but I would be very grateful if can get helps from you.

I try to understand your code, and when I was looking at the WebAssembly Core Specification, a problem plagued me for a long time:

Core Spec: 4.4.5.3. block [t?] instr∗ end Says:

Let n be the arity ∣t∣ of the result type t

What's the mean of arity?

sbinet commented 5 years ago

according to wikipedia, the ultimate source of truth in the known universe:

e.g.:

func f1(n int) { ... }
func f2(a, b int) { ... }
func f3(a, b, c int) { ... }