summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wasm-s-parser.h2
-rw-r--r--test/empty_imported_table.wast4
-rw-r--r--test/empty_imported_table.wast.fromBinary5
-rw-r--r--test/empty_imported_table.wast.fromBinary.noDebugInfo5
-rw-r--r--test/imported_memory.wast3
-rw-r--r--test/imported_memory.wast.fromBinary4
-rw-r--r--test/imported_memory.wast.fromBinary.noDebugInfo4
-rw-r--r--test/imported_memory_growth.wast3
-rw-r--r--test/imported_memory_growth.wast.fromBinary4
-rw-r--r--test/imported_memory_growth.wast.fromBinary.noDebugInfo4
10 files changed, 36 insertions, 2 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index 3e09d4f6f..fda413f80 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -1689,8 +1689,6 @@ private:
}
if (j < inner.size()) {
wasm.memory.max = atoi(inner[j++]->c_str());
- } else {
- wasm.memory.max = wasm.memory.initial;
}
}
wasm.addImport(im.release());
diff --git a/test/empty_imported_table.wast b/test/empty_imported_table.wast
new file mode 100644
index 000000000..7662c068e
--- /dev/null
+++ b/test/empty_imported_table.wast
@@ -0,0 +1,4 @@
+(module
+ (import "env" "table" (table 0 0 anyfunc))
+ (memory $0 0)
+)
diff --git a/test/empty_imported_table.wast.fromBinary b/test/empty_imported_table.wast.fromBinary
new file mode 100644
index 000000000..5edee3018
--- /dev/null
+++ b/test/empty_imported_table.wast.fromBinary
@@ -0,0 +1,5 @@
+(module
+ (import "env" "table" (table 0 0 anyfunc))
+ (memory $0 0)
+)
+
diff --git a/test/empty_imported_table.wast.fromBinary.noDebugInfo b/test/empty_imported_table.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..5edee3018
--- /dev/null
+++ b/test/empty_imported_table.wast.fromBinary.noDebugInfo
@@ -0,0 +1,5 @@
+(module
+ (import "env" "table" (table 0 0 anyfunc))
+ (memory $0 0)
+)
+
diff --git a/test/imported_memory.wast b/test/imported_memory.wast
new file mode 100644
index 000000000..fb3c45f5a
--- /dev/null
+++ b/test/imported_memory.wast
@@ -0,0 +1,3 @@
+(module
+ (import "env" "memory" (memory $0 256 256))
+)
diff --git a/test/imported_memory.wast.fromBinary b/test/imported_memory.wast.fromBinary
new file mode 100644
index 000000000..bcbd85473
--- /dev/null
+++ b/test/imported_memory.wast.fromBinary
@@ -0,0 +1,4 @@
+(module
+ (import "env" "memory" (memory $0 256 256))
+)
+
diff --git a/test/imported_memory.wast.fromBinary.noDebugInfo b/test/imported_memory.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..bcbd85473
--- /dev/null
+++ b/test/imported_memory.wast.fromBinary.noDebugInfo
@@ -0,0 +1,4 @@
+(module
+ (import "env" "memory" (memory $0 256 256))
+)
+
diff --git a/test/imported_memory_growth.wast b/test/imported_memory_growth.wast
new file mode 100644
index 000000000..d13b95853
--- /dev/null
+++ b/test/imported_memory_growth.wast
@@ -0,0 +1,3 @@
+(module
+ (import "env" "memory" (memory $0 256))
+)
diff --git a/test/imported_memory_growth.wast.fromBinary b/test/imported_memory_growth.wast.fromBinary
new file mode 100644
index 000000000..426313d7f
--- /dev/null
+++ b/test/imported_memory_growth.wast.fromBinary
@@ -0,0 +1,4 @@
+(module
+ (import "env" "memory" (memory $0 256))
+)
+
diff --git a/test/imported_memory_growth.wast.fromBinary.noDebugInfo b/test/imported_memory_growth.wast.fromBinary.noDebugInfo
new file mode 100644
index 000000000..426313d7f
--- /dev/null
+++ b/test/imported_memory_growth.wast.fromBinary.noDebugInfo
@@ -0,0 +1,4 @@
+(module
+ (import "env" "memory" (memory $0 256))
+)
+