mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
0bc92a4333
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> |
||
---|---|---|
.. | ||
js | ||
abi.dart | ||
async.dart | ||
await_transformer.dart | ||
class_info.dart | ||
closures.dart | ||
code_generator.dart | ||
compile.dart | ||
compiler_options.dart | ||
constants.dart | ||
dart2wasm.dart | ||
dispatch_table.dart | ||
dynamic_forwarders.dart | ||
ffi_native_transformer.dart | ||
functions.dart | ||
generate_wasm.dart | ||
globals.dart | ||
intrinsics.dart | ||
kernel_nodes.dart | ||
list_factory_specializer.dart | ||
option.dart | ||
param_info.dart | ||
record_class_generator.dart | ||
records.dart | ||
reference_extensions.dart | ||
sync_star.dart | ||
target.dart | ||
transformers.dart | ||
translator.dart | ||
types.dart |