mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 09:22:12 +00:00
781094f2ce
We create the parameter names array when loading the FunctionDeclaration, but the required parameter flags are only set later when we load the Code declaration. If there's an intermediate use of the Function object that copies the required parameter flags, like creating an ImplicitClosureFunction when loading a tearoff stored in the object pool, there will be no set flags at that point. Add a copy of the parameter flags to the FunctionDeclaration so the required flags can be set at the same time as the parameter name and type to avoid this scenario. To avoid adding unneeded flags to the kernel bytecode, we only serialize the parameter flags needed for each declaration, so FunctionDeclaration and ClosureDeclaration only contain the required flag, and Code contains all flags _but_ the required flag. There are no trybots for strong mode + bytecode, but manually checked by running the following on the main branch (cherry-picking the test_matrix.json changes) and this branch: python tools/test.py \ -n dartkb-mixed-strong-linux-release-x64,dartkb-interpret-strong-linux-release-x64 \ tests/language/nnbd/required_named_parameters/missing_required_argument_dynamic_test.dart Cq-Include-Trybots: luci.dart.try:vm-dartkb-linux-release-simarm64-try,vm-dartkb-linux-release-x64-try Change-Id: Ic75b831d5ceed08154e2c61b8f64461705558653 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162501 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
tests | ||
tool | ||
web | ||
.gitignore | ||
analysis_options.yaml | ||
BUILD.gn | ||
HACKING.md | ||
observatory_sources.gni | ||
pubspec.yaml | ||
update_sources.py |