需要一个 WebAssembly "br_table" 指令的例子
Need an example of "br_table" instruction of WebAssembly
我需要一个 WebAssembly "br_table" 指令的示例,因为我不知道如何直接以 WebAssembly 文本格式使用该指令。
就像下面的代码,我看不出它的构造结构对应的是哪一部分。 "default_target" 或 "target_table" 等是哪一部分?
(br_table 0 1 2 (i32.const 16) (get_local 0))
如果您只需要一个语法示例,WebAssembly test suite 是一个很好的参考。 br_table
规范测试在这里:
https://github.com/WebAssembly/testsuite/blob/master/br_table.wast
这是一个例子:
(br_table 1 1 1 (i32.const 5) (i32.const 1))
我需要一个 WebAssembly "br_table" 指令的示例,因为我不知道如何直接以 WebAssembly 文本格式使用该指令。
就像下面的代码,我看不出它的构造结构对应的是哪一部分。 "default_target" 或 "target_table" 等是哪一部分?
(br_table 0 1 2 (i32.const 16) (get_local 0))
如果您只需要一个语法示例,WebAssembly test suite 是一个很好的参考。 br_table
规范测试在这里:
https://github.com/WebAssembly/testsuite/blob/master/br_table.wast
这是一个例子:
(br_table 1 1 1 (i32.const 5) (i32.const 1))