dart-sdk/tests
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
..
co19 [co19] Roll co19 to b5126f0bd51ea0819df8d5c362574f951a564940 2024-01-12 11:23:39 +00:00
corelib Update tests to pass in web/production mode. 2024-01-08 17:21:29 +00:00
dartdevc [test] Remove use of unwrapType() from test 2024-01-26 23:56:11 +00:00
ffi [vm/ffi] Update inner pointer accesses in IL 2024-02-01 18:28:53 +00:00
language [macros] output better error messages for unrecognized types in the JSON macro language test 2024-02-02 15:53:18 +00:00
lib [dart:js_interop] Add isA helper 2024-01-25 18:52:45 +00:00
modular [tests] Add repro for cross module constant 2023-11-13 22:21:40 +00:00
standalone [gardening] Mark non_utf8_output_test accordingly in status file. 2024-02-01 19:44:50 +00:00
web [dart2wasm] Remove usage of type category table 2024-02-02 19:01:49 +00:00
legacy_status_dart2js.csv Spelling tests 2022-12-19 12:56:47 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00
README.md

This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.