Commit Graph

6018 Commits

Author SHA1 Message Date
Jens Johansen 3921ae1ee1 [CFE] Enable a number of linters
Change-Id: Ib4c78a6a72ede16c16780496cb779a8afe87ed4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113029
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-15 07:47:04 +00:00
Johnni Winther 024052f367 [cfe+dart2js+analyzer] Remove support for libs in id testing
We now have support for a test as a directory instead.

Change-Id: I3c43e2e57ecda8e3c9d97aa8842be7093c1df5ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113035
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-15 07:31:50 +00:00
Jens Johansen c4727fddf4 [CFE] Apply unawaited_futures lint
Change-Id: I1d783a883c7be84f743724d9eaadc390f84d4b33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113028
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-14 13:42:13 +00:00
Jens Johansen 56c3cfe34c [CFE] Apply prefer_adjacent_string_concatenation lint
Change-Id: I14b3f5060d1eda6a8ea1e0c808593a57f821a725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113026
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-14 13:00:53 +00:00
Jens Johansen 48af666c9f [CFE] apply curly_braces_in_flow_control_structures lint
Change-Id: Id6c7e60b40f7dd0ffd68d007fe86abb785ac0dba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113025
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-14 13:00:44 +00:00
Dmitry Stefantsov 85e26c2ce9 [cfe] Update greatest lower bound ruels for FutureOr
Closes #37439.

Bug: http://dartbug.com/37439
Change-Id: Id4043373e614d8cd4bef6c6d1fc7b7704b3f6ce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112722
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-14 10:16:54 +00:00
Paul Berry bb12829571 Prepare to publish analyzer version 0.37.1.
Change-Id: I92f8177c6ca63d510d985adeb9cc338191ffc06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-13 17:20:44 +00:00
Jens Johansen b9217efc77 [CFE] [Language versioning] Issue error on multiple 'dart=' entries
Issue error when the .packages file specifies more than on 'dart=' entry.
Also add another test of the library and part mismatch being an error.

Change-Id: I0a894e6ef86eb9f976b9fbdce67f0c9adb03be9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112881
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-13 10:07:39 +00:00
Jens Johansen e47f354919 Allow ddc in kernel mode to output used inputs
This change basically consists of these steps:
* Enable the incremental compiler to trace used inputs.
* Translate used libraries into used dill inputs.
* Output the list of used dills.

Bug: #37788
Change-Id: Icbc3942226f50ba733196586fac8715e21d6ed34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112385
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-08-13 08:37:29 +00:00
Jens Johansen aeb864a43f Allow bazels kernel_worker to output used inputs
This change basically consists of these steps:
* Enable the incremental compiler to trace used inputs.
* Translate used libraries into used dill inputs.
* Output the list of used dills.

Bug: #37788
Change-Id: I08cffe299166cf10e990c9e261f190afd25da8b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-08-13 08:28:09 +00:00
Jens Johansen 38336d6b5a [CFE] Split spell dictionary into several different dictionaries
Change-Id: Ie7e274b66d554eb9db8fffdf0e945d78be231ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112392
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-13 07:18:29 +00:00
Johnni Winther 271ad96813 [cfe] Create Extension nodes for extensions
Adds Extension node to kernel/ast, currently with serialization. This
is needed to support resolution of extension methods through dill
boundaries.

Adds (Source)ExtensionBuilder for build Extension nodes and
DeclarationBuilder as common superclass of ClassBuilder and
ExtensionBuilder.

Change-Id: Id945a40452f2729f9a4f390477dd6c76f9030eaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112256
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-09 20:46:01 +00:00
Johnni Winther 19654f30d0 [cfe+vm+ddc] Return ClassHierarchy and CoreTypes together with Component
Users of the CFE often need the ClassHierarchy and may CoreTypes after
invoking the CFE. This CL extends the result of `kernelForProgram` and
`kernelForComponent` to a `CompilerResult` that includes these objects.

Change-Id: I08491198fe876b6514e49993ad794388d6662c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112259
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-08-09 13:02:12 +00:00
Vyacheslav Egorov 573789f7f1 [cfe] Insert default super initializer when outlining const constructor
This ensures that it is invoked when performing constant evaluation
in modular setting.

Fixes https://github.com/dart-lang/sdk/issues/37794

Bug: 37794
Change-Id: I26c891044e030ac7702f02b2d4996984f9e898c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112383
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-09 11:26:59 +00:00
Jens Johansen 78ce916d82 [CFE] Add missing word to spell checking list
TBR.
Caused by other CL with new word landing between spell checking CL
started CQ and it landed.

Change-Id: Ifacab5c5b28d34cd22116a6838f20697101e2d7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112386
Reviewed-by: Jens Johansen <jensj@google.com>
2019-08-09 10:09:57 +00:00
Johnni Winther 3312fe3d26 [cfe] Fully support expired flags in CFE
This ensures that we can prohibit the disabling of an enabled and
expired flag while still support the use of enum value in
implementation code.

Change-Id: Ib92c506365bb61853d6ff791461c5065acabcd4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99173
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-08-09 09:23:01 +00:00
Jens Johansen 5601eabda6 [CFE] Spell check messages and dart code
This CL adds a simple spell-checker, adds a spell-checking-phase to
messages_test to spell-check our messages, adds a new test that
spell-check our dart-code and fixes a lot of spelling mistakes / typos.

Change-Id: I8943a5bd67970e9a8a775251ae0aa97799eab097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112346
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-09 08:47:00 +00:00
Johnni Winther cd3b34f86d [cfe] Don't expect external field to have no initializer
Change-Id: I146eff333466683b4375212397f6b54c8ff72aa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109262
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-08 17:33:45 +00:00
Johnni Winther 9a71c998f9 [cfe] Rename Declaration and DeclarationBuilder
Rename Declaration to Builder and DeclarationBuilder to TypeParameterScopeBuilder.
This prepares for the introduciton of a DeclarationBuilder superclass of
ClassBuilder, MixinDeclarationBuilder and ExtensionDeclarationBuilder.

Change-Id: I2d392372f458f39ebaea87ec10f365b822ee3841
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112088
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-08 14:01:16 +00:00
Johnni Winther e9a9d9452e [cfe] Build extension methods as toplevel members
+ add an 'isExtensionMethod' property to Procedure.

Change-Id: I8fb1af1802570c827bf3ccbbb9d710eb2a6981ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112081
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-08 12:51:40 +00:00
Jens Johansen aac8204ad3 [CFE] Error when library and part(s) doesn't agree on language version
From the feature spec: "Part files must be marked with the same version
as their library. They must always be treated the same way as the
library they belong to, so it is a compile-time error if a part file has
a different language level override than its library. It is also a
compile-time error if a part file has no language version marker,
and the importing library does".

Change-Id: I29805e261e63b89a7d8832770ed2b007fb6df37f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112247
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-08 08:07:53 +00:00
Jens Johansen b9c0f5c09f [CFE] Issue error when .packages specifies wrong language version
From the feature specification: "If an entry contains an invalid dart
version value, #dart=arglebargle or #dart= or any other value which is
not a semantic versioning version, then tools which need the version
should report an error."

Change-Id: Ieb54dbbad6f2fecb341e27b468e3ffdf90717a7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112245
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-08 07:05:00 +00:00
Jens Johansen 21b026dd88 [CFE] Issue error when langauge version is specified too high
Specifying a language version higher than the highest supported version
(aka the default version) is an error.

Specifying a language verison in code that is higher than the one
specified in .packages is an error.

Change-Id: I44e1c8c45cef715038786dbf248925b73bd6cd7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112240
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-08 06:55:38 +00:00
Paul Berry bff5732c10 Flow analysis: unify API for handling == null and != null.
This reduces code duplication in the client.

Change-Id: I278fb4d3c7fc7b913498d4a69f4f361f6227da32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112146
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-07 19:21:24 +00:00
Johnni Winther a7af48fdea [cfe] Don't use package:expect in relativize_test
Closes #37777

Change-Id: I749c8e9ff69a65933a3804dd45f0d72ecd80f2fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112253
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-07 18:57:30 +00:00
Johnni Winther 08205fd62f [cfe] Add implicit as and type arguments to static_type_test
+ add test for issue 37439 showing

Change-Id: I3b42a5a05df5a89f5bd8255a3f305a2c2caa0176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112087
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-07 15:40:00 +00:00
Paul Berry 7912216cd6 Flow analysis: store all variables in promoted map.
Previously we only stored promoted variables.  Storing all variables
paves the way for expanding the `promoted` map into a map from
variable to VariableModel, which will be necessary to bring the
implementation in line with
https://github.com/dart-lang/language/pull/473.

Change-Id: Ief7190b565da03e3c8dc22f8401f96f3e8a1d356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112040
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-07 14:16:11 +00:00
Paul Berry 7893fdbf2f Flow analysis: Rename State to FlowModel.
This makes the terminology consistent with
https://github.com/dart-lang/language/pull/473.

No change other than renaming the class, sorting the file, and
reformatting some comments.

Change-Id: I81ab759decd0495f18d2afbe9a4c9d734f393b04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112037
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-07 14:16:11 +00:00
Paul Berry 4d6adbf15c Flow analysis: Move join into State and document it.
Change-Id: I8cec06c0d19107b4973e192534d63f05a5b3d902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112036
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-07 14:16:11 +00:00
Aske Simon Christensen 5121a2e831 [cfe] Read product mode directly from environment in async transform.
When we perform constant evaluation in the CFE, the async transform
runs after constant evaluation. Thus, it can no longer use const
bool.fromEnvironment("dart.vm.product") to query whether the VM is
in product mode.

Instead, it can read the product mode define directly from the
environment defines given to the CFE and generate different code
depending on the value.

Change-Id: I2aabc4a84b50a940d35d5664ff4ebdf0680ed5c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111645
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-07 08:28:25 +00:00
Jens Johansen ef9b09abe3 [CFE] Language versioning positive tests
Add a bunch of positive tests to the langauge versioning.

Change-Id: Ic3f85c49a82e47f2c192fb7ac38fda1210b5d32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112090
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-07 06:23:47 +00:00
Jens Johansen 574c4a51c6 [CFE] Initial support for parsing language version from .packages
If the .packages file specifies a fragment on a uri on the form
"dart=x.y", x.y becomes the default lanaguage version for libraries in
that package.

Change-Id: I69cb4157fdf5852184cc3519b033c3624792f783
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112082
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-06 12:42:47 +00:00
Jens Johansen 69ae29076a Default language version if nothing is specified
A kernel library will say it has the newest language version if no
language version is set.
This basically preserves the current semantics of always being on the
newest version (if nothing is explicitly done), e.g. if creating a kernel
library by hand and not setting it.
The front_end also utilize this and just doesn't set it, if it isn't set.

Change-Id: I033fef13626ee034030ba8fc9d141b182ba1a5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111739
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-06 09:13:29 +00:00
danrubel 627e4c8cad Parse additional NNBD not-null assertions
Fix https://github.com/dart-lang/sdk/issues/37708

Change-Id: I2fc696663d2dd03c5af44fe204fe6058674b5134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111987
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-06 01:17:47 +00:00
Paul Berry 9f9abe5fcd Flow analysis: get rid of "identity" state.
Previously, flow analysis was using the `_identity` state for two
purposes:

1. As the "if true" state for "false" and the "if false" state for
   "true".

2. As the base state for the "break" and "continue" code paths of
   loops, before any "break" or "continue" statements had been seen.

For the first purpose, it is more consistent to use
`_current.setReachable(false)`.  This ensures that in code disabled by
`if (false)`, promotions are not lost.  For the second purpose, it is
easier to just use `null` as the base state.

There is a small behavioral change: previously in unreachable code, if
we used the `_identity` state, all variables were considered assigned;
otherwise they were considered assigned or not according to the state
of the code prior to the branch point that caused the variables to
become unassigned.  Now, unreachable code consistently has the latter
behavior.

Change-Id: If77a3fcff9391b66164c0445d5242cb04c9a6b76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112023
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-05 23:23:47 +00:00
Paul Berry 2cac8637d6 Flow analysis: separate nullability and reachability tests.
Change-Id: I875493ff504f094ade2818f29539525fdd75a808
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-05 22:12:26 +00:00
Johnni Winther 5c7fe46e3e [cfe] Merge more Kernel*Builders into *Builders
Change-Id: I335216e2702fe881287e296e0dd1d457e6c7cea7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111541
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-05 19:31:28 +00:00
Johnni Winther 262aaf13a0 [cfe] Merge KernelLibraryBuilder into SourceLibraryBuilder
Change-Id: I8c654aa8065b5e2b43c864a43924925cbfd972b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111540
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-05 19:31:28 +00:00
Johnni Winther 067c6ea5b6 [cfe] Add extension type variables to procedures
Adds synthesized type variable builders and formal parameter builders to
the procedure builder. This ensure that both the outline and body
building correctly resolve extension type variables and extension this types.

Change-Id: I55d5665286dafedb4e47316faafb32ddb6cc33d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111730
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-05 17:15:37 +00:00
Johnni Winther 6eb9f54683 [cfe] Add ClassKind to Listener.begin/endClassOrMixinBody
This allows for special-casing extension declarations bodies. This
is needed because the on-clause hold the type of the parameter holding
the `this` value inside an instance method in an extension declaration.

Change-Id: I7af9bf0a9842f7e6f42dddb54fb487c69a8fa519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111729
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-08-05 17:15:37 +00:00
Johnni Winther bd8f7aeebb [cfe] Add DeclarationKind to DeclarationBuilder
The prepares for special-casing methods in extension declarations
during building of the outline. This is needed to add synthesized
type parameters and parameters to the method signature.

Change-Id: Id41d85d86a9ad4eedc4a4ce346ad14e18277dda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111728
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-05 17:15:37 +00:00
Jens Johansen 6d1c9975d7 [CFE] Initial language versioning "support"
This CL sets up the bare minimum support for saving the language version
specified in a file on the kernel library, and adds simple support for
testing it.

The data is not serialized out, error checked or similar in this change.

Change-Id: I4b061ce617acae7964b85be105e0ad0e3e031aa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111640
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-05 07:03:04 +00:00
Johnni Winther 972d4e9a75 [cfe] Move relativize code from dart2js to cfe
Change-Id: I2e07dcf91adf65965583189972b0c27cc0aee526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111427
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 21:07:50 +00:00
Johnni Winther 7825801189 [cfe] Refactor [ValueKind] to support unions of types.
Change-Id: Ief59777ab304a166bb6b27e29ff126a5f55df5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110910
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-01 13:07:19 +00:00
Johnni Winther 68e4eeee12 [cfe] Handle property access, update and method invocation on explicit/implicit this in extension methods
Handles property access, update and method invocation on explicit and
implicit this in extension methods. Also use ReadOnlyAccessGenerator
instead of ThisAccessGenerator to handle explicit this.

Change-Id: Ifd6861b1f931f854a39ddfb9ddae35ebf6094327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110904
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 12:04:59 +00:00
Jens Johansen a69c81ac34 Id testing for directories with .packages etc
We should also be able to test for larger examples, so this CL adds
support for directories where all files are included. If the directory
contains a .packages file that is used so we can test packages too.

Change-Id: Iceda03505575bd9e5604a6e374b7f5fa7185a82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111421
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-01 09:25:28 +00:00
Jens Johansen d49de8b68f succinct option for id testing
Add a "-s" (succinct) option to have a more dense output.
Meant for use together with "-a" so one can get a quick overview of how
many tests fail, e.g.
out/ReleaseX64/dart pkg/front_end/test/id_testing/id_testing_test.dart -a -s

Change-Id: I9e1d91694be76e6c66bf0f3c9168783f920a5bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110914
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-01 09:25:28 +00:00
Aske Simon Christensen 60f646a51c [CFE] Do not accept null expressions in constant evaluator.
The constant evaluation method would produce a NullConstant whenever it
was given a null expresssion to evaluate. Since most expressions can't
be null, this could hide some internal inconsistencies and silently
emit incorrect output.

This change tightens the null checks to only check expressions which
can be null (default arguments and initializing expressions for
non-const variables).

Change-Id: Idcfc5df18ce2f8e0b2c51d64288b00fd3315d52b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-08-01 08:39:48 +00:00
danrubel 86acffa440 fix prefixed type recovery crash
This fixes a crash when parsing an invalid prefixed type preceding a list literal.

Fix https://github.com/dart-lang/sdk/issues/37674

Change-Id: I43e84248c8addf6ed744fa0a836595a53a332d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-01 02:52:11 +00:00
danrubel 3b1cb90146 allow void in extension declaration header
Fix https://github.com/dart-lang/co19/issues/449

Change-Id: I301c2472df3206c64462fc42936c736562c6d95a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-07-31 15:01:54 +00:00