Commit Graph

2004 Commits

Author SHA1 Message Date
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 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
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
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 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
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
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 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
Paul Berry 6c1523410f Flow analysis: Create definite assignment test cases.
The test cases are based on
pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart,
however those tests are removed because they exercise the old definite
assignment logic (which was never hooked up to the rest of the
analyzer, and was abandoned in favor of flow analysis).  This CL also
removes the old definite assignment logic itself.

There are two behavioral regressions compared to the old definite
assignment logic:

- Assignments inside assert bodies are erroneously assumed to always
  execute (they don't, because assertions may be disabled).

- Flow analysis does not yet understand that a function may be known
  to never return (with NNBD, such a function would have a return type
  of Never).

These regressions have been flagged with TODO comments (in the test
files assert.dart and if.dart respectively), and will be addressed in
later CLs.

Change-Id: I4a3923f667b151fe31cdcca69373ee1f8fb85607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110400
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-31 13:55:54 +00:00
Paul Berry 7557a14a74 Move test cases from type_promotion_test.dart into front end.
We still verify that the analyzer passes these tests, but we now do
the verification using the "ID test" mechanism that's shared with the
CFE.  This will allow the front end to run these tests as soon as its
integration with flow analysis is complete.

Change-Id: I1a7e5ef9698ebac72a72d992f4d765723224fc95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110343
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-31 13:55:54 +00:00
Johnni Winther 59aa4cd693 [cfe] Merge more Kernel*Builder classes into *Builder classes
* Remove EnumBuilder and rename KerneEnumBuilder to EnumBuilder
* Merge KernelInvalidTypeBuilder into InvalidTypeBuilder
* Merge KernelTypeAliasBuilder into TypeAliasBuilder
* Merge KernelTypeVariableBuilder into TypeVariableBuilder

Change-Id: Ie5554146fc0c073b48453bae446f36592e46ecab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110903
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-31 11:19:52 +00:00
Dmitry Stefantsov 20e4c74f7f [fasta][nnbd] Print NNBD type modifiers in Kernel's text representation
Change-Id: I48c43858094e2b7264a15be05238bfc3dadd5ecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-31 08:26:14 +00:00
Johnni Winther 3992be71c7 [cfe] Add this parameter to extension methods
Change-Id: I25326e755d63b5707f8f7ce52b3d80c3965372aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110725
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-29 15:58:08 +00:00
Johnni Winther 28a7369146 [cfe] Merge KernelClassBuilder into ClassBuilder
Change-Id: I0af957969863a69cd5c9b7a2da6ffc9550018e48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110723
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-29 15:58:08 +00:00
Johnni Winther 1e43d65d4a [cfe] Merge KernelFunctionBuilder into ProcedureBuilder
+ rename ProcedureBuilder to FunctionBuilder
+ rename KernelProcedureBuilder to ProcedureBuilder
+ rename KernelConstructorBuilder to ConstructorBuilder
+ rename KernelRedirectingFactoryBuilder to RedirectingFactoryBuilder
+ move all classes to procedure_builder.dart

Change-Id: Ia139b36730f8dafa151e19a08637d17363262c77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109962
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-28 18:19:00 +00:00
Johnni Winther 8b6badda35 [cfe] Add static type test
Change-Id: Id7a0fba20fe03fce2809131ae81bde1f2b5c50fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110724
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-28 13:41:09 +00:00
Johnni Winther 78224f9b0c [cfe+analyzer+dart2js] Support union markers in id-testing
Supports markers like `cfe|analyzer.` to annotated that the expected
result is for both `cfe` and `analyzer`.

Change-Id: Ie69809db5f63a9ee9b87ff1513b819fe85ce0bce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110500
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-26 17:18:01 +00:00
Johnni Winther bcfe26cba0 [cfe] Fail early on unsupported evaluated constants
The many different entrypoints to the CFE have repeatedly shown problems
with targets that do not support unevaluated constants being used
without providing an environment.

Making the targets opt-in to supporting unevaluated constants will
give the users of CFE early notice that CFE is used inconsistently
(as opposed to the backends failing when they happen to see an
UnevaluatedConstant node that they don't support).

Change-Id: I98c80df3a551823598e413e2895f5649f22f7c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110561
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-26 16:57:51 +00:00
Johnni Winther 5357056a20 [cfe] Report errors when extension declarations are used as types
Change-Id: Iad0c7df54fac476c2f23af2fe4ba30ee5bf49167
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110222
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-25 17:20:54 +00:00
Paul Berry bf4bde6ea2 Move test cases from flow_analysis_test.dart into front end.
We still verify that the analyzer passes these tests, but we now do
the verification using the "ID test" mechanism that's shared with the
CFE.  This will allow the front end to run these tests as soon as its
integration with flow analysis is complete.

Still to do: migrate tests of type promotion and definite assignment
so that they can be shared by the front end.

Change-Id: I3c2ac6ff8b66e3a27110dcdb1f1d2dece447c18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-07-24 20:20:09 +00:00
Dan Rubel 3c05b8199b move identifier recovery into scanner
Change-Id: I1e4f4fa900b72e4fd405ae8dc86dfa9bc13f370f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110183
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-24 18:38:43 +00:00
Dan Rubel c62bd8f3f4 prepend unterminated comment error token and others
Change-Id: I18fd270e9b74e1fd94403ef90f275001983aa86d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-24 18:38:43 +00:00
Dan Rubel 34ed30f020 prepend unterminated string error code
Change-Id: I95884700f7a43abfb89753b7381167bac19e4c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110144
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-24 18:38:43 +00:00
Dan Rubel 24d1e511df improve missing hex digit recovery
Change-Id: I12d9e3fe314e850a6ee9599187d67dfa5455b18a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-24 18:38:43 +00:00
Johnni Winther 82f657d7cb [cfe] Support error testing in annotated tests
Change-Id: I545ded4d82147f22efc80f4ed8ee833cd75a9be7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109963
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-24 07:10:23 +00:00
Paul Berry 6c43390cd8 Begin running the shared "ID tests" for constants on the analyzer.
This exposed an analyzer bug--see #37608.

Change-Id: I96af785ce81ebb7b142b4f71cb43942b2b15f879
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-07-23 22:08:12 +00:00
Dan Rubel 9c148623c5 prepend missing hex digits error token
This prepends (rather than append) another error token to the token stream
similar to https://dart-review.googlesource.com/c/sdk/+/110100

In addition, this addresses a comment in
https://dart-review.googlesource.com/c/sdk/+/110140

Change-Id: I27c739b0ee3213cdbce92c3ff18c31fde862251c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-07-23 18:08:37 +00:00
Paul Berry baaeafa2bb Flow analysis: move into front_end.
This will allow it to be used by both the front end and the analyzer.

Change-Id: I3af67aaf3ad7ff2cca0cb245518570892ad473e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109986
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-23 12:55:11 +00:00