Commit Graph

25510 Commits

Author SHA1 Message Date
Dan Rubel 45f39fe70d update scanner/parser to handle null-aware index operator
This adds support for the nnbd `?.[` operator as specified in
https://github.com/dart-lang/language/pull/293/files#diff-dbeaf678924df9f8a2ca9f5d12e26d3eR11513

Change-Id: I11547cf875439fef9fe22d4f4ac5ab912b3759d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-13 16:53:26 +00:00
Brian Wilkerson 90b55959a4 The name of an extension is optional
Change-Id: I6d73538e2ae2d90b0347c4ee03df4422a442ab75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-06-13 16:28:21 +00:00
Brian Wilkerson 39c629f4aa Clean up uses of deprecated methods in legacy type asserter
Change-Id: I7f7288d57e69a488728dc81e5af5476a27d3dbc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105860
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-13 16:12:00 +00:00
Paul Berry dad07f8156 Migration: Fix return value of GraphBuilder.visitTypeName.
The return value of the GraphBuilder visit methods should always be
the type of the AST node assuming it's used as an expression.  When a
type name is used as an expression, its type is always a non-null
reference to the built-in type `Type`.

(Note: this wasn't causing any failures, but fixing it will allow me
to add stronger assertions in a follow-up CL.)

Change-Id: I62c72dcfc6c0f12f8d8a1a7de34a1d3f94c5e4f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-13 16:11:30 +00:00
Paul Berry cba75a1d1d Migration: fix accidental hardcoded 0 in GraphBuilder.visitTypeName
Change-Id: I4d75bc286fe8d5dfe063b30525a99dacc96b4ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105961
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-13 15:21:50 +00:00
Paul Berry e5f069b5dd Migration: add missing type annotation
Change-Id: Ie219297a4ffe203e0b15157471a2a59f1b1029a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105960
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-13 15:21:50 +00:00
danrubel d6f5a245b2 parser error token cleanup
This removes one location where ErrorToken processing is no longer needed
in the parser, and updates the analyzer parser tests to use scanString
rather than instantiating the scanner directly.

Change-Id: I399d771004af7f9fe25d19c1065fbfd425416edc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-13 14:30:10 +00:00
danrubel 8adde6b603 make extension declaration name optional
This CL updates the parser to parse extension declarations where
the extension name is omitted. For more details, see
https://github.com/dart-lang/language/pull/303/files#diff-9b84d2e3c88265bde2eb43544ddb757dR66

This change explicitly does not handle the case `extension on on on { … }`.
A subsequent CL should either make `on` a builtin
or add more lookahead in the parser to allow this edge case.

Change-Id: Ided821192770f88a51a3300fed8cb0fdef9eea3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-13 14:29:40 +00:00
Johnni Winther f889bd7067 Delete JavaScriptBackend
* move names to Identifiers
* move resolution parts to front end strategy
* move codegen parts to backend strategy
* remove now unneeded methods from FrontendStrategy and BackendStrategy

Change-Id: I0675d56045dd212ad195177ecd23b27b0d849a80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105742
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-13 10:09:46 +00:00
Aske Simon Christensen 50efd7f187 [Kernel] Add list of unused arguments to InstanceCreation nodes.
During constant evaluation, unused arguments to a const constructor are
thrown away after evaluation, since their values do not affect the
resulting instance constant. If such an unused argument ends up
unevaluated, any errors that would arise in the final evaluation are
not reported.

This CL adds space in the Kernel AST for saving these unevaluated
expressions so they can be checked during final constant evaluation.

Even though this is an incompatible change, no update is needed to the
VM code (except for the version bump), since the VM does not support
InstanceCreation nodes in the first place.

Change-Id: I4752562c1164efbba79eb018c15b07ed8354ce5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-06-13 09:42:26 +00:00
Danny Tuppeny 06b28fc60f Filter TODOs out of LSP diagnostics
Change-Id: I4a089be3919e0a2ed6c1e54e712ba7f1c9d835aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-06-13 07:31:36 +00:00
Mike Fairhurst 23d3e8a25f Land new subtyping algorithm; more tests but still not comprehensive.
Includes changes to implicit covariance test.

To redescribe this, for some tear-off C<T>.f, the member type may be
contravariant if T is referenced by a parameter of C<T>.f (such as if it
is of type void Function(T)). This must be a runtime failure if C<T> is
a reference which has been covariantly upcast at runtime. For example,
List<Object>.add, where the list is at runtime an instance of List<int>,
results in a static type of void Function(Object), but a runtime type of
void Function(int), which is unsound.

We omit these checks, however, when it is trivially sound for all cases
Previously, this was the case for tearing off `List<Null>.add`. This is
no longer a valid test case for NNBD where the runtime type of that list
could actually be `List<Never>`.

Therefore the test has been changed to expect `List<Null>.add` to result
in a cast, and a new NNBD test case has been added to test `List<Never>`
cases don't get a cast.

Change-Id: I61d024a249e2c2a249ad5a8037cbe3d103e3ea8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104361
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-06-12 23:48:48 +00:00
Brian Wilkerson 52ae429a9e Add some minimal support for instance creation expressions
Change-Id: I7184b8b5955d61e0d1452a8ff071aaab8ceb5dce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105728
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-06-12 23:47:39 +00:00
Nicholas Shahan aaf7d2023f [dartdevc] Fix violations of unawaited_futures lint
Issue: #37218
Change-Id: I736afd1a339be0573126ed2184b9a04e0ab73f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105781
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-06-12 23:27:17 +00:00
Paul Berry eec587e97d Migration: address a more complex case of instantiate-to-bounds.
Change-Id: I8a7d5e2e4189c3d910077ad4ec88e6c4e384dc25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105731
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-12 23:03:57 +00:00
Paul Berry f2cc27ffbf Migration: preliminary support for interface types without type parameters.
I'll build on this in future CLs to address more complex cases, where
the type is instantiated to a bound.

Fixes #37213.

Change-Id: I1e23c5599557ef17177483222f15b1a7985b9ca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 23:03:57 +00:00
Mike Fairhurst 2f65830aeb Add null checks for spread operator
Change-Id: Ib3b0f46643a24e22e0344a4505743518f885e9e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-06-12 20:58:03 +00:00
Paul Berry 3f83aeb493 Migration: add the ability to "union" nullability nodes.
This will simplify some situations where nullability migration would
otherwise have to visit the source code in a very careful order.  For
example, when analyzing top level fields undergoing type inference, we
can simply create a node for the nullability of each top level field,
and then later use the "union" operation to hook up those nodes to the
nodes resulting from analyzing their initializers.  Without the union
operation, we would have to be careful to visit the top level fields
in dependency order.

Change-Id: I3b07e1abccc5b1c9f1c7c9fa7b13fb6af60c07d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-12 20:10:24 +00:00
Paul Berry 0b5e37a429 Migration: Make always/never instance fields of the nullability graph.
Previously, they were static, which made them easier to access, but
made it difficult to track their edges (because we couldn't safely
mutate them, so we had to store their edges in special fields of
NullabilityGraph).  Now that we're passing NullabilityGraph all over
the place anyhow, there's no benefit to making them static anymore.

Change-Id: Ia3e7d32ae479f40f505621e5d6df04060e39b1c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-12 20:10:24 +00:00
Paul Berry 69d88daeb9 Remove unused imports
Change-Id: I08ae4f32ea9eb08f1147db2d056917fe4833e5e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105780
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-12 17:54:24 +00:00
Konstantin Shcheglov 4324d46080 Use an available socket port for memory benchmark.
R=devoncarew@google.com

Change-Id: I96472010b6bfa01e0ae2254f105d8e71bb7e86d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105683
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-12 16:18:14 +00:00
Konstantin Shcheglov 0e4e14a288 Build summary2 in DDC.
New summary2 will unblock fixing long standing inference issues in
Analyzer.

We build it in addition to summary1, and will switch clients to summary2
incrementally. With this CL DDC will build summary2, but will not
consume it yet for analyzing code. This will be done in a separate CL.

This change was also tested in the internal repo, and does not cause
related build failures.

Change-Id: Ic2c635e45b514a2610e938129fa7527fd8d070b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105261
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 16:09:24 +00:00
Konstantin Shcheglov a173d22fe7 Record reference to the typedef from which a FunctionType was instantiated.
It seems that this is necessary for Angular compiler.

R=brianwilkerson@google.com

Change-Id: Ib5c0501d8f900ec9ca358cb4f4b4be90004cce77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-12 14:22:03 +00:00
Paul Berry b385528fee Migration: Write unit tests for NullabilityGraph.
Change-Id: I7d3ab1bde98ff28203dc73d61ecdc77e8fed25f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-12 13:34:57 +00:00
Paul Berry c286d5a549 Separate testing methods from the rest of NullabilityGraph
So that we don't accidentally start to use them elsewhere in the
migration engine.

Change-Id: Iee290f9fc8761c952a2aadb1f4f6bb7bfe061a3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 13:34:57 +00:00
Danny Tuppeny c177b4cc4c Make the ranges of constructors in hovers match those of methods/functions
Fixes https://github.com/dart-lang/sdk/issues/35386.

Change-Id: I66c0b1b9f47b8f037da9585453330d6eb1de3c4e
Bug: https://github.com/dart-lang/sdk/issues/35386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-06-12 13:28:37 +00:00
Danny Tuppeny cbb1816177 Remove unnecessary LSP hover handling comment/code
Change-Id: I1609dd07dae57b6bac48492c64f7ac1a7fb82d5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105741
Auto-Submit: Danny Tuppeny <dantup@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 13:25:27 +00:00
Paul Berry 686df33d99 Add parseString() to replace the deprecated parseCompilationUnit().
Change-Id: Ib272f6a281b09a02ba037049e76bf08dd78dbbab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105540
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-12 12:56:57 +00:00
Terry Lucas 92dabc8491 Cache the WidgetCreatorTracker.
This fixes the problem when the flutter bots run multiple tests from the flutter tool e.g.,
  flutter test first_widget_test.dart second_widget_test.dart

The first test causes the set of libraries, particularly Flutter's framework library, to be passed
to the transformer. The transformer needs the 'Widget' class located in Flutter's framework
library. The transformer on the first test works.  Each subsequent test only the libraries not in
the prior test are passed, without the framework library, the transformer is unable to find the
'Widget' class and the widget transformer fails to run.

This fix allows the use of a nice speedup to hot-reloading Flutter applications when
--track-widget-creation is enabled and it allows us to enable --track-widget-creation by default,
for command line Flutter users.

This fixes issue https://github.com/dart-lang/sdk/issues/36640

R=jacobr@google.com,askesc@google.com

Change-Id: I9a9c9dc69995122d0f7a7a3e1dfaebf57abb4afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105661
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-06-12 11:07:36 +00:00
Johnni Winther cbe48553c0 [CFE] Add LocalFunction as super-interface for FunctionExpression and FunctionDeclaration
+ use it in dart2js to simplify and clarify handle of local function nodes

Change-Id: I35da2dd8bd3baba6eff6ad631ebe63d572bae4d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105423
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-06-12 07:20:39 +00:00
Sigmund Cherem 080ff1f3b9 Fix parsing of output-directory Uri in windows
Change-Id: I3e3417e5048f8545056d99df35ca2de140dc31f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105680
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-06-11 23:21:43 +00:00
Mike Fairhurst dab4eb045f Add a "legacy type asserter," manage broken test cases
Change-Id: Ic046805c3246ad7e5e7c56fb9188d6ebd197e2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105560
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 23:17:43 +00:00
danrubel f69d5dc2c2 show analyzer details in dartfix
This updates dartfix to display details about the analysis process
if the analysis server provides them.

Change-Id: I0b2a7e8267b92e1eefd1ce90aa53a85cc91c48d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105549
Commit-Queue: Dan Rubel <danrubel@google.com>
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 22:46:13 +00:00
danrubel a3348ab702 sort some dartfix classes
Change-Id: I0655c6ae7d06219ee17957c9c49e90fbf8afe63d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105548
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 22:46:13 +00:00
Sigmund Cherem 7c7160f022 Move isRedirectingFactory to CFE and add unit test for it.
Eventually it should be handled by Procedure.isRedirectingFactoryConstructor, but that is
currently broken for patch files.

It appears the VM has no patches of that kind, but dart2js does.

Change-Id: I0b64379f16089ad0d98ecd4df1ed9282ed6bc0e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98523
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-06-11 22:00:10 +00:00
Brian Wilkerson e6567601af Add a notice that the markdown file is generated and remove documentation specific to nnbd
Change-Id: Iece4cd98399b243c9d7fb69af888460bb45421fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 19:57:19 +00:00
Danny Tuppeny 1ba9ed7a35 Improve LSP JSON error when an expected object is not an object
Change-Id: I79632ceca51a5288f9b742f78483a6c2117f58d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105588
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-06-11 19:07:29 +00:00
Danny Tuppeny 9d5b4491b2 Remove redundant null checks from LSP validation
Change-Id: Ie978b598ecec85455628263d0e3cf2f6f8f71253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105587
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 19:07:29 +00:00
Danny Tuppeny ca3320e3bd Tweak LSP JSON validation error messages
Change-Id: I732d0020a68256632ee8ba823a0a31eb4a5360d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 19:07:29 +00:00
Danny Tuppeny 972ea07459 Simplify LSP json error reporter with push/pop fields
Change-Id: I5186eb2de3cf956ada04237ac7ff90fc2d01b79b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105585
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 19:07:29 +00:00
Danny Tuppeny 530a2f5681 Make a null LSP error reporter to avoid so many null checks
Change-Id: I08f9259ba5aca52c61dd6820a3cc54bf40a30c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105584
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 19:07:29 +00:00
Danny Tuppeny 9fb2842fce Improve the error messages reported in LSP when params are not valid
Change-Id: I305955a22d687e8338138db48dff4e32589bbc6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-06-11 19:07:29 +00:00
Konstantin Shcheglov 1b9d5b47ed Make sure that we have a unit in unit_withDirectives.
I still was not able to reproduce the issue, but I think this fixes it.

R=brianwilkerson@google.com

Change-Id: I209812bd2f2e8f0a5568ef14f7bfeaa4093c1341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 18:59:28 +00:00
Konstantin Shcheglov 8e9e1877b5 Perform AST rewrite during metadata resolution.
R=brianwilkerson@google.com

Change-Id: I3e19bb1bc6e7d6f3f42134090ed7e7a4920420ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 18:13:04 +00:00
Konstantin Shcheglov 149ebf683b Support for 'uri' property of Import/Export/CompilationUnitElement.
_Builder in source_gen uses code like this to check that the generated
file is expected in the library. While it is a questionable approach,
I don't feel that I have time to fix it, and remove the `uri` property
completely. So, we fix in in Analyzer with summary2.

`if (!library.parts.map((c) => c.uri).contains(part)) { ...fail... }`

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

Change-Id: I983f29589cbb2613d5f896b87f6218c31a47afa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-06-11 16:53:03 +00:00
Nicholas Shahan 8aa4414f1b [dartdevc] Ignore violation of empty_catches lint
* Only appears in a sourcemap test.

Issue: #37218
Change-Id: I0bb24db28c2d0041629de12c47273dfdc2b8b2f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105547
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-06-11 16:51:13 +00:00
Jens Johansen 801ad8b521 [cfe] Remember if finalizeExports was done
Before this CL, whenever a dill library builder was asked to compute
the outline it would finalize its exports - even if it was already done.
This is not really a problem (it mostly puts stuff into maps --- doing
it again will just overwrite what's already there with the same thing
again), but when having many dill library builders, and asking them to
compute the outline again and again because we've added a few new ones
(e.g. via kernel worker) it adds up to a lot of wasted time.

This CL adds a boolean to the dill library builders to avoid re-doing
this already done work.

An internal benchmark via kernel worker of lots of outline
calculations in worker mode with reuse and the incremental compiler
(and lots of dill loaded dependencies) goes from ~149 seconds to
~143 seconds.

Change-Id: I19cadbf64ff5e0ff117bad4df86c83832a1f28fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105243
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-06-11 11:32:34 +00:00
Nate Bosch aa246f6588 Add return types on all main declarations
Reduces the noise when disallowing implicit dynamic.

Change-Id: I98b03cb675ecd4b9e7f4135efa274fb57eb87832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104164
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-06-11 00:19:00 +00:00
Stephen Adams ded6933b08 New Rti SSA nodes
Change-Id: I1448239274803ca3e1dae4c602996662a11f2f1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105408
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-11 00:02:12 +00:00
Sigmund Cherem 0960f72517 Fixes in modular test runner:
- ensure output directory has a trailing slash
 - ensure tests complete before returning from runner
 - flush log files (probably not necessary)

TBR=athom@google.com

Change-Id: Ie415266fd311d6319e0853a785e867770c0587a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105472
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-06-10 22:39:06 +00:00