summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-20 19:22:08 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-20 19:25:09 -0800
commitc7eaa6261215689f4cea1264da8b44494bc7f2a9 (patch)
treef37309bd98d3bb18ea290a94490f85f3b8f34f2f
parent42000f2ed456c05747c04e8b4a159bb8a3464c21 (diff)
downloadbinaryen-c7eaa6261215689f4cea1264da8b44494bc7f2a9.tar.gz
binaryen-c7eaa6261215689f4cea1264da8b44494bc7f2a9.tar.bz2
binaryen-c7eaa6261215689f4cea1264da8b44494bc7f2a9.zip
ignore .section inside objects in s2wasm, and update .s tests
-rw-r--r--src/s2wasm.h3
-rw-r--r--test/dot_s/cfg-stackify.wast254
-rw-r--r--test/dot_s/load.wast12
-rw-r--r--test/dot_s/offset.wast204
-rw-r--r--test/dot_s/store-trunc.wast12
-rw-r--r--test/dot_s/store.wast12
-rw-r--r--test/dot_s/switch.wast14
-rw-r--r--test/dot_s/vtable.wast107
m---------test/experimental0
9 files changed, 255 insertions, 363 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 4ba491061..71b17fc5b 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -830,12 +830,15 @@ private:
void parseObject(Name name) {
if (match(".data") || match(".bss")) {
+ } else if (match(".section")) {
+ s = strchr(s, '\n');
} else if (match(".lcomm")) {
mustMatch(name.str);
skipComma();
getInt();
return;
}
+ skipWhitespace();
size_t align = 16; // XXX default?
if (match(".globl")) {
mustMatch(name.str);
diff --git a/test/dot_s/cfg-stackify.wast b/test/dot_s/cfg-stackify.wast
index 547fb49af..1c244c230 100644
--- a/test/dot_s/cfg-stackify.wast
+++ b/test/dot_s/cfg-stackify.wast
@@ -142,25 +142,31 @@
)
)
(block $BB3_5
- (block $BB3_2
+ (block $BB3_4
(br_if
- (get_local $$0)
- $BB3_2
+ (i32.eq
+ (get_local $$0)
+ (i32.const 0)
+ )
+ $BB3_4
)
(i32.store align=4
(get_local $$2)
- (i32.const 1)
+ (i32.const 2)
)
- (br $BB3_5)
- )
- (i32.store align=4
- (get_local $$2)
- (i32.const 2)
- )
- (block $BB3_4
- (br_if
- (get_local $$1)
- $BB3_4
+ (block $BB3_3
+ (br_if
+ (i32.eq
+ (get_local $$1)
+ (i32.const 0)
+ )
+ $BB3_3
+ )
+ (i32.store align=4
+ (get_local $$2)
+ (i32.const 4)
+ )
+ (br $BB3_5)
)
(i32.store align=4
(get_local $$2)
@@ -170,7 +176,7 @@
)
(i32.store align=4
(get_local $$2)
- (i32.const 4)
+ (i32.const 1)
)
)
(i32.store align=4
@@ -226,18 +232,21 @@
(block $BB5_3
(block $BB5_2
(br_if
- (get_local $$1)
+ (i32.eq
+ (get_local $$1)
+ (i32.const 0)
+ )
$BB5_2
)
(i32.store align=4
(get_local $$0)
- (i32.const 1)
+ (i32.const 2)
)
(br $BB5_3)
)
(i32.store align=4
(get_local $$0)
- (i32.const 2)
+ (i32.const 1)
)
)
(i32.store align=4
@@ -369,28 +378,31 @@
)
)
(block $BB10_4
- (block $BB10_2
+ (block $BB10_3
(br_if
- (get_local $$0)
- $BB10_2
+ (i32.eq
+ (get_local $$0)
+ (i32.const 0)
+ )
+ $BB10_3
)
(i32.store align=4
(get_local $$2)
- (i32.const 1)
+ (i32.const 2)
+ )
+ (br_if
+ (get_local $$1)
+ $BB10_4
+ )
+ (i32.store align=4
+ (get_local $$2)
+ (i32.const 3)
)
(br $BB10_4)
)
(i32.store align=4
(get_local $$2)
- (i32.const 2)
- )
- (br_if
- (get_local $$1)
- $BB10_4
- )
- (i32.store align=4
- (get_local $$2)
- (i32.const 3)
+ (i32.const 1)
)
)
(i32.store align=4
@@ -412,25 +424,31 @@
(i32.const 0)
)
(block $BB11_6
- (block $BB11_3
+ (block $BB11_5
(br_if
- (get_local $$0)
- $BB11_3
+ (i32.eq
+ (get_local $$0)
+ (i32.const 0)
+ )
+ $BB11_5
)
(i32.store align=4
(get_local $$2)
- (i32.const 1)
+ (i32.const 2)
)
- (br $BB11_6)
- )
- (i32.store align=4
- (get_local $$2)
- (i32.const 2)
- )
- (block $BB11_5
- (br_if
- (get_local $$1)
- $BB11_5
+ (block $BB11_4
+ (br_if
+ (i32.eq
+ (get_local $$1)
+ (i32.const 0)
+ )
+ $BB11_4
+ )
+ (i32.store align=4
+ (get_local $$2)
+ (i32.const 4)
+ )
+ (br $BB11_6)
)
(i32.store align=4
(get_local $$2)
@@ -440,7 +458,7 @@
)
(i32.store align=4
(get_local $$2)
- (i32.const 4)
+ (i32.const 1)
)
)
(i32.store align=4
@@ -455,35 +473,38 @@
(func $test3 (param $$0 i32)
(block $fake_return_waka123
(block
- (block $BB12_5
+ (block $BB12_2
(br_if
- (i32.const 0)
- $BB12_5
+ (i32.eq
+ (i32.const 0)
+ (i32.const 0)
+ )
+ $BB12_2
)
- (loop $BB12_4 $BB12_1
- (block
- (br_if
- (get_local $$0)
- $BB12_4
- )
- (loop $BB12_3 $BB12_2
- (block
- (br_if
- (i32.ne
- (get_local $$0)
- (get_local $$0)
- )
- $BB12_2
+ (br $fake_return_waka123)
+ )
+ (loop $BB12_5 $BB12_2
+ (block
+ (br_if
+ (get_local $$0)
+ $BB12_5
+ )
+ (loop $BB12_4 $BB12_3
+ (block
+ (br_if
+ (i32.ne
+ (get_local $$0)
+ (get_local $$0)
)
+ $BB12_3
)
)
- (call_import $bar)
- (br $BB12_1)
)
+ (call_import $bar)
+ (br $BB12_2)
)
- (unreachable)
)
- (br $fake_return_waka123)
+ (unreachable)
)
)
)
@@ -695,15 +716,18 @@
)
(block $BB16_4
(br_if
- (i32.and
- (get_local $$0)
- (get_local $$3)
+ (i32.eq
+ (i32.and
+ (get_local $$0)
+ (get_local $$3)
+ )
+ (i32.const 0)
)
$BB16_4
)
(i32.store align=4
(get_local $$2)
- (i32.const 2)
+ (i32.const 3)
)
(br_if
(i32.and
@@ -714,13 +738,13 @@
)
(i32.store align=4
(get_local $$2)
- (i32.const 4)
+ (i32.const 5)
)
(unreachable)
)
(i32.store align=4
(get_local $$2)
- (i32.const 3)
+ (i32.const 2)
)
(br_if
(i32.and
@@ -733,7 +757,7 @@
)
(i32.store align=4
(get_local $$2)
- (i32.const 5)
+ (i32.const 4)
)
(unreachable)
)
@@ -948,72 +972,70 @@
(get_local $$0)
)
(block $BB20_8
- (block $BB20_7
- (block $BB20_6
- (block $BB20_4
- (br_if
- (get_local $$0)
- $BB20_4
- )
- (i32.store align=4
- (get_local $$0)
- (i32.const 1)
- )
- (block $BB20_3
- (br_if
- (get_local $$0)
- $BB20_3
- )
- (i32.store align=4
- (get_local $$0)
- (i32.const 2)
- )
- (br_if
- (get_local $$0)
- $BB20_6
- )
- )
- (i32.store align=4
- (get_local $$0)
- (i32.const 3)
- )
- (br $fake_return_waka123)
+ (block $BB20_4
+ (br_if
+ (get_local $$0)
+ $BB20_4
+ )
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 1)
+ )
+ (block $BB20_3
+ (br_if
+ (get_local $$0)
+ $BB20_3
)
(i32.store align=4
(get_local $$0)
- (i32.const 4)
+ (i32.const 2)
)
(br_if
(get_local $$0)
$BB20_8
)
- (i32.store align=4
+ )
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 3)
+ )
+ (br $fake_return_waka123)
+ )
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 4)
+ )
+ (block $BB20_6
+ (br_if
+ (i32.eq
(get_local $$0)
- (i32.const 5)
- )
- (br_if
- (i32.eq
- (get_local $$0)
- (i32.const 0)
- )
- $BB20_7
+ (i32.const 0)
)
+ $BB20_6
)
(i32.store align=4
(get_local $$0)
- (i32.const 7)
+ (i32.const 8)
)
(br $fake_return_waka123)
)
(i32.store align=4
(get_local $$0)
+ (i32.const 5)
+ )
+ (br_if
+ (get_local $$0)
+ $BB20_8
+ )
+ (i32.store align=4
+ (get_local $$0)
(i32.const 6)
)
(br $fake_return_waka123)
)
(i32.store align=4
(get_local $$0)
- (i32.const 8)
+ (i32.const 7)
)
(br $fake_return_waka123)
)
diff --git a/test/dot_s/load.wast b/test/dot_s/load.wast
index b718df93e..8177bb15c 100644
--- a/test/dot_s/load.wast
+++ b/test/dot_s/load.wast
@@ -4,7 +4,6 @@
(export "ldi64" $ldi64)
(export "ldf32" $ldf32)
(export "ldf64" $ldf64)
- (export "ldoff" $ldoff)
(func $ldi32 (param $$0 i32) (result i32)
(block $fake_return_waka123
(block
@@ -49,16 +48,5 @@
)
)
)
- (func $ldoff (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=4
- (get_local $$0)
- )
- )
- )
- )
- )
)
;; METADATA: { "asmConsts": {} } \ No newline at end of file
diff --git a/test/dot_s/offset.wast b/test/dot_s/offset.wast
index 24baaaeda..7fafb078e 100644
--- a/test/dot_s/offset.wast
+++ b/test/dot_s/offset.wast
@@ -1,35 +1,20 @@
(module
(memory 0 4294967295 (segment 2 "\00\00\00\00"))
(export "load_i32_with_folded_offset" $load_i32_with_folded_offset)
- (export "load_i32_with_folded_gep_offset" $load_i32_with_folded_gep_offset)
- (export "load_i32_with_unfolded_gep_negative_offset" $load_i32_with_unfolded_gep_negative_offset)
(export "load_i32_with_unfolded_offset" $load_i32_with_unfolded_offset)
- (export "load_i32_with_unfolded_gep_offset" $load_i32_with_unfolded_gep_offset)
(export "load_i64_with_folded_offset" $load_i64_with_folded_offset)
- (export "load_i64_with_folded_gep_offset" $load_i64_with_folded_gep_offset)
- (export "load_i64_with_unfolded_gep_negative_offset" $load_i64_with_unfolded_gep_negative_offset)
(export "load_i64_with_unfolded_offset" $load_i64_with_unfolded_offset)
- (export "load_i64_with_unfolded_gep_offset" $load_i64_with_unfolded_gep_offset)
(export "store_i32_with_folded_offset" $store_i32_with_folded_offset)
- (export "store_i32_with_folded_gep_offset" $store_i32_with_folded_gep_offset)
- (export "store_i32_with_unfolded_gep_negative_offset" $store_i32_with_unfolded_gep_negative_offset)
(export "store_i32_with_unfolded_offset" $store_i32_with_unfolded_offset)
- (export "store_i32_with_unfolded_gep_offset" $store_i32_with_unfolded_gep_offset)
(export "store_i64_with_folded_offset" $store_i64_with_folded_offset)
- (export "store_i64_with_folded_gep_offset" $store_i64_with_folded_gep_offset)
- (export "store_i64_with_unfolded_gep_negative_offset" $store_i64_with_unfolded_gep_negative_offset)
(export "store_i64_with_unfolded_offset" $store_i64_with_unfolded_offset)
- (export "store_i64_with_unfolded_gep_offset" $store_i64_with_unfolded_gep_offset)
(export "load_i32_from_numeric_address" $load_i32_from_numeric_address)
(export "load_i32_from_global_address" $load_i32_from_global_address)
(export "store_i32_to_numeric_address" $store_i32_to_numeric_address)
(export "store_i32_to_global_address" $store_i32_to_global_address)
(export "load_i8_s_with_folded_offset" $load_i8_s_with_folded_offset)
- (export "load_i8_s_with_folded_gep_offset" $load_i8_s_with_folded_gep_offset)
(export "load_i8_u_with_folded_offset" $load_i8_u_with_folded_offset)
- (export "load_i8_u_with_folded_gep_offset" $load_i8_u_with_folded_gep_offset)
(export "store_i8_with_folded_offset" $store_i8_with_folded_offset)
- (export "store_i8_with_folded_gep_offset" $store_i8_with_folded_gep_offset)
(func $load_i32_with_folded_offset (param $$0 i32) (result i32)
(block $fake_return_waka123
(block
@@ -41,31 +26,6 @@
)
)
)
- (func $load_i32_with_folded_gep_offset (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=4 offset=24
- (get_local $$0)
- )
- )
- )
- )
- )
- (func $load_i32_with_unfolded_gep_negative_offset (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=4
- (i32.add
- (get_local $$0)
- (i32.const -24)
- )
- )
- )
- )
- )
- )
(func $load_i32_with_unfolded_offset (param $$0 i32) (result i32)
(block $fake_return_waka123
(block
@@ -80,20 +40,6 @@
)
)
)
- (func $load_i32_with_unfolded_gep_offset (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=4
- (i32.add
- (get_local $$0)
- (i32.const 24)
- )
- )
- )
- )
- )
- )
(func $load_i64_with_folded_offset (param $$0 i32) (result i64)
(block $fake_return_waka123
(block
@@ -105,31 +51,6 @@
)
)
)
- (func $load_i64_with_folded_gep_offset (param $$0 i32) (result i64)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i64.load align=8 offset=24
- (get_local $$0)
- )
- )
- )
- )
- )
- (func $load_i64_with_unfolded_gep_negative_offset (param $$0 i32) (result i64)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i64.load align=8
- (i32.add
- (get_local $$0)
- (i32.const -24)
- )
- )
- )
- )
- )
- )
(func $load_i64_with_unfolded_offset (param $$0 i32) (result i64)
(block $fake_return_waka123
(block
@@ -144,20 +65,6 @@
)
)
)
- (func $load_i64_with_unfolded_gep_offset (param $$0 i32) (result i64)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i64.load align=8
- (i32.add
- (get_local $$0)
- (i32.const 24)
- )
- )
- )
- )
- )
- )
(func $store_i32_with_folded_offset (param $$0 i32)
(block $fake_return_waka123
(block
@@ -169,31 +76,6 @@
)
)
)
- (func $store_i32_with_folded_gep_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=4 offset=24
- (get_local $$0)
- (i32.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
- (func $store_i32_with_unfolded_gep_negative_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=4
- (i32.add
- (get_local $$0)
- (i32.const -24)
- )
- (i32.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
(func $store_i32_with_unfolded_offset (param $$0 i32)
(block $fake_return_waka123
(block
@@ -208,20 +90,6 @@
)
)
)
- (func $store_i32_with_unfolded_gep_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=4
- (i32.add
- (get_local $$0)
- (i32.const 24)
- )
- (i32.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
(func $store_i64_with_folded_offset (param $$0 i32)
(block $fake_return_waka123
(block
@@ -233,31 +101,6 @@
)
)
)
- (func $store_i64_with_folded_gep_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i64.store align=8 offset=24
- (get_local $$0)
- (i64.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
- (func $store_i64_with_unfolded_gep_negative_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i64.store align=8
- (i32.add
- (get_local $$0)
- (i32.const -24)
- )
- (i64.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
(func $store_i64_with_unfolded_offset (param $$0 i32)
(block $fake_return_waka123
(block
@@ -272,20 +115,6 @@
)
)
)
- (func $store_i64_with_unfolded_gep_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i64.store align=8
- (i32.add
- (get_local $$0)
- (i32.const 24)
- )
- (i64.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
(func $load_i32_from_numeric_address (result i32)
(block $fake_return_waka123
(block
@@ -349,17 +178,6 @@
)
)
)
- (func $load_i8_s_with_folded_gep_offset (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=8 offset=24
- (get_local $$0)
- )
- )
- )
- )
- )
(func $load_i8_u_with_folded_offset (param $$0 i32) (result i32)
(block $fake_return_waka123
(block
@@ -371,17 +189,6 @@
)
)
)
- (func $load_i8_u_with_folded_gep_offset (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=8 offset=24
- (get_local $$0)
- )
- )
- )
- )
- )
(func $store_i8_with_folded_offset (param $$0 i32)
(block $fake_return_waka123
(block
@@ -393,16 +200,5 @@
)
)
)
- (func $store_i8_with_folded_gep_offset (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=8 offset=24
- (get_local $$0)
- (i32.const 0)
- )
- (br $fake_return_waka123)
- )
- )
- )
)
;; METADATA: { "asmConsts": {} } \ No newline at end of file
diff --git a/test/dot_s/store-trunc.wast b/test/dot_s/store-trunc.wast
index a10f57ffd..6700d0b73 100644
--- a/test/dot_s/store-trunc.wast
+++ b/test/dot_s/store-trunc.wast
@@ -5,7 +5,6 @@
(export "trunc_i8_i64" $trunc_i8_i64)
(export "trunc_i16_i64" $trunc_i16_i64)
(export "trunc_i32_i64" $trunc_i32_i64)
- (export "trunc_i8_i32_off" $trunc_i8_i32_off)
(func $trunc_i8_i32 (param $$0 i32) (param $$1 i32)
(block $fake_return_waka123
(block
@@ -61,16 +60,5 @@
)
)
)
- (func $trunc_i8_i32_off (param $$0 i32) (param $$1 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=8 offset=1234
- (get_local $$0)
- (get_local $$1)
- )
- (br $fake_return_waka123)
- )
- )
- )
)
;; METADATA: { "asmConsts": {} } \ No newline at end of file
diff --git a/test/dot_s/store.wast b/test/dot_s/store.wast
index 75c7176f1..23cb3541f 100644
--- a/test/dot_s/store.wast
+++ b/test/dot_s/store.wast
@@ -4,7 +4,6 @@
(export "sti64" $sti64)
(export "stf32" $stf32)
(export "stf64" $stf64)
- (export "stoff" $stoff)
(func $sti32 (param $$0 i32) (param $$1 i32)
(block $fake_return_waka123
(block
@@ -49,16 +48,5 @@
)
)
)
- (func $stoff (param $$0 i32) (param $$1 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=4 offset=1
- (get_local $$0)
- (get_local $$1)
- )
- (br $fake_return_waka123)
- )
- )
- )
)
;; METADATA: { "asmConsts": {} } \ No newline at end of file
diff --git a/test/dot_s/switch.wast b/test/dot_s/switch.wast
index e88769ed7..29c46e0c4 100644
--- a/test/dot_s/switch.wast
+++ b/test/dot_s/switch.wast
@@ -1,7 +1,7 @@
(module
(memory 0 4294967295)
- (import $foo0 "env" "foo0")
(import $foo1 "env" "foo1")
+ (import $foo0 "env" "foo0")
(import $foo2 "env" "foo2")
(import $foo3 "env" "foo3")
(import $foo4 "env" "foo4")
@@ -27,13 +27,13 @@
(block $BB0_2
(tableswitch
(get_local $$0)
- (table (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_5) (case $BB0_6) (case $BB0_7)) (case $BB0_2)
+ (table (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_3) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_2) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_4) (case $BB0_5) (case $BB0_6) (case $BB0_7)) (case $BB0_3)
)
)
- (call_import $foo0)
+ (call_import $foo1)
(br $BB0_8)
)
- (call_import $foo1)
+ (call_import $foo0)
(br $BB0_8)
)
(call_import $foo2)
@@ -72,13 +72,13 @@
(i32.wrap/i64
(get_local $$0)
)
- (table (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_5) (case $BB1_6) (case $BB1_7)) (case $BB1_2)
+ (table (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_3) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_2) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_4) (case $BB1_5) (case $BB1_6) (case $BB1_7)) (case $BB1_3)
)
)
- (call_import $foo0)
+ (call_import $foo1)
(br $BB1_8)
)
- (call_import $foo1)
+ (call_import $foo0)
(br $BB1_8)
)
(call_import $foo2)
diff --git a/test/dot_s/vtable.wast b/test/dot_s/vtable.wast
new file mode 100644
index 000000000..9337d790a
--- /dev/null
+++ b/test/dot_s/vtable.wast
@@ -0,0 +1,107 @@
+(module
+ (memory 0 4294967295 (segment 16 "1A\00") (segment 32 "1B\00") (segment 48 "1C\00") (segment 64 "1D\00") (segment 68 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (segment 88 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (segment 108 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (segment 128 "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") (segment 150 "\00\00\00\00\10\00\00\00") (segment 159 "\00\00\00\00\00\00\00\00\96\00\00\00") (segment 171 "\00\00\00\00\00\00\00\00\96\00\00\00") (segment 183 "\00\00\00\00\00\00\00\00\9f\00\00\00") (segment 196 "\00\00\00\00"))
+ (import $_ZdlPv "env" "_ZdlPv")
+ (export "_ZN1A3fooEv" $_ZN1A3fooEv)
+ (export "_ZN1B3fooEv" $_ZN1B3fooEv)
+ (export "_ZN1C3fooEv" $_ZN1C3fooEv)
+ (export "_ZN1D3fooEv" $_ZN1D3fooEv)
+ (export "_ZN1AD0Ev" $_ZN1AD0Ev)
+ (export "_ZN1BD0Ev" $_ZN1BD0Ev)
+ (export "_ZN1CD0Ev" $_ZN1CD0Ev)
+ (export "_ZN1AD2Ev" $_ZN1AD2Ev)
+ (export "_ZN1DD0Ev" $_ZN1DD0Ev)
+ (func $_ZN1A3fooEv (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (i32.store align=4 offset=196
+ (i32.const 0)
+ (i32.const 2)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1B3fooEv (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (i32.store align=4 offset=196
+ (i32.const 0)
+ (i32.const 4)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1C3fooEv (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (i32.store align=4 offset=196
+ (i32.const 0)
+ (i32.const 6)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1D3fooEv (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (i32.store align=4 offset=196
+ (i32.const 0)
+ (i32.const 8)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1AD0Ev (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (call_import $_ZdlPv
+ (get_local $$0)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1BD0Ev (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (call_import $_ZdlPv
+ (get_local $$0)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1CD0Ev (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (call_import $_ZdlPv
+ (get_local $$0)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+ (func $_ZN1AD2Ev (param $$0 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (br $fake_return_waka123
+ (get_local $$0)
+ )
+ )
+ )
+ )
+ (func $_ZN1DD0Ev (param $$0 i32)
+ (block $fake_return_waka123
+ (block
+ (call_import $_ZdlPv
+ (get_local $$0)
+ )
+ (br $fake_return_waka123)
+ )
+ )
+ )
+)
+;; METADATA: { "asmConsts": {} } \ No newline at end of file
diff --git a/test/experimental b/test/experimental
-Subproject 8dc1c682b86d74d72116424334bcbddc9479e40
+Subproject 9a27e5d0153c0758728bde60ee1effdc3fa3a9e