dart-sdk/sdk/lib
Martin Kustermann 0bc92a4333 [dart2wasm] Remove usage of type category table
The type category table is a O(number-of-classes) sized byte array that
maps from class-id to either a type category (function, record, ...) or
a masqueraded class-id.

* for flute this table takes up around 1 KB.
* this prevents from making concrete class-ids come before all abstract
  class ids

After recent changes the core RTT implementation no longer involves
masqueraded types (i.e. `<obj> is/as <type>` and `<type> <: <type>`
queries don't trigger masquerading functionality)

This CL removes the type category table, the special casing in the
class-id assignment and the compiler support for building the table.

Instead we move the logic to pure dart code, which can use normal `is`
checks to perform its function.

We add one optimization: The compiler will provide the class-id from
which one only non-masqueraded classes come. This makes the masquerading
function have a fast path.

* We use `Wasm{TypedData,String}Base` marker interfaces i
 `dart:_internal` to check for wasm-backed implementations
* We use `-Ddart.wasm.js_compatibility` to provide JSCM mode

We add a test that actually exercises the 2 modes.

Change-Id: I051c35b17878950402a1336df871a686b649f732
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349641
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-02 19:01:49 +00:00
..
_http [io] Use _addConnection instead _add in _HttpParser 2023-12-12 18:25:19 +00:00
_internal [dart2wasm] Remove usage of type category table 2024-02-02 19:01:49 +00:00
_macros [macros] Add dart:_macros 2024-02-02 07:47:59 +00:00
_wasm Move Wasm{Object,Int,Float}Array -> WasmArray, use extensions on WasmArray for static dispatc0h 2023-12-12 17:05:49 +00:00
async Mention future callback ordering is undefined 2024-01-26 19:32:14 +00:00
cli [vm] Disable dart:cli waitFor by default 2023-09-14 10:08:29 +00:00
collection [collection] Update example code in dartdoc 2023-12-28 23:37:27 +00:00
convert Remove Utf8Decoder._convertIntercepted hook 2023-11-23 12:25:26 +00:00
core Add extra documentation to Enum to point to EnumName. 2024-01-23 09:34:32 +00:00
developer [sdk] Mark dart:developer APIs with since information 2024-01-22 14:58:12 +00:00
ffi [vm/ffi] Update inner pointer accesses in IL 2024-02-01 18:28:53 +00:00
html [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
indexed_db [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
internal Hide the existence of EfficientLengthIterable better. 2023-09-12 11:08:42 +00:00
io [doc,io]: Document how errors with File.openRead are exposed 2024-01-17 18:43:50 +00:00
isolate Refer to unnamed constructors in doc comments with '.new' 2023-10-17 14:42:38 +00:00
js [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
js_interop [web docs] add package:web to the main sdk docs - api.dart.dev 2024-01-26 15:54:59 +00:00
js_interop_unsafe [dart:js_interop_unsafe] Add has helper 2024-01-03 01:00:19 +00:00
js_util [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
math
mirrors [vm] Add minimal support for mirrors of extension type members 2023-12-07 21:48:50 +00:00
svg [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +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 [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
web_gl [docs] update the messaging for dart:html and related libraries 2024-01-22 21:28:02 +00:00
web_sql [docs] update dart:html template files 2024-01-12 18:17:13 +00:00
analysis_options.yaml
libraries.json [macros] Add dart:_macros 2024-02-02 07:47:59 +00:00
libraries.yaml [macros] Add dart:_macros 2024-02-02 07:47:59 +00:00
PRESUBMIT.py [build] Python 3.12 compatibility. 2023-12-12 18:19:35 +00:00
vmservice_libraries.json
vmservice_libraries.yaml