dart-sdk/runtime/observatory
Tess Strickland 781094f2ce [vm/bytecode] Add parameter flags to FunctionDeclaration.
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>
2020-09-14 15:28:20 +00:00
..
bin Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)." 2020-06-23 08:06:00 +00:00
lib Revert "[vm, service] Gather used and capacity from various mallocs." 2020-08-26 21:32:36 +00:00
tests [vm/bytecode] Add parameter flags to FunctionDeclaration. 2020-09-14 15:28:20 +00:00
tool Use dartfmt on Observatory code 2016-09-16 06:59:51 -07:00
web [observatory] Run dartfmt. 2020-07-27 22:42:16 +00:00
.gitignore Commit observatory's pubspec.lock to the repo 2016-09-27 14:04:47 +02:00
analysis_options.yaml Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)." 2020-06-23 08:06:00 +00:00
BUILD.gn Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)." 2020-06-23 08:06:00 +00:00
HACKING.md [ VM / Service / Observatory ] The VM service now requires an authentication code by default. 2019-04-09 22:57:29 +00:00
observatory_sources.gni [ Observatory ] Remove unused analytics codes 2020-08-04 02:38:43 +00:00
pubspec.yaml [ Service ] Add 'is_system_isolate' option to Dart_IsolateFlags 2020-08-21 21:44:50 +00:00
update_sources.py Mass format python with yapf 2019-08-05 20:34:31 +00:00