dart-sdk/utils
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
..
analysis_server [analyzer] Train snapshot more than --help 2022-11-15 10:49:51 +00:00
bazel [utils] - Migrate utils/bazel/kernel_worker.dart to sound null safety. 2022-10-26 22:44:47 +00:00
compiler [build] Omit SDK and Git hashes on RBE. 2023-12-20 12:23:56 +00:00
dart2native [BUILD] - Format gn files, this is being done to ensure the unfork CL 2020-03-10 21:56:11 +00:00
dart2wasm [dart2wasm] Remove usage of type category table 2024-02-02 19:01:49 +00:00
dartanalyzer [sdk] no longer generate <sdk>/lib/_internal/strong.sum 2023-03-20 17:25:43 +00:00
dartdev [vm] Don't create UnboxedConstantInstr(kUnboxedInt64) for RISCV32. 2024-01-09 20:44:38 +00:00
ddc [ddc] Removing some references to "legacy" DDC modules. 2024-01-24 21:22:25 +00:00
dds [Reland] [dartdev] Use an AOT snapshot for dds 2023-09-26 18:27:02 +00:00
dtd [ CLI ] Add tooling-daemon command to support launching the Dart Tooling Daemon (DTD) 2024-01-08 17:07:55 +00:00
gen_kernel [Reland] [dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot 2023-09-26 21:46:58 +00:00
kernel-service [SDK] Ensure compatibility between frontend_server AOT snapshot and dartaotruntime in release builds 2023-08-29 19:44:29 +00:00
aot_snapshot.gni Revert "[dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot" 2023-09-25 10:17:52 +00:00
application_snapshot.gni [build] Collapse now-identical application_snapshot and kernel_application_snapshot. 2023-06-23 21:58:30 +00:00
compile_platform.gni Replace a bunch of references to .packages 2021-10-12 20:16:15 +00:00
create_timestamp.gni Reapply "[build] Track glob dependencies via depfiles, instead of always re-executing scripts at GN time." 2021-05-12 00:27:28 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00