diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-10-07 10:57:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-07 10:57:50 -0700 |
commit | cbeb4c9f9ba7c8f50fcb938ef668842bbd5dacb4 (patch) | |
tree | 71af10f36b62851530c686d47a361e108f3316e3 /test/example/c-api-kitchen-sink.txt.txt | |
parent | caf0a3db20bbc03d2261b2c5a112bc0eddd3ca73 (diff) | |
download | binaryen-cbeb4c9f9ba7c8f50fcb938ef668842bbd5dacb4.tar.gz binaryen-cbeb4c9f9ba7c8f50fcb938ef668842bbd5dacb4.tar.bz2 binaryen-cbeb4c9f9ba7c8f50fcb938ef668842bbd5dacb4.zip |
Change print order of top-level module components (#751)
In wast files, the spec and WABT require imports to appear before any
non-import definitions (see also
https://github.com/WebAssembly/wabt/issues/152). This patch re-orders
visitModule in the wast printer to meet this requirement, and more or
less match the order of the binary sections. Also remove extraneous
whitespace around table definitions.
Diffstat (limited to 'test/example/c-api-kitchen-sink.txt.txt')
-rw-r--r-- | test/example/c-api-kitchen-sink.txt.txt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/example/c-api-kitchen-sink.txt.txt b/test/example/c-api-kitchen-sink.txt.txt index b77e5c6c4..26a765b26 100644 --- a/test/example/c-api-kitchen-sink.txt.txt +++ b/test/example/c-api-kitchen-sink.txt.txt @@ -2,18 +2,18 @@ (f32.const -33.61199951171875) ) (module - (memory $0 1 256) - (data (i32.const 10) "hello, world") - (start $starter) (type $iiIfF (func (param i32 i64 f32 f64) (result i32))) (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))) - (export "kitchen_sinker" (func "$kitchen()sinker")) - (export "mem" (memory $0)) (table 1 1 anyfunc) (elem (i32.const 0) "$kitchen()sinker") + (memory $0 1 256) + (data (i32.const 10) "hello, world") + (export "kitchen_sinker" (func "$kitchen()sinker")) + (export "mem" (memory $0)) + (start $starter) (func "$kitchen()sinker" (type $iiIfF) (param $0 i32) (param $1 i64) (param $2 f32) (param $3 f64) (result i32) (local $4 i32) (block $the-body i32 @@ -532,11 +532,11 @@ ) ) (module - (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) (import "module" "check" (func $check (param i32))) + (memory $0 0) (func $just-one-block (type $v) (local $0 i32) (call $check @@ -1018,11 +1018,11 @@ ) ) (module - (memory $0 0) (type $v (func)) (type $vi (func (param i32))) (type $i (func (result i32))) (import "module" "check" (func $check (param i32))) + (memory $0 0) (func $just-one-block (type $v) (call $check (i32.const 1337) |