Konstantin Shcheglov
13a24f4de1
Issue 42474. Add LibraryElement.languageVersion
...
Bug: https://github.com/dart-lang/sdk/issues/42474
Change-Id: I316f34b14f01daa517182c1cb7b7c3fb038f0be2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152601
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-25 23:54:03 +00:00
Sam Rawlins
d022d4c9e1
Migrator: Fix if-null promotion with GLB
...
Fixes https://github.com/dart-lang/sdk/issues/42375
EdgeBuilder wishes to do its own GLB type-joining, as does FlowAnalysis.
When FlowAnalysis pushes a promotion in ifNullExpression_rightBegin,
and then in write, and then pops those two promotions to join them in
ifNullExpression_end, EdgeBuilder is not given a chance to make its
own GLB node. Instead promotion never happens: the DecoratedType which
is the variable's type is promoted to non-nullable, for the left side.
The DecoratedType for the right side expression is not considered
non-nullable, so the FlowAnalysis.join will always fail to promote.
TypeOperations.adjustPromotedTypes solves this. It is a no-op in all
implementations except in EdgeBuilder.
Additionally FlowAnalysis.write's promotion fails for the same reason:
the only type of interest is the declared type made non-nullable, and
no matter what, the writtenType is not a subtype of this.
TypeOperations.forcePromotion solves this. It is a no-op in all
implementations except EdgeBuilder.
Change-Id: Iba6b9a69583af8fe1aa23124c7d66047acfff495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152104
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-06-25 21:09:12 +00:00
Konstantin Shcheglov
616ed353a2
Rename / deprecate FileResolver methods.
...
R=keertip@google.com
Change-Id: I684465db327f5f448a95f57a18cf65e172c09b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152603
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-25 20:59:32 +00:00
Brian Wilkerson
898f2cc6c7
Remove extraneous references to the virtual annotation
...
Change-Id: I9361d030ffa9aabeb8c4253553c04d356fc7ff45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-25 17:04:42 +00:00
Konstantin Shcheglov
52d16dfbba
Resolve only relevant portion of the file for Cider completion.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: Icf23a79f25baf309f88b737ac061a10a655d2f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152407
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-25 01:02:41 +00:00
Konstantin Shcheglov
2ec47ad273
Use ElementKind.ENUM for enums.
...
There was a crash internally, caused by the fact that when we have
duplicate name for class and enum, during linking we put them into
different Reference bucket - @class and @enum, and also inside
the class, the reference to its name is the class.
But when we resolve, we check equality of elements using not
references, but locations. So, we need to make sure that their
kinds are also different, so go into different bucket, and so
not equal.
When they are InterfaceType and equal, we would try to match
type arguments against the wrong number of type parameters and crash.
Change-Id: Iee3f8691adac65d4b0395ceec7fc7250f96afa88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-25 00:20:31 +00:00
Brian Wilkerson
ff83b0fec9
Add support for navigating from the URI in import and export configurations to the referenced file
...
Change-Id: Ic6234d9a24dcb52228067b20d69277e47ff89a0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152401
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-24 22:46:33 +00:00
Konstantin Shcheglov
a1078d23c0
Remove the return type for inferring FunctionExpression formal parameters.
...
Change-Id: I5d1ae6b5f563ccbebf01c224d2dec439f0d6986e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-24 16:15:51 +00:00
Konstantin Shcheglov
77b0817f35
Deduplicate computing getter/setter types in override inference.
...
Change-Id: If800970fca69d0a85d3a23fd3dc4abb5b9b6bb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152209
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-24 16:15:42 +00:00
Jens Johansen
4291a81a02
Add 'alternative-invalidation-strategy' as an experiment
...
To be used to enable the alternative invalidation strategy for
incremental compilation.
Change-Id: Ie4b140825d90f98aed8209eb3a5da8f2fa4dc192
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150341
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-06-24 07:18:41 +00:00
Konstantin Shcheglov
05167f3b63
Clean up isUnnecessaryCast() and many of its tests.
...
Change-Id: I74c509aa43fa7e8850b6e2026c570606a8cb18e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-24 05:16:01 +00:00
Konstantin Shcheglov
59b2bc0cdd
Clean up matching type parameters in FunctionExpressionResolver.
...
R=brianwilkerson@google.com
Change-Id: I4ad140fc76e65e7af4cd2e849e2d9e9aac68e9ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152205
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-23 22:42:45 +00:00
Konstantin Shcheglov
6a46af25d1
Fix UNUSED_LOCAL_VARIABLE in UnnecessaryCastTest.
...
R=brianwilkerson@google.com
Change-Id: Iff17cb9c3708b8dfa10c7d9911c42eeccb87b2d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152204
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-23 21:55:35 +00:00
Konstantin Shcheglov
16a64f0bde
Check for PackageBuildPackageUriResolver in SourceFactory.packageMap
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/2558
Change-Id: I3270918320a9a15ca3175101da0337145179f6ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-23 21:48:13 +00:00
Konstantin Shcheglov
6b630c3719
Enabled allowed experiments for the whole package, including bin/ and test/.
...
Change-Id: I617b80f0ea6a182d6e48eeb731c89cd5659cb567
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-23 18:30:23 +00:00
Brian Wilkerson
1d64ba0429
Merge 4 diagnostics for the purpose of documentation
...
Change-Id: I7e7a50ad924af9d200333d2d1640e3f8cd97a88f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151873
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-23 17:46:02 +00:00
Brian Wilkerson
ab73158758
Fix the windows bot and update MockSdk
...
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.
Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-06-22 14:34:25 +00:00
Brian Wilkerson
197308560a
Add documentation for more diagnostics
...
Change-Id: Ib63182c67dfa0bef475871aa2104811c3a44dac6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151882
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-06-19 20:46:32 +00:00
Konstantin Shcheglov
67173ade40
Record performance for analysis operations.
...
R=brianwilkerson@google.com , keertip@google.com
Change-Id: Ib85680d37f36c9a34f61b8d215a68ed2bd71f8d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-19 20:15:35 +00:00
Konstantin Shcheglov
69843a8f04
Record performance with CiderOperationPerformance hierarchy.
...
This does not include breakdown for resolution yet.
I wonder if this more general information could replace specialized
CiderCompletionPerformance fields 'resolution', 'suggestions', etc.
WDYT?
R=brianwilkerson@google.com , keertip@google.com
Change-Id: I4685dc2a8de8028ce84cc2640943f45c8cf047e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151811
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2020-06-19 17:33:03 +00:00
Sam Rawlins
9239061138
Analyzer: Improve message of implicit_this_reference_in_initializer
...
Fixes https://github.com/dart-lang/sdk/issues/37293
Change-Id: I4b621171dcaf618e97c62acd110ce7c911e6c9e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151425
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-06-19 13:40:43 +00:00
Konstantin Shcheglov
62cc07dbca
Issue 42385. Fix for analyzing 'prefix?.foo'.
...
Bug: https://github.com/dart-lang/sdk/issues/42385
Change-Id: I4dabfbda01a37210c57cb5ba6b5a7d530752e029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151628
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-18 21:22:42 +00:00
Konstantin Shcheglov
e51c40158e
Extend buildSdkSummary() to accept 'embedderYamlPath' for Flutter SDK summary.
...
Bug: https://github.com/dart-lang/build/issues/2713
Change-Id: I75f8b5f5a4251dc1a917f3a19d30290eea4ec1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149883
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-18 18:50:06 +00:00
Sam Rawlins
10c5c113f3
Analyzer: Allow factory const ctor with non-const final fields
...
Fixes https://github.com/dart-lang/sdk/issues/36315
Change-Id: I010d4d6e855e243931f34e9dc55d537551dc9cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151661
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-18 18:17:06 +00:00
Konstantin Shcheglov
cd360dee2a
Non-nullify types during inheritance inference.
...
Change-Id: I97567a6d77e2afdbc995d7561d87baabaae5abfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151634
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-18 17:14:41 +00:00
Konstantin Shcheglov
60bb0d3a41
Separate current and to restrict FeatureSet(s) in scanner.
...
Bug: https://buganizer.corp.google.com/issues/159207726
Change-Id: I41b4c79590dccd05d8b0fa42d296f00a3c3ee229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-17 23:32:31 +00:00
Konstantin Shcheglov
2fe40ad6ed
Move ConstantAnalysisErrorListener to linter context.
...
R=brianwilkerson@google.com
Change-Id: I14774bfaad95c5afb1498462559341fcf5b3b1db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-17 22:45:51 +00:00
Konstantin Shcheglov
327304cb59
Issue 42356. Report constant errors for arguments in constant instance creations.
...
Bug: https://github.com/dart-lang/sdk/issues/42356
Change-Id: I674878c12b82af229d70e7a6eca5cd662ec29394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151623
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-17 21:49:55 +00:00
Paul Berry
82750c58f7
Update toList in analyzer's mock SDK
...
Fixes #42327 .
Change-Id: Iecab55d0c97d439de02ac63ba53a0511532c773f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151560
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2020-06-17 17:20:57 +00:00
Konstantin Shcheglov
9468ba063e
Non-nullify types when inferring types of top-level variables and fields.
...
Change-Id: Id272958725d582892aa9cacdddbb5cde89793bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-17 05:15:10 +00:00
Konstantin Shcheglov
d279cb47b5
Enforce sorting in analyzer/.
...
Change-Id: If7e76e442e64cd4991b80c3993e3da10bb3a19ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-17 05:04:30 +00:00
Konstantin Shcheglov
021a49e88c
Update the way to get feature set and language version.
...
https://github.com/dart-lang/sdk/issues/42274
https://github.com/dart-lang/sdk/issues/42321
Change-Id: I5551ecd2803f9d26e720e5cf5671b3be8236bce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-16 19:05:43 +00:00
Konstantin Shcheglov
7f6b0d82eb
Issue 42337. Report BODY_MIGHT_COMPLETE_NORMALLY for factory constructors.
...
Bug: https://github.com/dart-lang/sdk/issues/42337
Change-Id: I9209d7bf519ec61026ffe22bb05145e776e8517d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 23:46:38 +00:00
Konstantin Shcheglov
18b753cbcd
Support for null-aware ExtensionOverride.
...
Bug: https://github.com/dart-lang/sdk/issues/41780
Change-Id: Ib5d11000847434c679df1ec882ee6d9777670fe0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151097
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 23:45:08 +00:00
Konstantin Shcheglov
f2fafcd440
Extract and reuse EnclosingExecutableContext.displayName
...
Change-Id: If411305b7484e59b234366b656d07d2235e6513d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151305
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 20:16:16 +00:00
Jaime Wren
920ddae937
Re-write of the computation of the context type for code completion. Instead of passing a parent and child node, a parent node with an offset is passed. The primary purpose of this change was to fix a bug with argument lists which is close to being fixed.
...
I will follow up with some additional fixes and tests for map and list literals.
Change-Id: I1a26e8f900dcf13402385a49e8f3538c5d1b39df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151030
Commit-Queue: Jaime Wren <jwren@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-15 18:19:42 +00:00
Konstantin Shcheglov
48f2d10d3e
Deprecate ClassElement.hasReferenceToSuper
...
Change-Id: Ie94d8e2b0be6ccb30c7ca59c80da2832cfed3689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151168
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 17:45:06 +00:00
Konstantin Shcheglov
b7efcd276c
Report NO_COMBINED_SUPER_SIGNATURE.
...
https://github.com/dart-lang/language/pull/975
Change-Id: I8ecd191efa84f17d36ea09ef1db33a401c67fda3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151093
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-15 17:42:45 +00:00
Sam Rawlins
28231a790b
Analyzer: regenerate diagnostics.md
...
Change-Id: If0d916b01d802fbdf614ee031f240094fb077931
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151167
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-15 17:24:35 +00:00
Sam Rawlins
294a2cffd1
Analyzer: print constructor name when constructor returns invalid type
...
Fixes https://github.com/dart-lang/sdk/issues/27387
Change-Id: I8ce81bab4c4601c5157977d3f43f73903dae7f8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151200
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-15 13:52:56 +00:00
Sam Rawlins
b0d4c359d8
Move tests for 4 codes to diagnostics directory.
...
Also add some tests for function-typed field formal parameters.
Change-Id: Ia6cb23c15e695a540ac3c6df0a7af8110a8fc1f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-06-14 22:12:07 +00:00
Sam Rawlins
32a93e2147
Analyzer: Remove error on class-used-as-mixin referencing super
...
Fixes https://github.com/dart-lang/sdk/issues/34806
Change-Id: I1cfd0b9c0699734b172aa62f7a04ab533a6cd03f
Fixed: 34806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151099
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-06-13 15:11:25 +00:00
Brian Wilkerson
c22dc20a93
Use the const-ness of an element when completing in a const context using available declarations
...
Change-Id: Ia950ad81ed571cbcf1f0060da0cba26406206ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151031
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2020-06-12 22:15:55 +00:00
Konstantin Shcheglov
fda4238285
During linking, resolve initializers of constant variables with flow analysis.
...
Change-Id: I6189cdf86f0e285883da769ceb0b36d6ee85588c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-12 19:40:18 +00:00
Konstantin Shcheglov
24852421e2
Change method override inference to use combined member signature.
...
https://github.com/dart-lang/language/pull/975
Change-Id: I5cec14a384b124a29dcd5adac0f0be6e5214cc9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-12 18:59:28 +00:00
Sam Rawlins
56dbe294f2
Analyzer: Do not report const constructors with mixed in synthetic fields
...
Fixes https://github.com/dart-lang/sdk/issues/37810
Also report the offending fields in the error.
Change-Id: I8328bf5f16f56f1b70bbe4bdb7623ade6f11943c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151027
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-06-12 16:24:35 +00:00
Daco Harkes
6544c69e23
[vm/ffi] Convert Objects to Dart_Handles in FFI calls
...
This includes support for calling Dart_PropagateError in native code
when doing FFI calls, and catching uncaught exceptions with Dart_IsError
when doing FFI callbacks.
The support for Dart_PropagateError adds a catch entry to the FFI
trampoline, which prevents inlining these trampolines in AOT. This
regresses the FfiCall benchmarks by 1-2% in AOT.
In addition, Dart_PropagateError requires maintaining a bit whether we
entered native/VM code from generated code through FFI or not. That way
we can do the proper transition on the exception path. When entering
generated code, we store this bit on the stack, right after the entry
frame.
Design: http://go/dart-ffi-handles
Issue: https://github.com/dart-lang/sdk/issues/36858
Issue: https://github.com/dart-lang/sdk/issues/41319
Change-Id: Idfd7ff69132fb29cc730931a4113d914d4437396
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145591
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-06-12 11:14:22 +00:00
Sam Rawlins
9f6c372228
Analyzer: forward const constructors to mixin apps as const
...
Fixes https://github.com/dart-lang/sdk/issues/41072
Relevant text from spec:
> If $S_q$ is a generative const constructor, and $MC$ does
> not declare any instance variables, $C_q$ is also a const
> constructor.
Relevant language tests:
language_2/mixin_constructor_forwarding/const_constructor*
Change-Id: I8ad9e9dd3907b5dd29aa8f10aab6ec604a1aaa4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150682
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2020-06-11 21:05:29 +00:00
Konstantin Shcheglov
1ce143cfc1
Issue 42278. Null-nullify types after function expression inference, not the context type.
...
Bug: https://github.com/dart-lang/sdk/issues/42278
Change-Id: I40abcb6e7e97ef4f3993da65a21dffbdbc1f483a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-11 20:39:59 +00:00
Konstantin Shcheglov
ccc39d5798
For FunctionExpression inference check for null subtype explicitly.
...
Change-Id: Ie724d8227c2e5bade8924d0d8e25b00ac0b9367e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151001
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2020-06-11 20:32:58 +00:00