summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2018-11-01 13:34:53 -0700
committerGitHub <noreply@github.com>2018-11-01 13:34:53 -0700
commit77c66027f0dcbd7160f78c5de4943372836ab142 (patch)
tree582c3f937247c14b773e9364d5a901d9db9bcfdd /test/example
parent7d3ddd09d5f68945160cda3f3749a217a13928bf (diff)
downloadbinaryen-77c66027f0dcbd7160f78c5de4943372836ab142.tar.gz
binaryen-77c66027f0dcbd7160f78c5de4943372836ab142.tar.bz2
binaryen-77c66027f0dcbd7160f78c5de4943372836ab142.zip
Emit imports before defined things in text format (#1715)
That is the correct order in the text format, wabt errors otherwise. See AssemblyScript/assemblyscript#310
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-kitchen-sink.txt8
-rw-r--r--test/example/c-api-kitchen-sink.txt.txt4
-rw-r--r--test/example/relooper-fuzz.txt4
-rw-r--r--test/example/relooper-fuzz1.txt4
4 files changed, 10 insertions, 10 deletions
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index f3e114c25..afb004f81 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -13,11 +13,11 @@ BinaryenTypeAuto: -1
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
(type $3 (func))
+ (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 1 256)
(data (i32.const 10) "hello, world")
- (table 1 1 anyfunc)
+ (table $0 1 1 anyfunc)
(elem (i32.const 0) "$kitchen()sinker")
- (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(global $a-global i32 (i32.const 7))
(global $a-mutable-global (mut f32) (f32.const 7.5))
(export "kitchen_sinker" (func "$kitchen()sinker"))
@@ -1435,11 +1435,11 @@ int main() {
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
(type $3 (func))
+ (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 1 256)
(data (i32.const 10) "hello, world")
- (table 1 1 anyfunc)
+ (table $0 1 1 anyfunc)
(elem (i32.const 0) "$kitchen()sinker")
- (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(global $a-global i32 (i32.const 7))
(global $a-mutable-global (mut f32) (f32.const 7.5))
(export "kitchen_sinker" (func "$kitchen()sinker"))
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt
index 1d2fcfdda..bddf95e79 100644
--- a/test/example/c-api-kitchen-sink.txt.txt
+++ b/test/example/c-api-kitchen-sink.txt.txt
@@ -6,11 +6,11 @@
(type $fiF (func (param i32 f64) (result f32)))
(type $v (func))
(type $3 (func))
+ (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(memory $0 1 256)
(data (i32.const 10) "hello, world")
- (table 1 1 anyfunc)
+ (table $0 1 1 anyfunc)
(elem (i32.const 0) "$kitchen()sinker")
- (import "module" "base" (func $an-imported (param i32 f64) (result f32)))
(global $a-global i32 (i32.const 7))
(global $a-mutable-global (mut f32) (f32.const 7.5))
(export "kitchen_sinker" (func "$kitchen()sinker"))
diff --git a/test/example/relooper-fuzz.txt b/test/example/relooper-fuzz.txt
index 47ebcfbb0..bde48af8c 100644
--- a/test/example/relooper-fuzz.txt
+++ b/test/example/relooper-fuzz.txt
@@ -2,8 +2,8 @@
(type $i (func (result i32)))
(type $v (func))
(type $vi (func (param i32)))
- (memory $0 1 1)
(import "spectest" "print" (func $print (param i32)))
+ (memory $0 1 1)
(export "mem" (memory $0))
(start $main)
(func $check (; 1 ;) (type $i) (result i32)
@@ -295,8 +295,8 @@
(type $i (func (result i32)))
(type $v (func))
(type $vi (func (param i32)))
- (memory $0 1 1)
(import "spectest" "print" (func $print (param i32)))
+ (memory $0 1 1)
(export "mem" (memory $0))
(start $main)
(func $check (; 1 ;) (; has Stack IR ;) (type $i) (result i32)
diff --git a/test/example/relooper-fuzz1.txt b/test/example/relooper-fuzz1.txt
index b05da62c5..af3140f9c 100644
--- a/test/example/relooper-fuzz1.txt
+++ b/test/example/relooper-fuzz1.txt
@@ -2,8 +2,8 @@
(type $i (func (result i32)))
(type $v (func))
(type $vi (func (param i32)))
- (memory $0 1 1)
(import "spectest" "print" (func $print (param i32)))
+ (memory $0 1 1)
(export "mem" (memory $0))
(start $main)
(func $check (; 1 ;) (type $i) (result i32)
@@ -271,8 +271,8 @@
(type $i (func (result i32)))
(type $v (func))
(type $vi (func (param i32)))
- (memory $0 1 1)
(import "spectest" "print" (func $print (param i32)))
+ (memory $0 1 1)
(export "mem" (memory $0))
(start $main)
(func $check (; 1 ;) (; has Stack IR ;) (type $i) (result i32)