dart-sdk/sdk
Martin Kustermann 32c22da2b6 [dart2wasm] Record type related cleanups
* avoid allocating _RecordType objects for `<obj> is/as <record-type>`
  => Introduce `Record._checkRecordType()`
  => Use `Record._recordRuntimeType` (which is now not masquerading) for
  other purposes (e.g. verification)

* avoid using masqueraded types for `<obj> is/as <record-type>`
  => Introduce `Record._masqueradedRecordRuntimeType`

Although we introduce 2 extra methods on `Record` that are overriden,
it's O(record-shapes-in-program) and therefore not a big overhead.

=> This will enforce the invariant that the actual type check
   implementation (i.e. for `<obj> is/as <type>` or
   for `<type> <: <type>`) *never* calls back into
   masquerading functionality

=> This in return means we can make the masquerading functionality
   using `<obj> is <type>` checks.

Change-Id: I3e3a0411022042a8e735aaeed396cc8f90d8c9c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349800
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-02-02 11:52:23 +00:00
..
bin [dart2wasm] Remove sdk/bin/dart2wasm{,_developer} scripts 2024-01-19 16:05:27 +00:00
lib [dart2wasm] Record type related cleanups 2024-02-02 11:52:23 +00:00
.gitignore [sdk] Generate a version file for the unpatched SDK 2022-05-05 10:36:05 +00:00
api_readme.md [docs/api] Minor adjustments and fixes to api.dart.dev homepage 2024-02-01 21:41:38 +00:00
BUILD.gn [macros] Add dart:_macros 2024-02-02 07:47:59 +00:00
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00