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
bazel
compiler [build] Omit SDK and Git hashes on RBE. 2023-12-20 12:23:56 +00:00
dart2native
dart2wasm [dart2wasm] Remove usage of type category table 2024-02-02 19:01:49 +00:00
dartanalyzer
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
create_timestamp.gni
OWNERS