Commit Graph

12 Commits

Author SHA1 Message Date
Konstantin Shcheglov bd49ff15bf Record constructor name offset in metadata.
This fixes 70 Analyzer tests.

R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: If7e3fa948aa67712eab5533b083757a75a981e14
Reviewed-on: https://dart-review.googlesource.com/13926
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-16 18:29:37 +00:00
Konstantin Shcheglov afaf47e29b Triage the rest of StaticWarningCodeTest_Kernel as Fasta problems.
Unfortunately there are nothing we can fix at the Analyzer side yet.

R=brianwilkerson@google.com

Bug:
Change-Id: I859f8608833fcdf254bf811906475ffec871665c
Reviewed-on: https://dart-review.googlesource.com/13241
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-11 18:32:50 +00:00
Konstantin Shcheglov 4c6322ac16 Triage StaticWarningCodeTest_Kernel and fix one problem.
R=brianwilkerson@google.com

Bug:
Change-Id: I26d1f30fca0928d1ec00bfba932975734a1c1b7a
Reviewed-on: https://dart-review.googlesource.com/13181
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-11 18:00:25 +00:00
Konstantin Shcheglov 7d9188aea1 Add FallThroughError that is used by Fasta.
R=brianwilkerson@google.com

Bug:
Change-Id: Iff5a981f7ce9e9693996bc18493c13b2d88e5f6d
Reviewed-on: https://dart-review.googlesource.com/12782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-11 02:02:40 +00:00
Konstantin Shcheglov b7d00a8712 Add _DuplicatedFieldInitializerError that is used by Fasta to report compilation errors in Kernel.
R=brianwilkerson@google.com

Bug:
Change-Id: I27ef95ecb53a37fa1543fd65e3a6ea09974f3b56
Reviewed-on: https://dart-review.googlesource.com/10840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-04 16:24:52 +00:00
Konstantin Shcheglov 8d0c0bae0b Triage tests failing because of import/export and duplicate declarations.
R=brianwilkerson@google.com

Bug:
Change-Id: I771c33de3f719483d65b8415f4ce61e4335cd84e
Reviewed-on: https://dart-review.googlesource.com/10162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-02 20:56:02 +00:00
Konstantin Shcheglov e8fe137e94 Remove ExecutableElement.functions and don't resynthesize local functions.
As for all other local elements - variables and labels, we now
created them when we analyze the unit, but we don't export them
through the element model.

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

Bug:
Change-Id: I71eb567f58d6d710fc8a58d1653a66d95ef1ddcd
Reviewed-on: https://dart-review.googlesource.com/9861
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-01 21:08:04 +00:00
Konstantin Shcheglov b5fc2de3bf Keep sources for libraries of the current cycle.
This should fix the issue 30917 flakiness.

The reason why the tests were failing is that the code in the tests
was not quite correct Dart code, so Fasta generated a synthetic
`#errors` top-level variable with fileUri == null. We should skip
this field because it is not a part of any unit, because its fileUri
is not the fileUri of any unit.

But we lose fileUri for a Node if Program.uriToSource does not
include this URI. So, if we clear uriToSource in KernelDriver, we
lose all the file URIs. So, now we keep sources for the cycle files.

The reason for flakiness is because of the same race condition
between analyzing AnalysisDriver.addFile() and getResult(). If
we process getResult() before, we don't have to read the library
kernel file, we just create in first time, and fileUri(s) are
valid.

R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug: https://github.com/dart-lang/sdk/issues/30917
Change-Id: Ie559cf2a8a778ebf4a9e297f5cb13d30a98b5a3c
Reviewed-on: https://dart-review.googlesource.com/9744
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-29 18:38:52 +00:00
Konstantin Shcheglov c6ba28a5a8 Create (empty) initializers for parameters resynthesized from Kernel.
R=brianwilkerson@google.com

Bug:
Change-Id: I1fc4d7db27951fb0e094dc685eb3e0bde4663e68
Reviewed-on: https://dart-review.googlesource.com/8162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-25 17:13:18 +00:00
Konstantin Shcheglov f575c099b0 Run all *_driver tests also with Kernel. (attempt #2)
With previous changes that fix finding dart:core on Windows and
flakyness of reporting import errors, I'd like to reland this CL.

Attempt #1: https://dart-review.googlesource.com/c/sdk/+/7624

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

Bug:
Change-Id: If5ab2c5ebe2204df6643ee42cbee5b49fb2d8c31
Reviewed-on: https://dart-review.googlesource.com/7961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-24 18:27:27 +00:00
William Hesse 2274739c3c Revert addition of kernel tests to analyzer unit tests
These tests have flaky failures on the buildbots and commit queue.
Revert "Run all *_driver tests also with Kernel."

This reverts commit d2f887e37b.

Revert "Adjusted status for analyzer/test/generated/strong_mode_kernel_test"

This reverts commit 055654e96d.

Revert "Made status for strong_mode_kernel_test broader (flaky)."

This reverts commit 824c3f56cc.

Bug:
Change-Id: I341762671efc31f168df2f5806653d9548bd43ae
Reviewed-on: https://dart-review.googlesource.com/7708
Reviewed-by: William Hesse <whesse@google.com>
2017-09-22 11:37:21 +00:00
Konstantin Shcheglov d2f887e37b Run all *_driver tests also with Kernel.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I92a0f5f2192c20276b166a9211ab1064bc6f2b82
Reviewed-on: https://dart-review.googlesource.com/7624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-21 22:44:39 +00:00