summaryrefslogtreecommitdiff
path: root/test/spec/imports.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/imports.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/imports.wast')
-rw-r--r--test/spec/imports.wast62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/spec/imports.wast b/test/spec/imports.wast
index f7805ef2b..f0ae31340 100644
--- a/test/spec/imports.wast
+++ b/test/spec/imports.wast
@@ -13,23 +13,23 @@
(func $print_i64-2 (import "spectest" "print") (param i64))
(func (export "print32") (param $i i32)
- (call 0 (get_local $i))
+ (call 0 (local.get $i))
(call $print_i32_f32
- (i32.add (get_local $i) (i32.const 1))
+ (i32.add (local.get $i) (i32.const 1))
(f32.const 42)
)
- (call $print_i32 (get_local $i))
- (call $print_i32-2 (get_local $i))
+ (call $print_i32 (local.get $i))
+ (call $print_i32-2 (local.get $i))
)
(func (export "print64") (param $i i64)
- (call 1 (get_local $i))
+ (call 1 (local.get $i))
(call $print_i64_f64
- (i64.add (get_local $i) (i64.const 1))
+ (i64.add (local.get $i) (i64.const 1))
(f64.const 53)
)
- (call $print_i64 (get_local $i))
- (call $print_i64-2 (get_local $i))
+ (call $print_i64 (local.get $i))
+ (call $print_i64-2 (local.get $i))
)
)
@@ -46,7 +46,7 @@
)
(assert_unlinkable
- (module (import "spectest" "print" (func)) (table anyfunc (elem 0)))
+ (module (import "spectest" "print" (func)) (table funcref (elem 0)))
"invalid use of host function"
)
@@ -60,16 +60,16 @@
(import "spectest" "global" (global $x i32))
(global $y (import "spectest" "global") i32)
- (func (export "get-0") (result i32) (get_global 0))
- (func (export "get-1") (result i32) (get_global 1))
- (func (export "get-x") (result i32) (get_global $x))
- (func (export "get-y") (result i32) (get_global $y))
+ (func (export "get-0") (result i32) (global.get 0))
+ (func (export "get-1") (result i32) (global.get 1))
+ (func (export "get-x") (result i32) (global.get $x))
+ (func (export "get-y") (result i32) (global.get $y))
;; TODO: mutable globals
- ;; (func (export "set-0") (param i32) (set_global 0 (get_local 0)))
- ;; (func (export "set-1") (param i32) (set_global 1 (get_local 0)))
- ;; (func (export "set-x") (param i32) (set_global $x (get_local 0)))
- ;; (func (export "set-y") (param i32) (set_global $y (get_local 0)))
+ ;; (func (export "set-0") (param i32) (global.set 0 (local.get 0)))
+ ;; (func (export "set-1") (param i32) (global.set 1 (local.get 0)))
+ ;; (func (export "set-x") (param i32) (global.set $x (local.get 0)))
+ ;; (func (export "set-y") (param i32) (global.set $y (local.get 0)))
)
(assert_return (invoke "get-0") (i32.const 666))
@@ -95,10 +95,10 @@
(module
(type (func (result i32)))
- (import "spectest" "table" (table 10 20 anyfunc))
+ (import "spectest" "table" (table 10 20 funcref))
(elem 0 (i32.const 1) $f $g)
- (func (export "call") (param i32) (result i32) (call_indirect (type 0) (get_local 0)))
+ (func (export "call") (param i32) (result i32) (call_indirect (type 0) (local.get 0)))
(func $f (result i32) (i32.const 11))
(func $g (result i32) (i32.const 22))
)
@@ -112,10 +112,10 @@
(module
(type (func (result i32)))
- (table (import "spectest" "table") 10 20 anyfunc)
+ (table (import "spectest" "table") 10 20 funcref)
(elem 0 (i32.const 1) $f $g)
- (func (export "call") (param i32) (result i32) (call_indirect (type 0) (get_local 0)))
+ (func (export "call") (param i32) (result i32) (call_indirect (type 0) (local.get 0)))
(func $f (result i32) (i32.const 11))
(func $g (result i32) (i32.const 22))
)
@@ -128,32 +128,32 @@
(assert_invalid
- (module (import "" "" (table 10 anyfunc)) (import "" "" (table 10 anyfunc)))
+ (module (import "" "" (table 10 funcref)) (import "" "" (table 10 funcref)))
"multiple tables"
)
(assert_invalid
- (module (import "" "" (table 10 anyfunc)) (table 10 anyfunc))
+ (module (import "" "" (table 10 funcref)) (table 10 funcref))
"multiple tables"
)
(assert_invalid
- (module (table 10 anyfunc) (table 10 anyfunc))
+ (module (table 10 funcref) (table 10 funcref))
"multiple tables"
)
(assert_unlinkable
- (module (import "spectest" "unknown" (table 10 anyfunc)))
+ (module (import "spectest" "unknown" (table 10 funcref)))
"unknown import"
)
(assert_unlinkable
- (module (import "spectest" "print" (table 10 anyfunc)))
+ (module (import "spectest" "print" (table 10 funcref)))
"type mismatch"
)
(assert_unlinkable
- (module (import "spectest" "table" (table 12 anyfunc)))
+ (module (import "spectest" "table" (table 12 funcref)))
"actual size smaller than declared"
)
(assert_unlinkable
- (module (import "spectest" "table" (table 10 15 anyfunc)))
+ (module (import "spectest" "table" (table 10 15 funcref)))
"maximum size larger than declared"
)
@@ -164,7 +164,7 @@
(import "spectest" "memory" (memory 1 2))
(data 0 (i32.const 10) "\10")
- (func (export "load") (param i32) (result i32) (i32.load (get_local 0)))
+ (func (export "load") (param i32) (result i32) (i32.load (local.get 0)))
)
(assert_return (invoke "load" (i32.const 0)) (i32.const 0))
@@ -176,7 +176,7 @@
(memory (import "spectest" "memory") 1 2)
(data 0 (i32.const 10) "\10")
- (func (export "load") (param i32) (result i32) (i32.load (get_local 0)))
+ (func (export "load") (param i32) (result i32) (i32.load (local.get 0)))
)
(assert_return (invoke "load" (i32.const 0)) (i32.const 0))
(assert_return (invoke "load" (i32.const 10)) (i32.const 16))
@@ -215,7 +215,7 @@
(module
(import "spectest" "memory" (memory 0 3)) ;; actual has max size 2
- (func (export "grow") (param i32) (result i32) (grow_memory (get_local 0)))
+ (func (export "grow") (param i32) (result i32) (grow_memory (local.get 0)))
)
(assert_return (invoke "grow" (i32.const 0)) (i32.const 1))
(assert_return (invoke "grow" (i32.const 1)) (i32.const 1))