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>
39 lines
1.3 KiB
WebAssembly Text Format
39 lines
1.3 KiB
WebAssembly Text Format
(module $module9
|
|
(type $#Top <...>)
|
|
(type $BoxedInt <...>)
|
|
(type $JSExternWrapper <...>)
|
|
(type $Object <...>)
|
|
(global $"\")\"" (import "module0" "global3") (ref $JSExternWrapper))
|
|
(table $module0.cross-module-funcs-0 (import "module0" "cross-module-funcs-0") 45 funcref)
|
|
(global $"\"foo4Code(\"" (ref $JSExternWrapper) <...>)
|
|
(global $4 (ref $BoxedInt) <...>)
|
|
(global $FooConst4 (ref $Object)
|
|
(i32.const 113)
|
|
(i32.const 0)
|
|
(struct.new $Object))
|
|
(global $fooGlobal4 (mut (ref null $#Top))
|
|
(ref.null none))
|
|
(elem $module0.cross-module-funcs-0
|
|
(set 16 (ref.func $foo4Code))
|
|
(set 23 (ref.func $0))
|
|
(set 24 (ref.func $1))
|
|
(set 44 (ref.func $2)))
|
|
(func $null (result (ref null $#Top)) <...>)
|
|
(func $null (param $var0 (ref null $#Top)) <...>)
|
|
(func $null (result (ref $Object)) <...>)
|
|
(@binaryen.inline 0)
|
|
(func $foo4Code (param $var0 (ref null $#Top))
|
|
global.get $FooConst4
|
|
i32.const 18
|
|
call_indirect (param (ref null $#Top))
|
|
global.get $"\"foo4Code(\""
|
|
local.get $var0
|
|
global.get $"\")\""
|
|
i32.const 19
|
|
call_indirect (param (ref null $#Top) (ref null $#Top) (ref null $#Top)) (result (ref $JSExternWrapper))
|
|
i32.const 18
|
|
call_indirect (param (ref null $#Top))
|
|
global.get $4
|
|
global.set $fooGlobal4
|
|
)
|
|
) |