summaryrefslogtreecommitdiff
path: root/test/spec/call_indirect.wast
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-01-07 13:24:58 -0800
committerGitHub <noreply@github.com>2019-01-07 13:24:58 -0800
commit7d94900ded8e2e5ce8ef8ee2687528531d8f2a97 (patch)
treed8bba13d306b0c5ecba384384e602e6cccc83015 /test/spec/call_indirect.wast
parent6f91af190effd7b8a5969314dd4fb3d2ec540524 (diff)
downloadbinaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.gz
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.bz2
binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.zip
Massive renaming (#1855)
Automated renaming according to https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
Diffstat (limited to 'test/spec/call_indirect.wast')
-rw-r--r--test/spec/call_indirect.wast84
1 files changed, 42 insertions, 42 deletions
diff --git a/test/spec/call_indirect.wast b/test/spec/call_indirect.wast
index e4161affd..7394be5a3 100644
--- a/test/spec/call_indirect.wast
+++ b/test/spec/call_indirect.wast
@@ -25,22 +25,22 @@
(func $const-f32 (type $out-f32) (f32.const 0xf32))
(func $const-f64 (type $out-f64) (f64.const 0xf64))
- (func $id-i32 (type $over-i32) (get_local 0))
- (func $id-i64 (type $over-i64) (get_local 0))
- (func $id-f32 (type $over-f32) (get_local 0))
- (func $id-f64 (type $over-f64) (get_local 0))
-
- (func $i32-i64 (type $i32-i64) (get_local 1))
- (func $i64-f64 (type $i64-f64) (get_local 1))
- (func $f32-i32 (type $f32-i32) (get_local 1))
- (func $f64-f32 (type $f64-f32) (get_local 1))
-
- (func $over-i32-duplicate (type $over-i32-duplicate) (get_local 0))
- (func $over-i64-duplicate (type $over-i64-duplicate) (get_local 0))
- (func $over-f32-duplicate (type $over-f32-duplicate) (get_local 0))
- (func $over-f64-duplicate (type $over-f64-duplicate) (get_local 0))
-
- (table anyfunc
+ (func $id-i32 (type $over-i32) (local.get 0))
+ (func $id-i64 (type $over-i64) (local.get 0))
+ (func $id-f32 (type $over-f32) (local.get 0))
+ (func $id-f64 (type $over-f64) (local.get 0))
+
+ (func $i32-i64 (type $i32-i64) (local.get 1))
+ (func $i64-f64 (type $i64-f64) (local.get 1))
+ (func $f32-i32 (type $f32-i32) (local.get 1))
+ (func $f64-f32 (type $f64-f32) (local.get 1))
+
+ (func $over-i32-duplicate (type $over-i32-duplicate) (local.get 0))
+ (func $over-i64-duplicate (type $over-i64-duplicate) (local.get 0))
+ (func $over-f32-duplicate (type $over-f32-duplicate) (local.get 0))
+ (func $over-f64-duplicate (type $over-f64-duplicate) (local.get 0))
+
+ (table funcref
(elem
$const-i32 $const-i64 $const-f32 $const-f64
$id-i32 $id-i64 $id-f32 $id-f64
@@ -92,22 +92,22 @@
;; Dispatch
(func (export "dispatch") (param i32 i64) (result i64)
- (call_indirect (type $over-i64) (get_local 1) (get_local 0))
+ (call_indirect (type $over-i64) (local.get 1) (local.get 0))
)
(func (export "dispatch-structural") (param i32) (result i64)
- (call_indirect (type $over-i64-duplicate) (i64.const 9) (get_local 0))
+ (call_indirect (type $over-i64-duplicate) (i64.const 9) (local.get 0))
)
;; Recursion
(func $fac (export "fac") (type $over-i64)
- (if i64 (i64.eqz (get_local 0))
+ (if i64 (i64.eqz (local.get 0))
(i64.const 1)
(i64.mul
- (get_local 0)
+ (local.get 0)
(call_indirect (type $over-i64)
- (i64.sub (get_local 0) (i64.const 1))
+ (i64.sub (local.get 0) (i64.const 1))
(i32.const 12)
)
)
@@ -115,15 +115,15 @@
)
(func $fib (export "fib") (type $over-i64)
- (if i64 (i64.le_u (get_local 0) (i64.const 1))
+ (if i64 (i64.le_u (local.get 0) (i64.const 1))
(i64.const 1)
(i64.add
(call_indirect (type $over-i64)
- (i64.sub (get_local 0) (i64.const 2))
+ (i64.sub (local.get 0) (i64.const 2))
(i32.const 13)
)
(call_indirect (type $over-i64)
- (i64.sub (get_local 0) (i64.const 1))
+ (i64.sub (local.get 0) (i64.const 1))
(i32.const 13)
)
)
@@ -131,19 +131,19 @@
)
(func $even (export "even") (param i32) (result i32)
- (if i32 (i32.eqz (get_local 0))
+ (if i32 (i32.eqz (local.get 0))
(i32.const 44)
(call_indirect (type $over-i32)
- (i32.sub (get_local 0) (i32.const 1))
+ (i32.sub (local.get 0) (i32.const 1))
(i32.const 15)
)
)
)
(func $odd (export "odd") (param i32) (result i32)
- (if i32 (i32.eqz (get_local 0))
+ (if i32 (i32.eqz (local.get 0))
(i32.const 99)
(call_indirect (type $over-i32)
- (i32.sub (get_local 0) (i32.const 1))
+ (i32.sub (local.get 0) (i32.const 1))
(i32.const 14)
)
)
@@ -236,7 +236,7 @@
(assert_invalid
(module
(type (func))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-void-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0))))
)
"type mismatch"
@@ -244,7 +244,7 @@
(assert_invalid
(module
(type (func (result i64)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-num-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0))))
)
"type mismatch"
@@ -253,7 +253,7 @@
(assert_invalid
(module
(type (func (param i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $arity-0-vs-1 (call_indirect (type 0) (i32.const 0)))
)
"type mismatch"
@@ -261,7 +261,7 @@
(assert_invalid
(module
(type (func (param f64 i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $arity-0-vs-2 (call_indirect (type 0) (i32.const 0)))
)
"type mismatch"
@@ -269,7 +269,7 @@
(assert_invalid
(module
(type (func))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $arity-1-vs-0 (call_indirect (type 0) (i32.const 1) (i32.const 0)))
)
"type mismatch"
@@ -277,7 +277,7 @@
(assert_invalid
(module
(type (func))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $arity-2-vs-0
(call_indirect (type 0) (f64.const 2) (i32.const 1) (i32.const 0))
)
@@ -288,7 +288,7 @@
(assert_invalid
(module
(type (func (param i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-func-void-vs-i32 (call_indirect (type 0) (i32.const 1) (nop)))
)
"type mismatch"
@@ -296,7 +296,7 @@
(assert_invalid
(module
(type (func (param i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-func-num-vs-i32 (call_indirect (type 0) (i32.const 0) (i64.const 1)))
)
"type mismatch"
@@ -305,7 +305,7 @@
(assert_invalid
(module
(type (func (param i32 i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-first-void-vs-num
(call_indirect (type 0) (nop) (i32.const 1) (i32.const 0))
)
@@ -315,7 +315,7 @@
(assert_invalid
(module
(type (func (param i32 i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-second-void-vs-num
(call_indirect (type 0) (i32.const 1) (nop) (i32.const 0))
)
@@ -325,7 +325,7 @@
(assert_invalid
(module
(type (func (param i32 f64)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-first-num-vs-num
(call_indirect (type 0) (f64.const 1) (i32.const 1) (i32.const 0))
)
@@ -335,7 +335,7 @@
(assert_invalid
(module
(type (func (param f64 i32)))
- (table 0 anyfunc)
+ (table 0 funcref)
(func $type-second-num-vs-num
(call_indirect (type 0) (i32.const 1) (f64.const 1) (i32.const 0))
)
@@ -348,14 +348,14 @@
(assert_invalid
(module
- (table 0 anyfunc)
+ (table 0 funcref)
(func $unbound-type (call_indirect (type 1) (i32.const 0)))
)
"unknown type"
)
(assert_invalid
(module
- (table 0 anyfunc)
+ (table 0 funcref)
(func $large-type (call_indirect (type 1012321300) (i32.const 0)))
)
"unknown type"