58f9d88fb2
This migrates the `String` implementation from using JS interop to explicit host imports for the standalone target. This moves a few helper methods shared between the JS and standalone targets to `dart:_string_helper`. This also moves the embedder regexp implementation to `dart:_string` to be able to access internals in some string methods (similar to how the JS implementation special-cases `JSSyntaxRegExp`). This removes the final real use of JS-interop in the standalone target. So, we can: - Remove internal JS helper libraries from the target. - Skip JS-interop transformations in the compiler. - Stop emitting a helper module and support script. Because `js_interop` is imported in `dart:_wasm`, we can't remove the library entirely. This replaces it with a stub to avoid compilation errors, a proper removal is tracked in dartbug.com/63166. Change-Id: Ide495c210c3a272438deebf8fe4f3f44ba314ffa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501960 Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
36 lines
1.1 KiB
WebAssembly Text Format
36 lines
1.1 KiB
WebAssembly Text Format
(module $module2
|
|
(type $#Top (struct
|
|
(field $field0 i32)))
|
|
(type $JSExternWrapper (sub $Object (struct
|
|
(field $field0 i32)
|
|
(field $field1 (mut i32))
|
|
(field $_externRef externref))))
|
|
(type $MyConstClass (sub final $Object (struct
|
|
(field $field0 i32)
|
|
(field $field1 (mut i32))
|
|
(field $b (ref $JSExternWrapper)))))
|
|
(type $Object (sub $#Top (struct
|
|
(field $field0 i32)
|
|
(field $field1 (mut i32)))))
|
|
(global $.h0-nonshared-const (import "" "h0-nonshared-const") (ref extern))
|
|
(table $module0.cross-module-funcs-0 (import "module0" "cross-module-funcs-0") 17 funcref)
|
|
(global $MyConstClass (ref $MyConstClass)
|
|
(i32.const 108)
|
|
(i32.const 0)
|
|
(i32.const 60)
|
|
(i32.const 0)
|
|
(global.get $.h0-nonshared-const)
|
|
(struct.new $JSExternWrapper)
|
|
(struct.new $MyConstClass))
|
|
(elem $module0.cross-module-funcs-0
|
|
(set 3 (ref.func $"modH0Use <noInline>")))
|
|
(func $"modH0Use <noInline>" (param $var0 i32) (result (ref $MyConstClass))
|
|
local.get $var0
|
|
if (result (ref $MyConstClass))
|
|
global.get $MyConstClass
|
|
else
|
|
i32.const 16
|
|
call_indirect (result (ref $MyConstClass))
|
|
end
|
|
)
|
|
) |