Commit graph

31991 commits

Author SHA1 Message Date
pq b989ccf733 bulk fix for unawaited_futures
Change-Id: I0d53fe9d31b22a08585ea625a5dfbbf5ed5187e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-11 15:23:49 +00:00
Jonas Hungershausen 94be2fc1f8 [Analyzer] Keep comments when organizing imports
This change adjusts the organize imports logic, to keep any comments
written in the line above an import statement attached when
organizing the imports, while being smart about what comments to keep.

Closes https://github.com/dart-lang/sdk/issues/42515
Change-Id: Ibcca4f24411ac16bcdb17f66fb6d2b9c45f7d367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157743
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 15:03:59 +00:00
Devon Carew 57b192a0fc [analyzer] remove the completion language model file
Bug: https://github.com/dart-lang/sdk/issues/42988
Change-Id: I3988f08eb9a7480aacb4a7be79f537595807a3c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158067
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-08-11 14:46:59 +00:00
Johnni Winther d98aa34388 [cfe] Cache field class members
Change-Id: I43e2ac785d361649420e47a6302a74b93a71a67b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158011
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-11 13:55:59 +00:00
Jens Johansen e92533dea3 [CFE] Mark two incremental tests slow
The tests incremental_dart2js_test and incremental_compiler_leak_test
- taking ~1 minute each locally - often times out at 4 minutes (after
almost being done) on the bots. This CL gives them a little more time
hopefully allowing them to finish.

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

Change-Id: Ic6309ebc1a0c77300f1b4f5262f8d48f4de3e0be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157982
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-08-11 12:42:09 +00:00
Clement Skau 77ca1e0356 [SDK] Adds --enable-experiment to dart2native.
Bug: https://github.com/dart-lang/sdk/issues/42849
Change-Id: Ibde382971a6b8b296f9a0a8792f0fec0e1741286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157963
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-08-11 11:22:19 +00:00
Clement Skau ebae77f1b7 [Test] Nit: Makes compile_test fail more informative.
Moves the file check after the stderr and exitCode check to show any
process error before checking for success output from the process.
In effect we'll now see the error message from the compiler when the
binary isn't created.

Change-Id: I2fb5c87caf6b87f5cff5c89eccaebd2690b20408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158009
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-08-11 11:07:19 +00:00
Jens Johansen 13de7e7560 [CFE] Add first stab at weekly leak test
Change-Id: Ib0307a4d82414e8387f65a9010a6f0f91827c3bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157962
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-08-11 09:01:29 +00:00
Johnni Winther 65e48e423a [cfe] Add a member signature origin to member signatures
Adds a member signature origin to member signatures and includes
an additional reference to these in MethodInvocation, PropertyGet,
PropertySet, etc.

This enables the VM to bypass the member signatures when loading the
AST.

Change-Id: I5cae11f4434bc052d0ba0acf0670dd002c6f3df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157498
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-11 08:16:59 +00:00
Jens Johansen 4c0cab024e [parser] No longer support ?.[ syntax
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.

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

Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-11 08:09:59 +00:00
Johnni Winther 9a2a3aae14 [front-end] fix bug in BodyBuilder
https://github.com/dart-lang/sdk/issues/42997

@mraleph

> Also, how to construct tests that generate AmbiguousBuilder and catch error?

Closes https://github.com/dart-lang/sdk/pull/42998
https://github.com/dart-lang/sdk/pull/42998

GitOrigin-RevId: be1aae61495cabcb1a7e8cffff47c18574f97d2e
Change-Id: Icdfb8f5acf7db8475a9500596b995354d2e83b3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157941
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-11 07:26:02 +00:00
Johnni Winther 3059f64647 [cfe] Use mutual subtyping to check valid mixin applications
Related to flutter/flutter#63029

Change-Id: I492b348c414c76b5fda497614c733730d02bccfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157981
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-08-11 07:24:39 +00:00
Brian Wilkerson e224540b1c Unify four diagnostic codes for the purpose of documentation
I would have prefered to have renamed them all to undefined_super_member,
but that would have broken existing links. Some day we should add the
support necessary to allow for forwarding so that we can rename codes.

Change-Id: I81e416407e3464b5b60a4dbbfe60a375eb47bb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157921
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-08-11 01:07:44 +00:00
Ben Konyi 7a8b267a39 [ dartdev ] Set maximum help message character width to 120 characters
Fixes https://github.com/dart-lang/sdk/issues/42964

Change-Id: Ib05b030e71b0fb266b1952b8c2a45eb7f96cfd76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158065
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-08-11 00:10:04 +00:00
Paul Berry d4e4abdef6 External field support: add a notion of external fields to the AST and element model.
In follow-up CLs I will update error reporting logic.

Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-10 21:54:54 +00:00
Konstantin Shcheglov 7e86900c65 Remove DriverResolutionTest.
R=brianwilkerson@google.com

Change-Id: I1ca6918da9a51d5650ba9b76a960d7a3348ba4b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158081
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:43:58 +00:00
Konstantin Shcheglov a8f1be78a5 Migrate SdkConstraintVerifierTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: I0d6fa9ccdfbb4f9156226af2884a5f9b14dea495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 21:24:25 +00:00
Konstantin Shcheglov e626e47ea9 Migrate SubtypeOfSealedClassTest and language version tests.
R=brianwilkerson@google.com

Change-Id: I573a6223fb58b2a412d0dcbf961739ecd9a7af82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 20:52:01 +00:00
Konstantin Shcheglov 287c796412 Migrate AnalysisDriverCachingTest to PubPackageResolutionTest.
R=brianwilkerson@google.com

Change-Id: Iafcc25686d1eb70f638347ed4af06e09eb965cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 20:12:13 +00:00
Brian Wilkerson 276f10aaf6 Unify const_field_initializer_not_assignable with field_initializer_not_assignable for documentation purposes
Change-Id: I7b008febe4210d08768b81c59bf0ee6b2663fafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:48:03 +00:00
Paul Berry 87f0d5d9dc Abstract field support: do not allow abstract fields to be late or static.
Although these error conditions are not reported by the parser, the
language grammar does not permit them, so from a customer perspective
they are parser errors.  Accordingly, they have been assigned
ParserErrorCodes and reported by the AstBuilder, as we do for other
similar errors.

Change-Id: I79d0ad1dcad518981b8b649c117df326279008f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 19:27:13 +00:00
Konstantin Shcheglov 8405d7c8e3 Remove dart2jsHint option, verifier, and tests.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I95b88940c862d463af03e85fcdf0f4bf81c2fbd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-10 19:19:43 +00:00
Konstantin Shcheglov 1af388c521 Move DEPRECATED_MEMBER_USE to AnalysisContextCollection.
Change-Id: I938891254b2bf3aae7d2c514a27a7ed49f95b775
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157883
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-10 17:46:33 +00:00
pq e2a67723ca bulk fix for prefer_final_fields
Change-Id: Iabfb6aae5186171f4143d23aeb18a124ceab4a0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-10 15:10:41 +00:00
Brian Wilkerson 570a75be7e Further disable the use of the language model
Change-Id: Ibd7c8bdd549ca17fbf6d53679973665661906a85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 15:47:12 +00:00
Paul Berry 92315c4b2d Abstract field support: do not allow initializing abstract fields.
There are three ways to initialize a field, so we have to check for
three error conditions:
- At the declaration site
- Via a field formal parameter
- Via a constructor initializer

Fixes #42981

Change-Id: Ifc32a28ffb62d60fd2171d4980e88da9eebcb481
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-08 13:36:52 +00:00
pq b0d007a931 bulk fix for type_init_formals
Change-Id: I8b79e30f2ea811b97caa8fda1297dda054bbcc05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-08-08 05:04:50 +00:00
Konstantin Shcheglov 0aa5b0f019 Files generated for other packages in PackageBuildWorkspace do not belong to the package.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I1608caf8fb54187f8154dd1510841f46a247383f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:26:57 +00:00
Konstantin Shcheglov 940d7effbd Fix for crash in AddMissingEnumCaseClauses.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I0dc8c3158eb4b46247e415ff36c33991598bce9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157861
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-08 01:22:53 +00:00
pq 06cce87374 bulk fix for unnecessary_this
Change-Id: I61c0173c8fb1fd02d6119412bf925d08126a7a0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 22:58:17 +00:00
Konstantin Shcheglov a08a357bdb Remove unused code from PackageBuildWorkspacePackageTest.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I3e6fc8c87671b60c5152f273b3ff6da96c71b103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:57:51 +00:00
Konstantin Shcheglov 8ce4d6d6bf Replace 'non_nullable' with 'null_safety' in BUILD files.
The flag was renamed since the original issue was open.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/42594
Change-Id: Ie92d43d09d97386f3e61ad226c0a0c88287d2ea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 18:51:14 +00:00
Srujan Gaddam e51623f81a [package:js] Add errors for missing @JS on class
Adds errors for class members that have a @JS annotation but the
enclosing class does not.

Change-Id: Id693af71678510047a723863846d89aa29cebe26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157004
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 17:09:23 +00:00
Srujan Gaddam 57a522eaaf [dart2js] Allow multiple errors in native_test
native_test is set up so that it validates only one error per static
error. This CL allows multiple errors to be reported and validates
that all are reported.

Change-Id: I97e9abbfbd8273c0c436e44d08f5768eea3f7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157663
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 17:09:23 +00:00
Konstantin Shcheglov 5bd3e5a63f Use PubPackageResolutionTest for diagnostics snippets.
Change-Id: I4fd0e38d0ab431f96056fba0819ddefefea72e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:45:07 +00:00
Konstantin Shcheglov 8a0d5c25ee Use lookup() in VariableResolverVisitor.
Change-Id: I101ba07997cabcfa5fbccc59194acb79d7abf7e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:39:36 +00:00
Joshua Litt d384b7a0a6 [dart2js] Gather only required classes in deferred_load.
Currently we are gathering classes for all supertypes, but we only need
to gather classes for applied mixins and super classes.

Change-Id: Ie55a6587b0bc9cacf5061a52d2d9a9ec5fdbf2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156761
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 16:26:15 +00:00
Konstantin Shcheglov 6a5030981c Remove ResourceProviderMixin.newFileWithBytes().
R=brianwilkerson@google.com

Change-Id: I741d75149c1ff7108a458f661eb583b3fd711ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 16:14:41 +00:00
Christian Altamirano 7689769bfc [dart2js] Started skeleton for a powerset abstract value domain
This is based on the wrapped version that also includes a bit integer.
Right now the methods use the old abstract value domain but will use the integer bits in later CLs.
Also added and updated a flag so that now there is one for a wrapped domain and another for a powerset domain..

Change-Id: Iab6b93584a9a644dfef92f689c4be8c42ce8076a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157620
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 16:01:55 +00:00
pq 768fd39317 bulk fix for unnecessary_overrides
Change-Id: I9cdd051d7dcde5c9a9495e04cf0e7765aac8e714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 15:30:55 +00:00
Jens Johansen 714ee1cd48 [CFE] Reproduction for flutter issue #63029
Change-Id: I9df135af44fe023e4795f0a042f1bc1297ace8d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157499
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-08-07 14:26:24 +00:00
JustWe d6ef844a72 [front-end] bugfix: fix bug in constant eval .
fix bug in constant eval.
https://github.com/dart-lang/sdk/issues/42946

``` dart
main() {
  const x = (2 == 2.0);
  print(x); // prints `true`
}
```

@mraleph

Closes https://github.com/dart-lang/sdk/pull/42949
https://github.com/dart-lang/sdk/pull/42949

GitOrigin-RevId: 79feed76089dad86651e165faf12e41bdc6b1d88
Change-Id: I0af49901af7fdbc42a0f84d8ef49c3cbd1e32911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157341
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-08-07 09:42:57 +00:00
Vyacheslav Egorov 1f27788f41 [vm_snapshot_analysis] Avoid name clash
dart:core contains a class Type and it can also contain objects which
are instances of this class. Previously we would try to put size
information for both under dart:core/Type bucket which caused issues.

To prevent the clash we now wrap snapshot node types in '<...>' before using
them as path components, so that the first case would remain dart:core/Type
but size of Type instances would be written into dart:core/<Type> bucket.

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

Fixed: 42969
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie6c3400e90511507ff37b7ca037bd385dea1b11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157493
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2020-08-07 07:06:14 +00:00
pq b86f267151 bulk fix for unnecessary_lambdas
Change-Id: Idbf116b5194c122fae59526c3fc70b8a88f1b8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157494
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-07 03:56:05 +00:00
Konstantin Shcheglov fdef50f096 Support for declared variables.
Declared variables cannot be configured using analysis_options.yaml,
so I put them into AnalysisContextCollectionImpl for now.

R=brianwilkerson@google.com

Change-Id: I2aaa3cfa94ad4a386f0be7d47acc979a89b69b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-07 03:33:39 +00:00
Jacob MacDonald b67d0531e4 Add multi root source provider for dart2js
Bug:https://github.com/dart-lang/sdk/issues/42932
Change-Id: I565b2900fca05d3b88fc24e4cfb46944ef1d4ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157475
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 00:34:29 +00:00
Paul Berry 8b2576fe66 Abstract field support: detect when a concrete implementation is missing.
This CL covers two cases: when an abstract field appears in a concrete
class (which we report as CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, just as
we do for abstract methods), and when a concrete class implements a
class with an abstract field, but fails to supply the necessary
concrete implementation(s) (which we report as
NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_*, just as we do for
abstract methods).

Change-Id: I94bdbafc4ed7b058d9b33b3774e79cb55393380b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-07 00:18:09 +00:00
Alexander Markov 83d962339e [vm/nnbd] Fix handling of catch-all try blocks with null safety
Before null safety

  try {
    ...
  } catch (e) {
    ...
  }

was translated to a try-catch block with 'dynamic' catch type.

VM has a special, more efficient handling of such catch-all try blocks.
Those try blocks were detected by comparing catch type with 'dynamic'.

With null safety front-end started to translate those try blocks
using non-nullable Object as a catch type. As a result, this disabled
all optimizations for catch-all try blocks in the VM.

This change extends detection of catch-all try blocks to handle both
dynamic and Object as catch types.

Improves ParserCombinators benchmark with null safety 12x in JIT mode,
15x in AOT mode. This benchmark is now on par with legacy (pre-NNBD)
version.

Change-Id: I128aa1599d8a6f979fc2e8535d0f5c934bf3a5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157565
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-08-06 23:46:09 +00:00
Paul Berry fc7b79e5a9 Make NNBD and non-NNBD versions of non_abstract_class_inherits_abstract_member_test.dart
This is in preparation for working on external and abstract fields,
which will require introducing some NNBD-only tests to this file.

Change-Id: I2e1a77634aef0493d5e44edf88373deaa9acb6c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-08-06 23:33:59 +00:00
pq a2fdeaaa53 bump linter to 0.1.118
Change-Id: Id8277810091fbc3431131cb4182532c335d82773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157476
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-08-06 23:11:09 +00:00