dart-sdk/sdk/lib
Ömer Sinan Ağacan 7cceaebd49 [dart2wasm] Start using WebAssembly.String imports
Refactor `JSStringImpl` to use the js-string-builtins API[1].

When the module `WebAssembly.String` is not available we define a
"polyfill" with the previous imports, so this change is backwards
compatible.

Also updates some of the methods to use avoid multiple `this.length`
calls (which do an FFI call), and use unchecked getters when possible.

A new library `dart:_error_utils` is introduced for faster range and
index checks when the length (or max value) is known to be positive
(e.g. when it's the length of a string).

For now only `JSStringImpl` and `operator []` and `operator []=` of
`JSArrayImpl` are updated to use the new range and index checks. Rest of
the libraries will be updated separately.

[1]: https://github.com/WebAssembly/js-string-builtins

CoreLibraryReviewExempt: dart2wasm specific library change.
Change-Id: I9436def0cfe59c631f6f4e15ea06cc18a47a738e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335043
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-12-08 10:04:41 +00:00
..
_http Fix close drain error callback. 2023-11-20 08:03:39 +00:00
_internal [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
_wasm [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
async [sdk] Fix broken markdown in future.dart dartdoc 2023-12-07 17:34:14 +00:00
cli [vm] Disable dart:cli waitFor by default 2023-09-14 10:08:29 +00:00
collection Unify splay tree iterators and interables constructor argument names. 2023-10-19 14:07:37 +00:00
convert Remove Utf8Decoder._convertIntercepted hook 2023-11-23 12:25:26 +00:00
core [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
developer [vm/compiler] Tag non-ffi force-optimized functions idempotent. 2023-08-18 18:27:58 +00:00
ffi [vm/ffi]: Add Native.addressOf 2023-12-05 13:10:36 +00:00
html [vm] Mark NativeFieldWrapperClasses as base 2023-10-31 10:23:12 +00:00
indexed_db web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
internal Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
io Document FileSystemEntity.delete when the type of object on the file system does not match the FileSystemEntity type. 2023-11-13 20:09:08 +00:00
isolate Refer to unnamed constructors in doc comments with '.new' 2023-10-17 14:42:38 +00:00
js Reland "[pkg:js/dart:js_interop] Move annotations to dart:_js_annotations" 2023-05-02 15:24:18 +00:00
js_interop [dart:js_interop] Move JS types to extension types 2023-12-06 21:59:58 +00:00
js_interop_unsafe [dart2wasm] Fix various null toExternRef calls for JS interop 2023-11-09 21:58:33 +00:00
js_util [js_util] Make callMethod take an Object method. 2023-03-23 00:23:00 +00:00
math Adding class modifiers to dart:math. 2023-03-13 14:01:26 +00:00
mirrors [vm] Add minimal support for mirrors of extension type members 2023-12-07 21:48:50 +00:00
svg web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
typed_data Revert "[typed_data] Deprecate unmodifiable views" 2023-10-27 15:22:54 +00:00
vmservice [vm] Pass offset and script uri for expression compilation 2023-10-12 10:22:38 +00:00
web_audio web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
web_gl web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
web_sql web_audio is not part sky_engine 2023-09-14 10:33:17 +00:00
analysis_options.yaml [vm/ffi] Support varargs 2023-01-20 10:30:41 +00:00
libraries.json [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
libraries.yaml [dart2wasm] Start using WebAssembly.String imports 2023-12-08 10:04:41 +00:00
PRESUBMIT.py
vmservice_libraries.json
vmservice_libraries.yaml