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/emcc_hello_world.fromasm.imprecise.no-opts | |
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/emcc_hello_world.fromasm.imprecise.no-opts')
-rw-r--r-- | test/emcc_hello_world.fromasm.imprecise.no-opts | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/test/emcc_hello_world.fromasm.imprecise.no-opts b/test/emcc_hello_world.fromasm.imprecise.no-opts index 684d0047d..9fbc85898 100644 --- a/test/emcc_hello_world.fromasm.imprecise.no-opts +++ b/test/emcc_hello_world.fromasm.imprecise.no-opts @@ -35,29 +35,7 @@ (import "env" "table" (table 18 18 anyfunc)) (import "env" "memoryBase" (global $memoryBase i32)) (import "env" "tableBase" (global $tableBase i32)) - (export "_i64Subtract" (func $_i64Subtract)) - (export "_free" (func $_free)) - (export "_main" (func $_main)) - (export "_i64Add" (func $_i64Add)) - (export "_memset" (func $_memset)) - (export "_malloc" (func $_malloc)) - (export "_memcpy" (func $_memcpy)) - (export "_bitshift64Lshr" (func $_bitshift64Lshr)) - (export "_fflush" (func $_fflush)) - (export "___errno_location" (func $___errno_location)) - (export "_bitshift64Shl" (func $_bitshift64Shl)) - (export "runPostSets" (func $runPostSets)) - (export "stackAlloc" (func $stackAlloc)) - (export "stackSave" (func $stackSave)) - (export "stackRestore" (func $stackRestore)) - (export "establishStackSpace" (func $establishStackSpace)) - (export "setThrew" (func $setThrew)) - (export "setTempRet0" (func $setTempRet0)) - (export "getTempRet0" (func $getTempRet0)) - (export "dynCall_ii" (func $dynCall_ii)) - (export "dynCall_iiii" (func $dynCall_iiii)) - (export "dynCall_vi" (func $dynCall_vi)) - (export "___udivmoddi4" (func $___udivmoddi4)) + (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) (global $STACKTOP (mut i32) (get_global $STACKTOP$asm2wasm$import)) (global $STACK_MAX (mut i32) (get_global $STACK_MAX$asm2wasm$import)) (global $tempDoublePtr (mut i32) (get_global $tempDoublePtr$asm2wasm$import)) @@ -89,7 +67,29 @@ (global $tempRet8 (mut i32) (i32.const 0)) (global $tempRet9 (mut i32) (i32.const 0)) (global $tempFloat (mut f64) (f64.const 0)) - (elem (i32.const 0) $b0 $___stdio_close $b1 $b1 $___stdout_write $___stdio_seek $___stdio_write $b1 $b1 $b1 $b2 $b2 $b2 $b2 $b2 $_cleanup $b2 $b2) + (export "_i64Subtract" (func $_i64Subtract)) + (export "_free" (func $_free)) + (export "_main" (func $_main)) + (export "_i64Add" (func $_i64Add)) + (export "_memset" (func $_memset)) + (export "_malloc" (func $_malloc)) + (export "_memcpy" (func $_memcpy)) + (export "_bitshift64Lshr" (func $_bitshift64Lshr)) + (export "_fflush" (func $_fflush)) + (export "___errno_location" (func $___errno_location)) + (export "_bitshift64Shl" (func $_bitshift64Shl)) + (export "runPostSets" (func $runPostSets)) + (export "stackAlloc" (func $stackAlloc)) + (export "stackSave" (func $stackSave)) + (export "stackRestore" (func $stackRestore)) + (export "establishStackSpace" (func $establishStackSpace)) + (export "setThrew" (func $setThrew)) + (export "setTempRet0" (func $setTempRet0)) + (export "getTempRet0" (func $getTempRet0)) + (export "dynCall_ii" (func $dynCall_ii)) + (export "dynCall_iiii" (func $dynCall_iiii)) + (export "dynCall_vi" (func $dynCall_vi)) + (export "___udivmoddi4" (func $___udivmoddi4)) (func $stackAlloc (param $size i32) (result i32) (local $ret i32) (set_local $ret |