Commit Graph

264 Commits

Author SHA1 Message Date
Mike Fairhurst 5f03a9a07e Fix lints in summary generator: setter types, star-slash docs
Change-Id: I808be84579c775c58b9a4b6d8f4ea10fc6fb29dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98458
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-02 23:48:31 +00:00
Mike Fairhurst 1bbd282d65 Make analyzer/tool/summary/generate.dart take an IDL path
Change-Id: I919b6d92342076ed4420dcc4a5ee94853a35ed41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96240
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-27 16:08:47 +00:00
Brian Wilkerson 5f0de26d48 Clean up the remaining copyright notices
Change-Id: If099be4f71ba551df0dc3d69815ae6a9f55d1eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-24 20:11:28 +00:00
Paul Berry 31c47567dc Remove AnalysisOptionsForLink and plumb analysis options through linker.
This is a non-breaking change; the only way linking is exposed to
clients is through `SummaryBuilder`, which can get the analysis
options from the context.

Fixes #35747.

Change-Id: I273408f33a881ac32ab248cbc8f3e0644630563b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96829
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-13 22:39:53 +00:00
Konstantin Shcheglov 298866ed94 Write / read resolved AST to / from flat buffers.
AstBinaryWriter does not yet support all node types, but a lot of them,
and can successfully write many large Dart files, including itself.
Whether it does it correctly, we cannot say yet, because AstBinaryReader
supports much smaller set of node types. I plan to add all nodes in
following CLs, and run over larger bodies of code.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iaa2a5c743bd1659ea30c93632028d3a475736bf5
Reviewed-on: https://dart-review.googlesource.com/c/94684
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-01 19:48:02 +00:00
Konstantin Shcheglov 67366ed771 Support for @Variant and @VariantId in generator.
It also includes a sample how it looks in IDL and generated.
I will remove it before landing.

R=paulberry@google.com

Change-Id: I4c60b33e623cf9c55d46a8dd9624377e5a0f5053
Reviewed-on: https://dart-review.googlesource.com/c/94921
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-03-01 02:43:30 +00:00
Dan Rubel 8f12d634fe add postfix "!" non-null assert operator
This updates the parser to support a new "!" postfix assert non-null
operator for NNBD experimentation in analyzer. All other CFE listeners
report an error as they always have... albet a slightly different error.

This also updates reportErrorIfNullableType to report experiment-not-enabled

Change-Id: I7751443fd5a7a2756e823f38c78120e9c2e3e075
Reviewed-on: https://dart-review.googlesource.com/c/94580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-27 19:20:22 +00:00
Konstantin Shcheglov c49537e743 Support for 'double' fields in summaries.
We already can store List<double>, but not `double` itself.

The LinkedConstantValue data structure I'm working on will have a
field of type `double`, so I need to support in in the generator.

R=paulberry@google.com

Change-Id: Ic5aa3a9a7266afabe6c64214fd68097fbebda4e8
Reviewed-on: https://dart-review.googlesource.com/c/93820
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 17:06:49 +00:00
Dan Rubel 94d8e730fb Remove parser enableSetLiterals flag
Change-Id: I5e806f2e4a1dd368417802f7b4ff18bc1b4d0250
Reviewed-on: https://dart-review.googlesource.com/c/92843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-13 22:57:12 +00:00
Kevin Moore ca4978e363 Add pkg:analysis_tool as an SDK-only set of utils
Reduces the API surface of pkg:analyzer that requires pkg:html

Related to https://github.com/dart-lang/sdk/issues/35802

Change-Id: Icd08d76190d6ab77cd180561cdde6df254b22557
Reviewed-on: https://dart-review.googlesource.com/c/91701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2019-01-31 16:52:05 +00:00
Aske Simon Christensen 7475080928 Enable set literals by default in the parser
Change-Id: I854a7d35b05f95d05f0b13f67677d2e512db4eeb
Reviewed-on: https://dart-review.googlesource.com/c/87844
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-01-03 13:45:36 +00:00
danrubel 2a85a3433e Update handleType event to take questionMark token
... which in this CL will always null.
This is the first step when adding NNDB support as outlined in
https://github.com/dart-lang/language/issues/110

Change-Id: If3810bcaf1b73e70924f09d619e2a84e7d5ba8d6
Reviewed-on: https://dart-review.googlesource.com/c/86860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-12-11 16:21:05 +00:00
Brian Wilkerson 469e1e2e64 Remove unnecessary library directives
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 00:44:04 +00:00
Dan Rubel e4c3fa0a9c Improve recovery when parsing named constructor invocation with invalid type arguments
The parser now generates a ConstructorWithTypeArguments error and a new
handleInvalidTypeArguments event after a begin/endTypeArguments event pair
when those type arguments are in a syntatically invalid location.

For example: `new C.n<int>();` in
```
class C<T> { T f; C.n() {} }
main() { var x = new C.n<int>(); }

Most listeners handle this event by dropping the invalid type arguments,
but AstBuilder now preserves those invalid type arguments in the AST
to support better code quick-fixes/quick-assists/refactoring.

Change-Id: I5b22bd4903cd9ee3645936b9a108598b603cf9ca
Reviewed-on: https://dart-review.googlesource.com/c/79300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-11 19:57:22 +00:00
Paul Berry 5ea1d2fb20 Convert idl.dart to triple-slash comment style.
Change-Id: If16a8ea5da0f2cd805d3360e1d70cd19be8066a8
Reviewed-on: https://dart-review.googlesource.com/c/78621
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-08 19:04:02 +00:00
Peter von der Ahé eb0ec965e3 Move codegen/tools.dart to package:analyzer
Change-Id: Iab61e0dfcdd0969d1bf35e27c13c336a944d14e6
Reviewed-on: https://dart-review.googlesource.com/c/77780
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-03 07:41:43 +00:00
Peter von der Ahé 06792cb91f Remove StackListener.popList
Change-Id: I0391b52a0be34c2cf61ac66e06c565e1f311182a
Reviewed-on: https://dart-review.googlesource.com/75680
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-20 14:15:16 +00:00
Devon Carew 7df4900a94 Train the dartanalyzer tool on generating summaries.
Change-Id: Ic887eb2135161b5795a2456d38677f016bbe3643
Reviewed-on: https://dart-review.googlesource.com/75561
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 17:43:46 +00:00
Paul Berry 80fda41538 During one-phase summary generation, use ASTs for type inference.
There are some test failures introduced by this change.  I believe
they are due to pre-existing bugs, so I'll address them in a follow-up
CL.

Change-Id: I4e00083e53f92d5c8ac53a7a597b89496402aec4
Reviewed-on: https://dart-review.googlesource.com/74487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-11 20:52:09 +00:00
danrubel a9cc6f0f19 Revise with clause event handling
This replaces the begin/endMixinApplication events which were used in both
```
  class A = B with M;
```
and
```
  class A extends B with M { }
``
with different events for each of the above situations.
This change facilitates properly handling class declarations of the form
```
  class A with M { }
```

Removed event:
* beginMixinApplication
* endMixinApplication

Added events:
* handleNamedMixinApplicationWithClause
* handleClassWithClause
* handleClassNoWithClause

Change-Id: Ifa0ecfd7ff8c408087ad78036ad35ba4a00728c6
Reviewed-on: https://dart-review.googlesource.com/73940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-07 19:33:51 +00:00
Paul Berry e72fd5294a Deprecate unneeded fields from PackageBundle.
Change-Id: I071a44499ef20a32388eea7ba04264c8c9b8e1c9
Reviewed-on: https://dart-review.googlesource.com/73285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-06 14:16:10 +00:00
Peter von der Ahé d1e2ee28f3 Remove addCompileTimeError in favor of addProblem
Replace most methods with names containing CompileTimeError with corresponding
Problem methods.

Also make Severity.error the default severity.

Change-Id: I4f47bf71dec02347407f2ce4ccfdb04730daf51b
Reviewed-on: https://dart-review.googlesource.com/73221
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-06 06:56:42 +00:00
Martin Kustermann dcf1f0a145 Revert "Remove addCompileTimeError in favor of addProblem"
This reverts commit f872c17a85.

Reason for revert: After the CQ was green someone else made changes which this CL is not compatible with. The CQ lands if the tests passed
and doesn't rebase before doing so. 


Original change's description:
> Remove addCompileTimeError in favor of addProblem
> 
> Replace most methods with names containing CompileTimeError with corresponding
> Problem methods.
> 
> Also make Severity.error the default severity.
> 
> Change-Id: I85a340168848cd3b4375b3f53cb0361251ed6e5d
> Reviewed-on: https://dart-review.googlesource.com/73100
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

TBR=ahe@google.com,jensj@google.com

Change-Id: I3ea736a9752805adb3bacc8b67e8eb1435c1bf69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/73181
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-09-05 14:13:48 +00:00
Peter von der Ahé f872c17a85 Remove addCompileTimeError in favor of addProblem
Replace most methods with names containing CompileTimeError with corresponding
Problem methods.

Also make Severity.error the default severity.

Change-Id: I85a340168848cd3b4375b3f53cb0361251ed6e5d
Reviewed-on: https://dart-review.googlesource.com/73100
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-09-05 13:47:23 +00:00
Paul Berry e76d37f307 Remove strong mode booleans related to summary linking.
The analyzer always runs in strong mode now, so these booleans aren't
needed.

Change-Id: Ic16ca9f37f8befead5aee85140fb70395a1d3511
Reviewed-on: https://dart-review.googlesource.com/71622
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-30 13:54:42 +00:00
Peter von der Ahé f5f33776a4 Revert "Store code ranges for formal parameters."
This reverts commit 5b9a42de29.

Change-Id: If6b3edc7194fda050de3b6ffbb0c8124a75509a6
Reviewed-on: https://dart-review.googlesource.com/72100
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-08-30 10:20:18 +00:00
danrubel cd970b0927 Parser refactoring in preparation for mixin declaration support
This is a bunch of renames and cleanup in preparation for
my next CL with basic mixin declaration support.

Rename listener events:
* handleClassImplements to handleClassOrMixinImplements
* beginClassBody to beginClassOrMixinBody
* endClassBody to endClassOrMixinBody

Rename parser methods:
* parseClassMember to parseClassOrMixinMember
* parseClassBody to parseClassOrMixinBody
* skipClassBody to skipClassOrMixinBody

Also:
* Change test expect from "ClassBody" to "ClassOrMixinBody"
* Rename message ExpectedClassBody to ExpectedClassOrMixinBody
* Update text of MISSING_CLASS_BODY to include mixin
* Rename IdentifierContext.classOrNamedMixinDeclaration to classOrMixinDeclaration
Change-Id: Iaa554cc859e1e665475c0eb544895a311c06395a
Reviewed-on: https://dart-review.googlesource.com/70881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-22 17:57:09 +00:00
Konstantin Shcheglov 5b9a42de29 Store code ranges for formal parameters.
Change-Id: I022e5140869c7007c28109a4dfda3914b34c4725
Reviewed-on: https://dart-review.googlesource.com/71184
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-22 17:40:58 +00:00
Dan Rubel 4eb4d75270 Remove unused event parameter
Change-Id: I097886cae93204d671a3aca4caaafea8d117989d
Reviewed-on: https://dart-review.googlesource.com/70180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Jenny Messerly 3320d8f677 fix #31237, missing return hint was missing for inferred returns
Change-Id: I3c8c59f31196b220aaa0421f8357a950ff16ba20
Reviewed-on: https://dart-review.googlesource.com/62727
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-07-19 00:19:24 +00:00
Devon Carew 26b9cad259 Fix types in mini_ast.dart.
Change-Id: If1c32ee52da6fe56e6dab04d70ae04f7adf52f81
Reviewed-on: https://dart-review.googlesource.com/62888
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-06-28 21:41:58 +00:00
Aske Simon Christensen f20672e00a Parse name of factory as method name instead of constructor reference.
Report an error when a factory constructor has type parameters.

Report a better error than the old "couldn't find constructor" or
"illegal method name" when the name of a constructor does not match
the name of the enclosing class.

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

Change-Id: Ie46a5b4cbe07ba05ce2936e1f8f9ca2cad0208f7
Reviewed-on: https://dart-review.googlesource.com/57620
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-06-11 09:55:24 +00:00
Brian Wilkerson f68298bb57 Add casts to fix dart2 runtime exceptions
Change-Id: I29a9d04fecc94c7f8919026bbc98f695189a6523
Reviewed-on: https://dart-review.googlesource.com/59140
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-06-07 19:40:01 +00:00
Kevin Millikin 2d46ebd6a5 Fix Dart 2 runtime errors in the front end
Fix all the Dart 2 runtime errors revealed by compiling dart2js, the
front end itself, the front end tests.

Change-Id: Ic6e6dd9f85db845b6a351ebbcfea9a6045843fc2
Reviewed-on: https://dart-review.googlesource.com/56322
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-24 10:14:20 +00:00
Brian Wilkerson a6ad152315 Fix constant-related deprecation warnings in analyzer packages
Change-Id: I6e4186d2a877275db2f04881a6aa6d154d4f8693
Reviewed-on: https://dart-review.googlesource.com/55820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-17 21:24:38 +00:00
Dan Rubel 8e812ddaa5 Pass modifiers in beginFormalParameters event
This CL updates the beginFormalParameters event to include
the covariant and const/final/var modifiers, and cleans up
a number of unused classes and methods including:

* the original implementation of ModifierContext/Recovery
* handleModifier and handleModifiers events

Change-Id: Ie89a202d17872fba85cd1a477091472a8d2d223b
Reviewed-on: https://dart-review.googlesource.com/51380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-04-17 20:27:37 +00:00
danrubel 08d305bbd7 Inline modifiers into endTopLevelFields and endFields events
Change-Id: I9681e22ae96c43626558ff567cbf4a12117095fa
Reviewed-on: https://dart-review.googlesource.com/47240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-20 15:00:35 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Dan Rubel f008b41d6b Parse invalid top level blocks during recovery
* New handleInvalidTopLevelBlock event for analyzer recovery
* Extract parseInvalidBlock and override in diet parsers

This addresses comments in https://dart-review.googlesource.com/c/sdk/+/41100

Change-Id: Ia7a7cc490231f5569906e4ad54c451c3b92c1e6b
Reviewed-on: https://dart-review.googlesource.com/42800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-02-21 19:06:19 +00:00
Dan Rubel b2c5415db9 Rework parseClassMember to remove findMemberName
This CL finishes the process of removing findMemberName from parsing
class members and sets the stage for improved recovery.
In addition, this CL:

* Revises the `endMethod` event to include a beforeParam token
    so that the parser can revise the token stream before the parameters
    during recovery.

* Reworks insertSyntheticIdentifer for use in more places

Change-Id: If5bcd6f554053f72429e938b5cd5e7021e03d5b3
Reviewed-on: https://dart-review.googlesource.com/39320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-02-06 21:01:53 +00:00
Aske Simon Christensen 0c03458717 Reland "Treat most warnings as errors in strong mode."
Reland of https://dart-review.googlesource.com/c/sdk/+/29160

Adds a 'severity' field to diagnostic messages and replaces all
addWarning and addNit functions by a generic addProblem, which uses
the intrinsic severity of the message. Eventually, errors should
also be reported this way.

A special severity value maps into either warning or error for Dart 1
and Dart 2, respectively. Most Dart 1 warnings are in this category.

Fixes some 320 failures of DDK test expecting a compile-time error.
These were previously masked by a workaround in the DDC error handler
which has now been removed.

Closes https://github.com/dart-lang/sdk/issues/31286

Change-Id: Id3b3b7f1fc6a101639fc908c90f3ec7d304a7b4b
Reviewed-on: https://dart-review.googlesource.com/32580
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-08 09:20:02 +00:00
Aske Simon Christensen 5402f02cbc Revert "Treat most warnings as errors in strong mode."
This reverts commit 3303df8102.

Reason for revert: Tests failing

TBR=ahe@google.com,askesc@google.com

Change-Id: Ifc8c9def6d134ab1b0c5f094a02a4f57a3581f19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/32360
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2018-01-04 15:35:17 +00:00
Aske Simon Christensen 3303df8102 Treat most warnings as errors in strong mode.
Adds a 'severity' field to diagnostic messages and replaces all
addWarning and addNit functions by a generic addProblem, which uses
the intrinsic severity of the message. Eventually, errors should
also be reported this way.

A special severity value maps into either warning or error for Dart 1
and Dart 2, respectively. Most Dart 1 warnings are in this category.

Fixes some 320 failures of DDK test expecting a compile-time error.
These were previously masked by a workaround in the DDC error handler
which has now been removed.

Closes https://github.com/dart-lang/sdk/issues/31286

Change-Id: I6acea31b8cba7dec8b318e081d28f4eb4ebbf75c
Reviewed-on: https://dart-review.googlesource.com/29160
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-04 14:56:46 +00:00
Paul Berry 7d65fec76e Reland "Route all messages through Loader."
This is the same as https://dart-review.googlesource.com/24481, but
with additional status file fixes.

Change-Id: Ic076c4dbf9c07e0fdf316298ca1ee1b6ce25002b
Reviewed-on: https://dart-review.googlesource.com/25508
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-01 22:47:06 +00:00
Ryan Macnak a646f51a5b Revert "Route all messages through Loader."
This reverts commit 8e4b0bda23.

Reason for revert: Failures on most kernel bots

Original change's description:
> Route all messages through Loader.
> 
> This ensures that all messages are passed to instrumentation.
> 
> Issues addressed in this CL:
> 
> * When I added addCompileTimeError, I forgot to remove addError.
> 
> * All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage.
> 
> * As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways).
> 
> * Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing.
> 
> * I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once.
> 
> * Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect.
> 
> Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed
> Reviewed-on: https://dart-review.googlesource.com/24481
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>

TBR=paulberry@google.com,ahe@google.com,kmillikin@google.com

Change-Id: I9f7b345a8ff040fc7aa73c5cb605190e47fd284b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/25660
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-01 20:37:45 +00:00
Peter von der Ahé 8e4b0bda23 Route all messages through Loader.
This ensures that all messages are passed to instrumentation.

Issues addressed in this CL:

* When I added addCompileTimeError, I forgot to remove addError.

* All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage.

* As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways).

* Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing.

* I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once.

* Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect.

Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed
Reviewed-on: https://dart-review.googlesource.com/24481
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 11:38:26 +00:00
Peter von der Ahé a689397a36 Revert "Implement support for generic comment syntax in Fasta."
This reverts commit f1959d6cd4.

Reason for revert: insufficient approval.

Original change's description:
> Implement support for generic comment syntax in Fasta.
> 
> Change-Id: I4c15a4adf2dbb50efd799b801dcb75a538bbe7d6
> Reviewed-on: https://dart-review.googlesource.com/21223
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Dan Rubel <danrubel@google.com>

TBR=paulberry@google.com,danrubel@google.com,sigmund@google.com

Change-Id: I047e4e87913002c6bd77e455599189349c123146
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/22460
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-11-21 10:08:39 +00:00
Paul Berry f1959d6cd4 Implement support for generic comment syntax in Fasta.
Change-Id: I4c15a4adf2dbb50efd799b801dcb75a538bbe7d6
Reviewed-on: https://dart-review.googlesource.com/21223
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-11-20 22:01:27 +00:00
Brian Wilkerson 87a096e992 Remove the unused Listener.beginIdentifierList
Change-Id: I3644aaff3fa7a8a97b9e9bcc83f549f628a1fb71
Reviewed-on: https://dart-review.googlesource.com/17861
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-01 17:21:05 +00:00
Brian Wilkerson f6455328b8 Pass length information to listeners when reporting errors
Change-Id: I786cfcaa5631b817c56bb7b68b3bcc440d055344
Reviewed-on: https://dart-review.googlesource.com/16340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-25 14:15:29 +00:00