5cd42e6b21
Binaryen introduced `binaryen.inline` which allows us to tell it inlining hints now, including "never inline" hint (see [0]) This allows us to remove the ugly mangling of wasm function names with `<noInline>` postfix. We also now pass `--strip-toolchain-annotations`: The annotations occupy size in the wasm binary and wasm runtimes ignore them (they are for `wams-opt` only). Except for IR tests: Here we want to see the annotations, so we keep them there. We also rename the package:wasm_builder classes to clearly indicate those are binaryen specific sections. We also make the ir_test.dart put it's options first, allowing the IR tests to override options if needed. [0] https://github.com/WebAssembly/binaryen/commit/3c25487214600a9 Change-Id: I96688bfaeba403a39cd5e7376f8d2889bcbae030 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510000 Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Srujan Gaddam <srujzs@google.com>
87 lines
4.6 KiB
WebAssembly Text Format
87 lines
4.6 KiB
WebAssembly Text Format
(module $module0
|
|
(type $#Top <...>)
|
|
(type $Array<Object?> <...>)
|
|
(type $BoxedInt <...>)
|
|
(type $JSExternWrapper <...>)
|
|
(type $JavaScriptStack <...>)
|
|
(type $Object <...>)
|
|
(type $WasmListBase <...>)
|
|
(type $_Future <...>)
|
|
(type $_Type <...>)
|
|
(rec
|
|
(type $type0 <...>)
|
|
(type $_AsyncSuspendState <...>)
|
|
)
|
|
(func $"wasm:js-string.charCodeAt (import)" (import "wasm:js-string" "charCodeAt") (param externref i32) (result i32))
|
|
(@binaryen.removable.if.unused)
|
|
(func $"wasm:js-string.equals (import)" (import "wasm:js-string" "equals") (param externref externref) (result i32))
|
|
(@binaryen.removable.if.unused)
|
|
(func $"wasm:js-string.length (import)" (import "wasm:js-string" "length") (param externref) (result i32))
|
|
(table $cross-module-funcs-0 (export "cross-module-funcs-0") 45 funcref)
|
|
(global $"\")\"" (ref $JSExternWrapper) <...>)
|
|
(global $"\"foo0Code(\"" (ref $JSExternWrapper) <...>)
|
|
(global $0 (ref $BoxedInt) <...>)
|
|
(global $FooConst0 (ref $Object)
|
|
(i32.const 109)
|
|
(i32.const 0)
|
|
(struct.new $Object))
|
|
(global $fooGlobal0 (mut (ref null $#Top))
|
|
(ref.null none))
|
|
(elem $cross-module-funcs-0
|
|
(set 1 (ref.func $_Future))
|
|
(set 2 (ref.func $_AsyncSuspendState))
|
|
(set 4 (ref.func $loadLibraryFromLoadId))
|
|
(set 5 (ref.func $_awaitHelper))
|
|
(set 6 (ref.func $checkLibraryIsLoadedFromLoadId))
|
|
(set 8 (ref.func $_AsyncSuspendState._complete))
|
|
(set 9 (ref.func $_AsyncSuspendState._completeError))
|
|
(set 10 (ref.func $boxJsException))
|
|
(set 11 (ref.func $jsExceptionStackTrace))
|
|
(set 18 (ref.func $print))
|
|
(set 19 (ref.func $JSStringImpl._interpolate3))
|
|
(set 20 (ref.func $foo0Code))
|
|
(set 21 (ref.func $_throwIndexError))
|
|
(set 22 (ref.func $GrowableList._withData))
|
|
(set 25 (ref.func $"wasm:js-string.length (import)"))
|
|
(set 26 (ref.func $"wasm:js-string.charCodeAt (import)"))
|
|
(set 27 (ref.func $IntegerDivisionByZeroException))
|
|
(set 28 (ref.func $Error._throwWithCurrentStackTrace))
|
|
(set 29 (ref.func $"wasm:js-string.equals (import)"))
|
|
(set 30 (ref.func $JSStringImpl.substring))
|
|
(set 31 (ref.func $JSStringImpl.+))
|
|
(set 32 (ref.func $JSStringImpl._interpolate))
|
|
(set 33 (ref.func $JSStringImpl.fromRefUnchecked))
|
|
(set 34 (ref.func $JSStringImpl._interpolate2)))
|
|
(func $Error._throwWithCurrentStackTrace (param $var0 (ref $#Top)) <...>)
|
|
(func $GrowableList._withData (param $var0 (ref $_Type)) (param $var1 (ref $Array<Object?>)) (result (ref $WasmListBase)) <...>)
|
|
(func $IntegerDivisionByZeroException (result (ref $Object)) <...>)
|
|
(func $JSStringImpl.+ (param $var0 (ref $JSExternWrapper)) (param $var1 (ref $JSExternWrapper)) (result (ref $JSExternWrapper)) <...>)
|
|
(func $JSStringImpl._interpolate (param $var0 (ref $Array<Object?>)) (result (ref $JSExternWrapper)) <...>)
|
|
(func $JSStringImpl._interpolate2 (param $var0 (ref null $#Top)) (param $var1 (ref null $#Top)) (result (ref $JSExternWrapper)) <...>)
|
|
(func $JSStringImpl._interpolate3 (param $var0 (ref null $#Top)) (param $var1 (ref null $#Top)) (param $var2 (ref null $#Top)) (result (ref $JSExternWrapper)) <...>)
|
|
(func $JSStringImpl.fromRefUnchecked (param $var0 externref) (result (ref $JSExternWrapper)) <...>)
|
|
(func $JSStringImpl.substring (param $var0 (ref $JSExternWrapper)) (param $var1 i64) (param $var2 i64) (result (ref $JSExternWrapper)) <...>)
|
|
(func $_AsyncSuspendState (param $var0 (ref $type0)) (param $var1 structref) (param $var2 (ref $_Future)) (result (ref $_AsyncSuspendState)) <...>)
|
|
(func $_AsyncSuspendState._complete (param $var0 (ref $_AsyncSuspendState)) (param $var1 (ref null $#Top)) <...>)
|
|
(func $_AsyncSuspendState._completeError (param $var0 (ref $_AsyncSuspendState)) (param $var1 (ref $#Top)) (param $var2 (ref $Object)) <...>)
|
|
(func $_Future (param $var0 (ref $_Type)) (result (ref $_Future)) <...>)
|
|
(func $_awaitHelper (param $var0 (ref $_AsyncSuspendState)) (param $var1 (ref $_Future)) <...>)
|
|
(func $_throwIndexError (param $var0 i64) (param $var1 i64) (param $var2 (ref null $JSExternWrapper)) <...>)
|
|
(func $boxJsException (param $var0 externref) (result (ref $#Top)) <...>)
|
|
(func $checkLibraryIsLoadedFromLoadId (param $var0 i64) (result i32) <...>)
|
|
(@binaryen.inline 0)
|
|
(func $foo0Code (param $var0 (ref null $#Top))
|
|
global.get $FooConst0
|
|
call $print
|
|
global.get $"\"foo0Code(\""
|
|
local.get $var0
|
|
global.get $"\")\""
|
|
call $JSStringImpl._interpolate3
|
|
call $print
|
|
global.get $0
|
|
global.set $fooGlobal0
|
|
)
|
|
(func $jsExceptionStackTrace (param $var0 externref) (result (ref $JavaScriptStack)) <...>)
|
|
(func $loadLibraryFromLoadId (param $var0 i64) (result (ref $_Future)) <...>)
|
|
(func $print (param $var0 (ref null $#Top)) <...>)
|
|
) |