mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 18:16:04 +00:00
7cceaebd49
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> |
||
---|---|---|
.. | ||
_http | ||
_internal | ||
_wasm | ||
async | ||
cli | ||
collection | ||
convert | ||
core | ||
developer | ||
ffi | ||
html | ||
indexed_db | ||
internal | ||
io | ||
isolate | ||
js | ||
js_interop | ||
js_interop_unsafe | ||
js_util | ||
math | ||
mirrors | ||
svg | ||
typed_data | ||
vmservice | ||
web_audio | ||
web_gl | ||
web_sql | ||
analysis_options.yaml | ||
libraries.json | ||
libraries.yaml | ||
PRESUBMIT.py | ||
vmservice_libraries.json | ||
vmservice_libraries.yaml |