dart-sdk/sdk_nnbd/lib
Mark Zhou db63e89fcf [dartdevc] Appending and checking nullability caches earlier for performance.
Because we cache on instances of type objects, all "type"-ish constructs in DDC must be pre-initialized if we want to avoid any hasOwnProperty checks (which are slow).

1) We now consult legacy/nullable caches earlier when wrapping types, as the downstream logic can be much slower than a lookup.

2) We cache on nullble and legacy wrappers themselves as well as just the underlying object (formerly we cached on just the latter) for faster lookups.

3) We attach local caches upfront, maintaining monomorphicity during hot code paths.

This improves regressions for opt-out worst-case tests from (120 us -> 2100 us) to (120 us -> 500 us) and weak mode tests from (120 us -> 1100 us) to (120 us -> 330 us).

Change-Id: I98a26064404e746162ca3feb22b0993c3b39e63c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138330
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-05 16:30:54 +00:00
..
_http [VM/Libraries] Fix all errors reported by CFE when the option 2020-03-02 23:03:51 +00:00
_internal [dartdevc] Appending and checking nullability caches earlier for performance. 2020-03-05 16:30:54 +00:00
async Revert "[vm/tfa] Convert named and optional parameters to required parameters where possible." 2020-02-25 15:12:01 +00:00
cli [VM/Libraries] Fix all errors reported by CFE when the option 2020-03-02 23:03:51 +00:00
collection [nnbd/corelib] Fix performance regressions due to casts in 'get current' in iterators 2020-03-04 21:07:16 +00:00
convert Fix based64 decoder. 2020-01-31 19:00:32 +00:00
core [nnbd/corelib] Fix performance regression in List.generate 2020-03-05 01:40:43 +00:00
developer [VM/Libraries] Fix all errors reported by CFE when the option 2020-03-02 23:03:51 +00:00
ffi [vm/ffi] Rename members in NativeApi to not contain nativeApi 2020-03-04 15:21:55 +00:00
html Modify fields in some abstract and native classes 2020-02-29 01:29:35 +00:00
indexed_db/dart2js Address analyzer errors in golden files in dart:html 2020-02-29 01:29:35 +00:00
internal [nnbd/corelib] Fix performance regressions due to casts in 'get current' in iterators 2020-03-04 21:07:16 +00:00
io [VM/Libraries] Fix all errors reported by CFE when the option 2020-03-02 23:03:51 +00:00
isolate [isolate/nnbd] fix nnbd errors in dart:isolate 2020-02-11 19:46:34 +00:00
js [nnbd] remove opt-out for dart:_js 2020-01-22 21:39:56 +00:00
js_util Undo breaking change in dart:js_util 2020-02-14 18:36:18 +00:00
math Update math.dart:atan2 in relation to atan comment - Follow-up for sdk_nnbd 2019-12-16 12:49:27 +00:00
mirrors [vm, lib] Teach mirrors about the Never type and member signatures. 2020-02-07 20:57:46 +00:00
svg/dart2js Address analyzer errors in golden files in dart:html 2020-02-29 01:29:35 +00:00
typed_data Update typed-data constructor documentation. 2020-01-24 09:53:26 +00:00
vmservice [vm/vmservice] Validate getIsolate response before attempting to retrieve pauseEvent from it. 2020-02-25 23:19:44 +00:00
wasm [vm, library] Migrate dart:wasm to NNBD 2020-01-14 17:55:55 +00:00
web_audio/dart2js Change all fields to native getters/setters 2020-02-29 01:29:35 +00:00
web_gl/dart2js Address analyzer errors in golden files in dart:html 2020-02-29 01:29:35 +00:00
web_sql/dart2js Change getters/setters to native for nnbd 2020-02-29 01:29:35 +00:00
libraries.json [dart2js] Update libraries.yaml with migrated dart2js. 2020-02-21 18:37:40 +00:00
libraries.yaml [dart2js] Update libraries.yaml with migrated dart2js. 2020-02-21 18:37:40 +00:00
vmservice_libraries.json [ VM / dart:vmservice ] Migrate dart:vmservice to NNBD, cleanup outdated code 2020-01-15 01:00:34 +00:00
vmservice_libraries.yaml [ VM / dart:vmservice ] Migrate dart:vmservice to NNBD, cleanup outdated code 2020-01-15 01:00:34 +00:00