Update wasmparser/wat dependencies (#2675)
* Update wasmparser/wat dependencies Bring in new opcodes and new instructions for SIMD * Update module linking syntax
This commit is contained in:
50
Cargo.lock
generated
50
Cargo.lock
generated
@@ -536,7 +536,7 @@ dependencies = [
|
||||
"souper-ir",
|
||||
"target-lexicon",
|
||||
"thiserror",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1798,7 +1798,7 @@ dependencies = [
|
||||
"peepmatic-test-operator",
|
||||
"peepmatic-traits",
|
||||
"serde",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
"z3",
|
||||
]
|
||||
|
||||
@@ -1826,7 +1826,7 @@ dependencies = [
|
||||
"peepmatic-traits",
|
||||
"rand 0.8.3",
|
||||
"serde",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1851,7 +1851,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_test",
|
||||
"thiserror",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1863,7 +1863,7 @@ dependencies = [
|
||||
"peepmatic",
|
||||
"peepmatic-test-operator",
|
||||
"souper-ir",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1884,7 +1884,7 @@ version = "0.70.0"
|
||||
dependencies = [
|
||||
"peepmatic-traits",
|
||||
"serde",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3094,15 +3094,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmparser"
|
||||
version = "0.73.1"
|
||||
version = "0.75.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8526ab131cbc49495a483c98954913ae7b83551adacab5e294cf77992e70ee7"
|
||||
checksum = "4580b6be7329cfc3277131fc8363044990effb57b3ce93ef304ca70ad4339c64"
|
||||
|
||||
[[package]]
|
||||
name = "wasmprinter"
|
||||
version = "0.2.21"
|
||||
version = "0.2.23"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edf67b8f2b3b49a5ca4f8ab6879c1c70057a6b2c14474d6126be912051f2392e"
|
||||
checksum = "fd96f124341fa6774d6092ec4049bc062aea4ab03b52e14b5c96f3667bd36961"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"wasmparser",
|
||||
@@ -3235,7 +3235,7 @@ dependencies = [
|
||||
"wasmtime-wasi-crypto",
|
||||
"wasmtime-wasi-nn",
|
||||
"wasmtime-wast",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
"wat",
|
||||
]
|
||||
|
||||
@@ -3472,7 +3472,7 @@ version = "0.23.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"wasmtime",
|
||||
"wast 32.0.0",
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3497,15 +3497,6 @@ dependencies = [
|
||||
"witx",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wast"
|
||||
version = "32.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c24a3ee360d01d60ed0a0f960ab76a6acce64348cdb0bf8699c2a866fad57c7c"
|
||||
dependencies = [
|
||||
"leb128",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wast"
|
||||
version = "33.0.0"
|
||||
@@ -3516,12 +3507,21 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wat"
|
||||
version = "1.0.33"
|
||||
name = "wast"
|
||||
version = "34.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e8f7f34773fa6318e8897283abf7941c1f250faae4e1a52f82df09c3bad7cce"
|
||||
checksum = "3de71ea922e46a60d0bde4b27ebf24ab7c4991006fd5de23ce9c58e129b3ab3c"
|
||||
dependencies = [
|
||||
"wast 32.0.0",
|
||||
"leb128",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wat"
|
||||
version = "1.0.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "474403335b9a90b21120ab8131dd888f0a8d041c2d365ab960feddfe5a73c4b6"
|
||||
dependencies = [
|
||||
"wast 34.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -45,7 +45,7 @@ libc = "0.2.60"
|
||||
log = "0.4.8"
|
||||
rayon = "1.2.1"
|
||||
humantime = "2.0.0"
|
||||
wasmparser = "0.73.0"
|
||||
wasmparser = "0.75.0"
|
||||
cap-std = "0.13"
|
||||
|
||||
[dev-dependencies]
|
||||
@@ -57,7 +57,7 @@ test-programs = { path = "crates/test-programs" }
|
||||
wasmtime-fuzzing = { path = "crates/fuzzing" }
|
||||
wasmtime-runtime = { path = "crates/runtime" }
|
||||
tracing-subscriber = "0.2.0"
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
|
||||
[build-dependencies]
|
||||
anyhow = "1.0.19"
|
||||
|
||||
@@ -30,7 +30,7 @@ peepmatic-traits = { path = "../peepmatic/crates/traits", optional = true, versi
|
||||
peepmatic-runtime = { path = "../peepmatic/crates/runtime", optional = true, version = "0.70.0" }
|
||||
regalloc = { version = "0.0.31" }
|
||||
souper-ir = { version = "2.1.0", optional = true }
|
||||
wast = { version = "32.0.0", optional = true }
|
||||
wast = { version = "34.0.0", optional = true }
|
||||
# It is a goal of the cranelift-codegen crate to have minimal external dependencies.
|
||||
# Please don't add any unless they are essential to the task of creating binary
|
||||
# machine code. Integration tests that need external dependencies can be
|
||||
|
||||
@@ -15,7 +15,7 @@ peepmatic-macro = { version = "0.70.0", path = "crates/macro" }
|
||||
peepmatic-runtime = { version = "0.70.0", path = "crates/runtime", features = ["construct"] }
|
||||
peepmatic-traits = { version = "0.70.0", path = "crates/traits" }
|
||||
serde = { version = "1.0.105", features = ["derive"] }
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
z3 = { version = "0.7.1", features = ["static-link-z3"] }
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -21,4 +21,4 @@ peepmatic-test-operator = { path = "../test-operator" }
|
||||
peepmatic-traits = { path = "../traits" }
|
||||
rand = { version = "0.8.3", features = ["small_rng"] }
|
||||
serde = "1.0.106"
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
|
||||
@@ -16,7 +16,7 @@ peepmatic-automata = { version = "0.70.0", path = "../automata", features = ["se
|
||||
peepmatic-traits = { version = "0.70.0", path = "../traits" }
|
||||
serde = { version = "1.0.105", features = ["derive"] }
|
||||
thiserror = "1.0.15"
|
||||
wast = { version = "32.0.0", optional = true }
|
||||
wast = { version = "34.0.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
peepmatic-test-operator = { version = "0.70.0", path = "../test-operator" }
|
||||
|
||||
@@ -16,4 +16,4 @@ log = "0.4.8"
|
||||
[dev-dependencies]
|
||||
peepmatic = { path = "../..", version = "0.70.0" }
|
||||
peepmatic-test-operator = { version = "0.70.0", path = "../test-operator" }
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
|
||||
@@ -11,4 +11,4 @@ edition = "2018"
|
||||
[dependencies]
|
||||
peepmatic-traits = { version = "0.70.0", path = "../traits" }
|
||||
serde = { version = "1.0.105", features = ["derive"] }
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
|
||||
@@ -12,7 +12,7 @@ keywords = ["webassembly", "wasm"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
wasmparser = { version = "0.73", default-features = false }
|
||||
wasmparser = { version = "0.75", default-features = false }
|
||||
cranelift-codegen = { path = "../codegen", version = "0.70.0", default-features = false }
|
||||
cranelift-entity = { path = "../entity", version = "0.70.0" }
|
||||
cranelift-frontend = { path = "../frontend", version = "0.70.0", default-features = false }
|
||||
|
||||
@@ -553,7 +553,9 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
| Operator::Catch { .. }
|
||||
| Operator::Throw { .. }
|
||||
| Operator::Unwind
|
||||
| Operator::Rethrow { .. } => {
|
||||
| Operator::Rethrow { .. }
|
||||
| Operator::Delegate { .. }
|
||||
| Operator::CatchAll => {
|
||||
return Err(wasm_unsupported!(
|
||||
"proposed exception handling operator {:?}",
|
||||
op
|
||||
@@ -1849,7 +1851,26 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
| Operator::I64x2ExtMulLowI32x4S
|
||||
| Operator::I64x2ExtMulHighI32x4S
|
||||
| Operator::I64x2ExtMulLowI32x4U
|
||||
| Operator::I64x2ExtMulHighI32x4U => {
|
||||
| Operator::I64x2ExtMulHighI32x4U
|
||||
| Operator::I64x2Eq
|
||||
| Operator::I64x2Ne
|
||||
| Operator::I64x2LtS
|
||||
| Operator::I64x2GtS
|
||||
| Operator::I64x2LeS
|
||||
| Operator::I64x2GeS
|
||||
| Operator::I64x2Abs
|
||||
| Operator::I64x2AllTrue
|
||||
| Operator::I16x8ExtAddPairwiseI8x16S
|
||||
| Operator::I16x8ExtAddPairwiseI8x16U
|
||||
| Operator::I32x4ExtAddPairwiseI16x8S
|
||||
| Operator::I32x4ExtAddPairwiseI16x8U
|
||||
| Operator::F32x4DemoteF64x2Zero
|
||||
| Operator::F64x2PromoteLowF32x4
|
||||
| Operator::F64x2ConvertLowI32x4S
|
||||
| Operator::F64x2ConvertLowI32x4U
|
||||
| Operator::I32x4TruncSatF64x2SZero
|
||||
| Operator::I32x4TruncSatF64x2UZero
|
||||
| Operator::I8x16Popcnt => {
|
||||
return Err(wasm_unsupported!("proposed simd operator {:?}", op));
|
||||
}
|
||||
Operator::ReturnCall { .. } | Operator::ReturnCallIndirect { .. } => {
|
||||
|
||||
@@ -17,4 +17,4 @@ cranelift-wasm = { path = "../../cranelift/wasm", version = "0.70.0" }
|
||||
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.70.0" }
|
||||
cranelift-frontend = { path = "../../cranelift/frontend", version = "0.70.0" }
|
||||
cranelift-entity = { path = "../../cranelift/entity", version = "0.70.0" }
|
||||
wasmparser = "0.73.0"
|
||||
wasmparser = "0.75.0"
|
||||
|
||||
@@ -13,7 +13,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
gimli = "0.23.0"
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
object = { version = "0.23.0", default-features = false, features = ["read_core", "elf", "write"] }
|
||||
wasmtime-environ = { path = "../environ", version = "0.23.0" }
|
||||
target-lexicon = { version = "0.11.0", default-features = false }
|
||||
|
||||
@@ -16,7 +16,7 @@ anyhow = "1.0"
|
||||
cranelift-codegen = { path = "../../cranelift/codegen", version = "0.70.0", features = ["enable-serde"] }
|
||||
cranelift-entity = { path = "../../cranelift/entity", version = "0.70.0", features = ["enable-serde"] }
|
||||
cranelift-wasm = { path = "../../cranelift/wasm", version = "0.70.0", features = ["enable-serde"] }
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
indexmap = { version = "1.0.2", features = ["serde-1"] }
|
||||
thiserror = "1.0.4"
|
||||
serde = { version = "1.0.94", features = ["derive"] }
|
||||
|
||||
@@ -13,8 +13,8 @@ arbitrary = { version = "0.4.1", features = ["derive"] }
|
||||
env_logger = "0.8.1"
|
||||
log = "0.4.8"
|
||||
rayon = "1.2.1"
|
||||
wasmparser = "0.73"
|
||||
wasmprinter = "0.2.20"
|
||||
wasmparser = "0.75"
|
||||
wasmprinter = "0.2.23"
|
||||
wasmtime = { path = "../wasmtime" }
|
||||
wasmtime-wast = { path = "../wast" }
|
||||
wasm-encoder = "0.4"
|
||||
|
||||
@@ -28,7 +28,7 @@ rayon = { version = "1.0", optional = true }
|
||||
region = "2.1.0"
|
||||
thiserror = "1.0.4"
|
||||
target-lexicon = { version = "0.11.0", default-features = false }
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
more-asserts = "0.2.1"
|
||||
anyhow = "1.0"
|
||||
cfg-if = "1.0"
|
||||
|
||||
@@ -24,7 +24,7 @@ more-asserts = "0.2.1"
|
||||
smallvec = "1.6.1"
|
||||
thiserror = "1.0.9"
|
||||
typemap = "0.3"
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
|
||||
[dev-dependencies]
|
||||
lazy_static = "1.2"
|
||||
|
||||
@@ -13,6 +13,6 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
lightbeam = { path = "..", version = "0.23.0" }
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
cranelift-codegen = { path = "../../../cranelift/codegen", version = "0.70.0" }
|
||||
wasmtime-environ = { path = "../../environ", version = "0.23.0" }
|
||||
|
||||
@@ -16,7 +16,7 @@ wasmtime-jit = { path = "../jit", version = "0.23.0" }
|
||||
wasmtime-cache = { path = "../cache", version = "0.23.0", optional = true }
|
||||
wasmtime-profiling = { path = "../profiling", version = "0.23.0" }
|
||||
target-lexicon = { version = "0.11.0", default-features = false }
|
||||
wasmparser = "0.73"
|
||||
wasmparser = "0.75"
|
||||
anyhow = "1.0.19"
|
||||
region = "2.2.0"
|
||||
libc = "0.2"
|
||||
@@ -25,7 +25,7 @@ backtrace = "0.3.42"
|
||||
rustc-demangle = "0.1.16"
|
||||
cpp_demangle = "0.3.2"
|
||||
log = "0.4.8"
|
||||
wat = { version = "1.0.18", optional = true }
|
||||
wat = { version = "1.0.35", optional = true }
|
||||
smallvec = "1.6.1"
|
||||
serde = { version = "1.0.94", features = ["derive"] }
|
||||
bincode = "1.2.1"
|
||||
|
||||
@@ -13,7 +13,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
anyhow = "1.0.19"
|
||||
wasmtime = { path = "../wasmtime", version = "0.23.0", default-features = false }
|
||||
wast = "32.0.0"
|
||||
wast = "34.0.0"
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "actively-developed" }
|
||||
|
||||
@@ -49,12 +49,12 @@
|
||||
(module $m1
|
||||
(func (export "f") (result i32)
|
||||
i32.const 0))
|
||||
(instance $m_g1 (instantiate $m0 "m" (module $m1)))
|
||||
(instance $m_g1 (instantiate $m0 (import "m" (module $m1))))
|
||||
(instance $g1 (instantiate (module $m_g1 "m")))
|
||||
(module $m2
|
||||
(func (export "f") (result i32)
|
||||
i32.const 1))
|
||||
(instance $m_g2 (instantiate $m0 "m" (module $m2)))
|
||||
(instance $m_g2 (instantiate $m0 (import "m" (module $m2))))
|
||||
(instance $g2 (instantiate (module $m_g2 "m")))
|
||||
|
||||
(func (export "get1") (result i32)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
(data (i32.const 0) "\03\00\00\00")
|
||||
)
|
||||
(instance $a (instantiate $m))
|
||||
(alias $m (memory $a "m"))
|
||||
(alias $a "m" (memory $m))
|
||||
|
||||
(func (export "get") (result i32)
|
||||
i32.const 0
|
||||
@@ -108,7 +108,7 @@
|
||||
(type $t (func))
|
||||
(module $m
|
||||
;; alias
|
||||
(alias $thunk (type outer 0 $t))
|
||||
(alias outer 0 $t (type $thunk))
|
||||
;; import
|
||||
(import "" "" (func (type $thunk)))
|
||||
;; module (referencing parent type)
|
||||
@@ -125,12 +125,12 @@
|
||||
;; instance
|
||||
(instance $i (instantiate $m2))
|
||||
;; alias that instance
|
||||
(alias $my_f (func $i ""))
|
||||
(alias $i "" (func $my_f))
|
||||
;; module
|
||||
(module $m3
|
||||
(import "" (func)))
|
||||
;; use our aliased function to create the module
|
||||
(instance $i2 (instantiate $m3 "" (func $my_f)))
|
||||
(instance $i2 (instantiate $m3 (import "" (func $my_f))))
|
||||
;; module
|
||||
(module $m4
|
||||
(import "" (func)))
|
||||
@@ -139,5 +139,5 @@
|
||||
;; instantiate the above module
|
||||
(module $smol (func $f (export "")))
|
||||
(instance $smol (instantiate $smol))
|
||||
(instance (instantiate $m "" (instance $smol)))
|
||||
(instance (instantiate $m (import "" (instance $smol))))
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
(module
|
||||
(import "" (func))
|
||||
(start 0))
|
||||
(instance $a (instantiate 0 "" (func $set)))
|
||||
(instance $a (instantiate 0 (import "" (func $set))))
|
||||
)
|
||||
|
||||
(assert_return (invoke $a "get") (i32.const 1))
|
||||
@@ -49,7 +49,7 @@
|
||||
global.set 0)
|
||||
(start 0))
|
||||
|
||||
(instance $a (instantiate 0 "" (global $g)))
|
||||
(instance $a (instantiate 0 (import "" (global $g))))
|
||||
)
|
||||
(assert_return (invoke $a "get") (i32.const 2))
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
call_indirect)
|
||||
(start 0))
|
||||
|
||||
(instance $a (instantiate 0 "" (table $t)))
|
||||
(instance $a (instantiate 0 (import "" (table $t))))
|
||||
)
|
||||
(assert_return (invoke $a "get") (i32.const 3))
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
i32.store)
|
||||
(start 0))
|
||||
|
||||
(instance $a (instantiate 0 "" (memory $m)))
|
||||
(instance $a (instantiate 0 (import "" (memory $m))))
|
||||
)
|
||||
(assert_return (invoke $a "load") (i32.const 100))
|
||||
|
||||
@@ -88,13 +88,13 @@
|
||||
|
||||
(module $m1
|
||||
(import "" (instance (export "" (func))))
|
||||
(alias (func 0 ""))
|
||||
(alias 0 "" (func))
|
||||
(start 0))
|
||||
|
||||
(module $m2
|
||||
(func (export "") (import "")))
|
||||
(instance $i (instantiate $m2 "" (func $set)))
|
||||
(instance (instantiate $m1 "" (instance $i)))
|
||||
(instance $i (instantiate $m2 (import "" (func $set))))
|
||||
(instance (instantiate $m1 (import "" (instance $i))))
|
||||
)
|
||||
(assert_return (invoke $a "get") (i32.const 4))
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
(module $m2
|
||||
(func (export "") (result i32)
|
||||
i32.const 5))
|
||||
(instance $i (instantiate $m1 "" (module $m2)))
|
||||
(instance $i (instantiate $m1 (import "" (module $m2))))
|
||||
(func (export "get") (result i32)
|
||||
call (func $i ""))
|
||||
)
|
||||
@@ -122,13 +122,13 @@
|
||||
(module $m
|
||||
(import "" (module $m (export "get" (func (result i32)))))
|
||||
(instance $i (instantiate $m))
|
||||
(alias $f (func $i "get"))
|
||||
(alias $i "get" (func $f))
|
||||
(export "" (func $f))
|
||||
)
|
||||
(module $m2
|
||||
(func (export "get") (result i32)
|
||||
i32.const 6))
|
||||
(instance $a (instantiate $m "" (module $m2)))
|
||||
(instance $a (instantiate $m (import "" (module $m2))))
|
||||
|
||||
(func (export "get") (result i32)
|
||||
call (func $a ""))
|
||||
@@ -163,10 +163,10 @@
|
||||
|
||||
(instance $a
|
||||
(instantiate 0
|
||||
"m" (memory $m)
|
||||
"g" (global $g)
|
||||
"t" (table $t)
|
||||
"f" (func $f)
|
||||
(import "m" (memory $m))
|
||||
(import "g" (global $g))
|
||||
(import "t" (table $t))
|
||||
(import "f" (func $f))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -183,10 +183,10 @@
|
||||
(module $mt (import "" (table 1 funcref)))
|
||||
(module $mg (import "" (global (mut i32))))
|
||||
|
||||
(instance (instantiate $mm "" (memory $m)))
|
||||
(instance (instantiate $mf "" (func $f)))
|
||||
(instance (instantiate $mt "" (table $t)))
|
||||
(instance (instantiate $mg "" (global $g)))
|
||||
(instance (instantiate $mm (import "" (memory $m))))
|
||||
(instance (instantiate $mf (import "" (func $f))))
|
||||
(instance (instantiate $mt (import "" (table $t))))
|
||||
(instance (instantiate $mg (import "" (global $g))))
|
||||
)
|
||||
|
||||
;; instantiate nested
|
||||
@@ -204,13 +204,13 @@
|
||||
(import "" (func))
|
||||
(start 0)
|
||||
)
|
||||
(instance (instantiate 0 "" (func 0)))
|
||||
(instance (instantiate 0 (import "" (func 0))))
|
||||
)
|
||||
(instance (instantiate 0 "" (func 0)))
|
||||
(instance (instantiate 0 (import "" (func 0))))
|
||||
)
|
||||
(instance (instantiate 0 "" (func 0)))
|
||||
(instance (instantiate 0 (import "" (func 0))))
|
||||
)
|
||||
(instance (instantiate 0 "" (func 0)))
|
||||
(instance (instantiate 0 (import "" (func 0))))
|
||||
)
|
||||
(assert_return (invoke $a "get") (i32.const 1))
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
(module $m1
|
||||
(import "a" "f" (func)))
|
||||
(instance (instantiate $m1 "a" (instance 0)))
|
||||
(instance (instantiate $m1 (import "a" (instance 0))))
|
||||
)
|
||||
|
||||
(module
|
||||
@@ -300,9 +300,9 @@
|
||||
(func (export "")))
|
||||
(instance $i (instantiate $a))
|
||||
(import "m" (module $b (import "" (func))))
|
||||
(instance $b (instantiate $b "" (func $i ""))))
|
||||
(instance $b (instantiate $b (import "" (func $i "")))))
|
||||
|
||||
;; we should be able to instantiate m2 with m1 because m1 doesn't actually
|
||||
;; import anything (always safe to remove imports!)
|
||||
(instance (instantiate $m2 "m" (module $m1)))
|
||||
(instance (instantiate $m2 (import "m" (module $m1))))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user