Brian Wilkerson
ffbd2eb7ee
Address comments from an earlier CL
...
Change-Id: I6a47cb76e6babeea422791fb6b1887dd244c2f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-13 17:10:09 +00:00
Konstantin Shcheglov
7c71115b28
Remove unused type parameter from VariableMember.
...
R=brianwilkerson@google.com
Change-Id: I45858e91df5831c44fc8dbd4ed58d0d3527a7d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-13 15:29:48 +00:00
Robert Nystrom
cd22f16f0b
Fix crash when building //utils/dartdevc:dartdevc_kernel_sdk.
...
That build step still *fails* because of other static errors in the
migrated corelibs + patch files, but it no longer *crashes*.
Change-Id: Ia763a13bd45cecb148e02ce22d4ed2cc6fdfdfa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125002
Auto-Submit: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-11-13 10:34:29 +00:00
Johnni Winther
f443bc918e
[cfe] Add tests for inheritance from opt-out libraries
...
Change-Id: If139945dfdd808da0c24ac550ecfa235b41d3c23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123737
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-13 10:08:08 +00:00
Johnni Winther
6ed0fcaa12
[analysis_server] Remove last dependency on front_end+kernel
...
Change-Id: I0a8d1692ac1c8297bc7848a3f37fe97f8a8d3b29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123735
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-13 10:07:48 +00:00
Jens Johansen
2b94bd678d
[CFE] Fix renames from test to suite and move of parser
...
Change-Id: Ica6b0acd8fe6acd32b4a6776cb3203cef8ff7210
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124990
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-11-13 09:26:47 +00:00
Johnni Winther
d4f1512e00
[cfe] Support forEffect and readOnlyReceiver in IndexSet
...
Change-Id: I17aeac01ad4330fe873e7fe693fd2fd6e427d120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124986
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-11-13 08:50:57 +00:00
Siva Annamalai
082c10aab7
Revert "[VM/nnbd] Pass nullability when creating Class::DeclarationType."
...
This reverts commit ea57b1e62c .
Reason for revert: Please see https://buganizer.corp.google.com/issues/144304690
Original change's description:
> [VM/nnbd] Pass nullability when creating Class::DeclarationType.
>
> Passing nullability rather than forcing kLegacy helps slightly reduce the number
> of Types in the VM and in snapshots.
> This allows to remove the kludge about declaration type of Null being kNullable.
> Also pass nullability when creating a simple type may help.
>
> Note that CFE is still producing super types and some interface types that are
> non-nullable, even with nnbd features disabled. But this should get fixed and
> further reduce the number of types in the snapshot.
>
> Change-Id: I397f00902026ee5bc91d36328f4156427702efdb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124480
> Commit-Queue: Régis Crelier <regis@google.com >
> Reviewed-by: Alexander Markov <alexmarkov@google.com >
TBR=rmacnak@google.com ,alexmarkov@google.com ,asiva@google.com ,regis@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Icae0a69cda6cc531bba4d5d12471e7267a277340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125102
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-11-13 02:06:02 +00:00
Siva Annamalai
b4779e8f72
Revert "[VM/nnbd] Make Nullability and NNBDMode class enums to avoid name conflicts."
...
This reverts commit d45c3d15cb .
Reason for revert: Please see https://buganizer.corp.google.com/issues/144304690
(This CL is dependent on https://dart-review.googlesource.com/c/sdk/+/124480 which caused the regression).
Original change's description:
> [VM/nnbd] Make Nullability and NNBDMode class enums to avoid name conflicts.
>
> Change-Id: Ic78d3f48964bb61cbd1d90a69fcd68b4f29071e4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124587
> Commit-Queue: Régis Crelier <regis@google.com >
> Reviewed-by: Alexander Markov <alexmarkov@google.com >
TBR=alexmarkov@google.com ,regis@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I24603236f04bd2ec1ad80789d78cca89e70fb1d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125101
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-11-13 02:01:44 +00:00
Siva Annamalai
82aa7e79af
Revert "[VM/nnbd] Force the DeclarationType of a class to have legacy nullability."
...
This reverts commit 3771dddf43 .
Reason for revert: see https://buganizer.corp.google.com/issues/144304690
(This CL is dependent on https://dart-review.googlesource.com/c/sdk/+/124480 which caused the regression).
Original change's description:
> [VM/nnbd] Force the DeclarationType of a class to have legacy nullability.
>
> This is a workaround to avoid caching a non-legacy type (possibly provided
> by the CFE) as the canonical type of a non-generic class and later returned as
> the runtime type of an instance of this class.
>
> Hopefully fixes https://buganizer.corp.google.com/issues/144304690
>
> Change-Id: Iaea364b9b743b05bde600f0aa784d5a8105728d7
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124920
> Reviewed-by: Alexander Markov <alexmarkov@google.com >
> Commit-Queue: Régis Crelier <regis@google.com >
TBR=rmacnak@google.com ,alexmarkov@google.com ,asiva@google.com ,regis@google.com
Change-Id: If8b2671f3cf4b0d080ba9f0472738326fec701d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125100
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-11-13 01:55:18 +00:00
asiva
a7472ba4c6
Cache value of "non-nullable" flag so it can be used in the VM code without having to search through the array of experimental flags array.
...
Change-Id: I297dca48711ef2bdd80a102086dea1bb075ea357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125081
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2019-11-13 01:40:36 +00:00
Paul Berry
8938a5ed2d
Migration: make an edge origin for assignments of dynamic.
...
Change-Id: I75d037aa7ee890488a92e113f58094b5733a9b8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125004
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-11-13 00:27:32 +00:00
Konstantin Shcheglov
c9ef7cc5e3
Deprecate Member.baseElement, use Element.declaration in analyzer.
...
Change-Id: I91d23558c7d0bd8ffa2e251e5d615d4e026923b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124940
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 22:35:07 +00:00
Paul Berry
3793a40e6a
Migration: stop using always for decorating the type of explicit nulls.
...
Change-Id: I950c9b8e80bc647c5a42b5cb5c66babd7c4d41e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125008
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-11-12 22:19:16 +00:00
Paul Berry
12265c4e42
Hacky prototype of how to fix the seventh item from #39247
...
The issue is:
lib/src/logger.html, line 107, inserted !:
In this case the single reason detail reads "node with no info (type(2171))" with no destination.
The problem is that InstrumentationInformation.nodeInfoFor is only
considering a limited set of possible sources of nullability nodes
(the primary nodes of decorated types passed to the instrumentation
listener methods `implicitReturnType`, `implicitType`, and
`implicitTypeArguments`). It needs to also consider decorated types
passed to `explicitTypeNullability`, `externalDecoratedType`, and
`externalDecoratedTypeParameterBound`, and it needs to walk these
decorated types recursively to discover all the nodes they point to.
Additionally, the logic in InstrumentationInformation.nodeInfoFor is
inefficient; it walks through all the implicit types in every source
file, which means that it is O(N) in the size of the code being
migrated. Since it is called O(N) times, this is an overall runtime
complexity of O(N^2).
I've prototyped a possible fix using an expando to compute
NodeInformation for each node once at the time it's reported to
instrumentation. This is incomplete and intended as a starting point
for discussion. Work that still needs to be done:
- We don't produce a sensible description string for nullability nodes
associated with AST nodes, so we present unhelpful text to the user
like "A nullable value can't be used as the explicit type ???"; it
would be nicer to say something like "A nullable value can't be used
as positional argument 0 of Level.>=". We may want to consider
modifying the instrumentation API to make it easier to generate a
useful string here.
- I haven't verified that the description string we produce for
external decorated types is helpful.
- I haven't verified that the we produce a useful link for external
decorated types.
- We should probably get rid of the data structure
NodeInformation.explicitTypeNullability (which has similar
inefficiencies) and change over code that was using it to use the
new approach.
Change-Id: I2cf2fe47cd70d7e5cc6e3da309851288668e8a62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124902
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 22:18:01 +00:00
Kallen Tu
d5d889668b
[analyzer] Added variance support for upper/lower bounds.
...
Change-Id: I64f44a7068c6caa222787ccb7dfbb3ed8b5fd0fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124420
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2019-11-12 22:10:56 +00:00
Kallen Tu
a65aff122d
[analyzer] Changed subtype checking for variance modifiers.
...
Change-Id: I9fa65e13d2f8611acc50fd133029c76666b8f452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123559
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 22:09:56 +00:00
Konstantin Shcheglov
a520e771f6
More subtyping tests.
...
R=brianwilkerson@google.com
Change-Id: I078639191f3574cba7baaa49bfb4330f0b35c206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-12 22:00:49 +00:00
Mike Fairhurst
942419e6ba
[analysis_server] Funnel sendServerErrorNotification through logException
...
Change-Id: I266a8b3c404da8c9892aa6e1a49e1f1c9bdcf530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-11-12 21:45:24 +00:00
Mike Fairhurst
26cabb72c3
[analyzer] Add [SilentException] where previously not reported to users.
...
New errors *not* changed to silent exceptions:
https://dart-review.googlesource.com/c/sdk/+/123328/9/pkg/analyzer/lib/src/dart/sdk/sdk.dart
https://dart-review.googlesource.com/c/sdk/+/123328/9/pkg/analysis_server/lib/src/analysis_server_abstract.dart
These seem worth keeping.
Change-Id: I534b07f6cf50c5b251867b647ed6df96a9134c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-11-12 21:37:49 +00:00
Devon Carew
d355778418
[analyzer] rate limit the crash reports we send
...
Change-Id: I9f6af7fbcec653a2a9396d1098bea678777d4b3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124761
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2019-11-12 21:37:22 +00:00
Sam Rawlins
0b210e5e81
strict inference should not complain about top-level setter return types
...
Fixes https://github.com/dart-lang/sdk/issues/39250
Change-Id: I9f9ddc7ce484cc4ee0e9bbf2a7b2c673f6ad4e7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124520
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 21:25:43 +00:00
Konstantin Shcheglov
ab7bceb622
Ensure that Member(s) are not created around Member(s).
...
Change-Id: I11505dcfcbaa51488d4bb2f8ab541b5599d36edb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 21:00:14 +00:00
Sam Rawlins
b3d52df66d
Remove undetected unused field in CreateAllSummariesVisitor
...
This will be detected with https://dart-review.googlesource.com/c/sdk/+/124521
Change-Id: I33f2c9f3d20eabb98de4066a03aae94165018071
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125040
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Auto-Submit: Samuel Rawlins <srawlins@google.com >
2019-11-12 20:26:54 +00:00
Leaf Petersen
158559bc03
Changelog update for extension method prefix change.
...
Change-Id: I530e8c0c704da41c49b12a20a7843ecd5e40abb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124941
Reviewed-by: Michael Thomsen <mit@google.com >
2019-11-12 18:19:44 +00:00
Brian Wilkerson
2563a1b2ac
Add an option to dartfix to specify the SDK used by analysis
...
Change-Id: Iaa0d37e3db9ecea4a577c4d6155362d5cd8ce2d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124842
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 17:53:01 +00:00
Brian Wilkerson
667f77ed60
Add an http server for the interactive preview mode
...
Change-Id: I727cc2b3d393b426f09a06e7b89c115864581962
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124760
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2019-11-12 17:39:22 +00:00
Liam Appelbe
2a9af7d953
[vm] Late modifier for non-final static fields.
...
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I8e6feef2c0ee8021bec2f849e9729516532ca91a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124641
Commit-Queue: Liam Appelbe <liama@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2019-11-12 17:27:39 +00:00
Régis Crelier
3771dddf43
[VM/nnbd] Force the DeclarationType of a class to have legacy nullability.
...
This is a workaround to avoid caching a non-legacy type (possibly provided
by the CFE) as the canonical type of a non-generic class and later returned as
the runtime type of an instance of this class.
Hopefully fixes https://buganizer.corp.google.com/issues/144304690
Change-Id: Iaea364b9b743b05bde600f0aa784d5a8105728d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124920
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Régis Crelier <regis@google.com >
2019-11-12 16:26:29 +00:00
Paul Berry
024a4b2999
Remove unused import
...
Change-Id: Ie516c3785fea1d26d762629a497bb5de2c935cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2019-11-12 16:09:28 +00:00
Konstantin Shcheglov
3bde76208d
Fix for AstBinaryFlags.hasQuestion
...
R=brianwilkerson@google.com
Change-Id: I3b971310aa62955b61089166d059a44eb02eee69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-12 15:20:39 +00:00
Brian Wilkerson
63c67a6768
Ignore zero length regions in the preview tool
...
The zero length regions are being produced when server indicates that
navigation ought to target an unnamed constructor, a closure, a library,
or any other unnamed element. This might be a bug in server's navigation
support, but I don't want to have to fix that before the preview tool
can be used in a UX study.
Change-Id: I35c9978d38937006ee00d76516f3ee607fca6850
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124860
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-11-12 14:34:28 +00:00
Aske Simon Christensen
5cce1e4acd
Reland "[vm] Remove obsolete kernel constant expression evaluator."
...
Change-Id: I8a822afb99a72adf5a47643807c9bc3be5b2e811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124693
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2019-11-12 12:32:08 +00:00
Jens Johansen
7ebc820ffc
[CFE] Also guard _extensions for LazyScope
...
Change-Id: Iaf55ad1602d6c6f70cc56899114e668de199c471
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124982
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-11-12 12:06:58 +00:00
Clement Skau
a196d68145
Revert "[vm, front-end server] Cache generated bytecode using separate file"
...
This reverts commit 86641d07ae .
Reason for revert: Appears to break Flutter 3H:
- https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8897037674557388176/+/steps/flutter_test_framework_coverage/0/stdout
- https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8897037674557388176/+/steps/flutter_test_framework_tests/0/stdout
- https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8897037674557388176/+/steps/flutter_test_hostonly_devicelab_tests/0/stdout
Original change's description:
> [vm, front-end server] Cache generated bytecode using separate file
>
> Previously, generated bytecode was cached using metadata in kernel AST.
> When serializaing kernel AST (for subsequent compilations) incremental
> serialization was not used, so AST serialization was considerably
> slower in bytecode mode compared to non-bytecode mode.
>
> Apparently, metadata is not compatible with incremental serialization
> (https://github.com/dart-lang/sdk/issues/39302 ).
>
> This change reimplements caching of generated bytecode using a separate
> 'foo.dill.cache' file near the generated 'foo.dill' and 'foo.dill.ast'.
> AST is now written using incremental serialization both in bytecode
> and non-bytecode modes.
>
> flutter_test_performance benchmark:
>
> AST mode:
>
> "without_change_elapsed_time_ms": 2615-2652,
> "implementation_change_elapsed_time_ms": 6292-6394,
> "interface_change_elapsed_time_ms": 6183-6484,
> "with_coverage_time_ms": 2723-2834
>
> Bytecode mode, before this change:
>
> "without_change_elapsed_time_ms": 3246-3295,
> "implementation_change_elapsed_time_ms": 7998-8068,
> "interface_change_elapsed_time_ms": 7899-8029,
> "with_coverage_time_ms": 3316-3378
>
> Bytecode mode, after this change:
>
> "without_change_elapsed_time_ms": 2689-2737,
> "implementation_change_elapsed_time_ms": 7630-7677,
> "interface_change_elapsed_time_ms": 7724-7917,
> "with_coverage_time_ms": 2841-2949
>
> Change-Id: I603d33f49949146cf6620226d810f2f3cb9853a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124592
> Reviewed-by: Ryan Macnak <rmacnak@google.com >
> Commit-Queue: Alexander Markov <alexmarkov@google.com >
TBR=rmacnak@google.com ,alexmarkov@google.com
Change-Id: Ib433b68b7de3b08179c9c080a10f62703cd2546d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124983
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Clement Skau <cskau@google.com >
2019-11-12 11:11:10 +00:00
Jens Johansen
b2fa458f3d
[CFE] Support experiments in the incremental compiler tests
...
Change-Id: I36b7152abc0a9281801d2e1a5e68588d8c0e93a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124981
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-11-12 09:32:08 +00:00
Alexander Markov
da561313c6
[vm/bytecode] Erase promoted bounds of type parameter types
...
Promoted bounds are not reified and don't make any difference at run
time. However, promoted bounds are taken into account when comparing
DartType nodes (since 75dc8483ab ).
As a result, types which are different only in promoted bounds are
treated as not equal and reusing of type arguments doesn't work for
such types, which results in failed assertions in the VM.
The solution is to erase promoted bounds from type parameter types in
bytecode generator.
Fixes https://github.com/dart-lang/sdk/issues/39240
Change-Id: Ifc39592aa4e87d6273dd7ccf3129a381791609ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124900
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-11-12 00:44:39 +00:00
Ryan Macnak
be6e5d8717
[vm] Try to symbolize Dart frames on crash or assertion failure when there is an exit frame.
...
Remove disabled/broken symbolization based on heap iteration.
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=41154
Change-Id: I5e6644e6ef72177cefec920fbe653000a4868f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124826
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-11-11 23:56:00 +00:00
Brian Wilkerson
804706c026
Represent variance as an object rather than an integer
...
This has at least three advantages:
- Type safety. Only a valid variance value can ever be passed in to any
of the methods.
- Encapsulation. If we ever need to change the representation of
variance it will only need to be done in one place.
- Brevity. Much of the code is shorter and easier to read.
Change-Id: I82756f48aedd09232e9b8cdda155da83793a155f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124580
Reviewed-by: Kallen Tu <kallentu@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-11-11 23:27:19 +00:00
Liam Appelbe
782b048625
Bump the ABI version
...
Change-Id: I1d691f3814ab7b3161802242e6ce09d26f97bc9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124840
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Liam Appelbe <liama@google.com >
2019-11-11 23:05:49 +00:00
Nicholas Shahan
a26f8402e5
[dartdevc] Branch the logic for FutureOr type tests when NNBD is enabled
...
Creates a baseline for the next change to show the new behavior in a small diff.
Change-Id: Ic44ae702b677880ab245c4ae6abd799831cc4d87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124287
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2019-11-11 22:34:08 +00:00
Konstantin Shcheglov
f9969cca58
Add Element.declaration to unify elements and members.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I278a97a6d1e386c6cca61e4579d47ef6a07f0ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-11 22:23:07 +00:00
Alexander Markov
b4ab28fef1
[vm/bytecode] Do not declare receiver variable in closures
...
While 'this' variable (receiver) is in scope in closures inside
instance methods, closures do not take it as a parameter and they
shouldn't declare a local variable for receiver unless it's captured.
Fixes https://github.com/dart-lang/sdk/issues/38743
Fixes https://github.com/dart-lang/sdk/issues/39285
Change-Id: Ic5c735fd50457a5fb39acb3ec3590964e4dddba3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124825
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-11-11 21:51:57 +00:00
Alexander Markov
cd6dbad074
[front-end server] Cleanup --strong in test/frontend_server_flutter.dart
...
This is the follow-up for the cleanup of --strong option in front-end
server (https://dart.googlesource.com/sdk/+/830b3d5f36408c9d4c594a9a8acee53197b0ae94 ).
Change-Id: I73b72b96361db92d48a041d732dd8b17f8fb8ee9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124820
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-11-11 20:22:18 +00:00
Konstantin Shcheglov
6cde7ce224
Deprecate synthetic FunctionTypeImpl constructor.
...
Change-Id: I7c2f834d7e9e532709b3d43b348e7588be659af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124595
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-11 19:38:53 +00:00
Alexander Markov
86641d07ae
[vm, front-end server] Cache generated bytecode using separate file
...
Previously, generated bytecode was cached using metadata in kernel AST.
When serializaing kernel AST (for subsequent compilations) incremental
serialization was not used, so AST serialization was considerably
slower in bytecode mode compared to non-bytecode mode.
Apparently, metadata is not compatible with incremental serialization
(https://github.com/dart-lang/sdk/issues/39302 ).
This change reimplements caching of generated bytecode using a separate
'foo.dill.cache' file near the generated 'foo.dill' and 'foo.dill.ast'.
AST is now written using incremental serialization both in bytecode
and non-bytecode modes.
flutter_test_performance benchmark:
AST mode:
"without_change_elapsed_time_ms": 2615-2652,
"implementation_change_elapsed_time_ms": 6292-6394,
"interface_change_elapsed_time_ms": 6183-6484,
"with_coverage_time_ms": 2723-2834
Bytecode mode, before this change:
"without_change_elapsed_time_ms": 3246-3295,
"implementation_change_elapsed_time_ms": 7998-8068,
"interface_change_elapsed_time_ms": 7899-8029,
"with_coverage_time_ms": 3316-3378
Bytecode mode, after this change:
"without_change_elapsed_time_ms": 2689-2737,
"implementation_change_elapsed_time_ms": 7630-7677,
"interface_change_elapsed_time_ms": 7724-7917,
"with_coverage_time_ms": 2841-2949
Change-Id: I603d33f49949146cf6620226d810f2f3cb9853a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124592
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-11-11 19:32:53 +00:00
Régis Crelier
b5110a59a9
Revert "[vm/async] Don't add an <asynchronous suspension> marker along sync-async calls."
...
This reverts commit f4d930997b .
Reason for revert: Different tests are failing on different bots.
Original change's description:
> [vm/async] Don't add an <asynchronous suspension> marker along sync-async calls.
>
> This fixes `package:stack_trace` in the sync-start case of async/async* calls.
>
> Change-Id: I5c41a35283439f533ab19c9fd1cc542931de4b43
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124560
> Commit-Queue: Samir Jindel <sjindel@google.com >
> Reviewed-by: Martin Kustermann <kustermann@google.com >
TBR=kustermann@google.com ,sjindel@google.com
Change-Id: Ib3e1b303613f0393dac6b1b81e8d1ffb322052b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124800
Reviewed-by: Régis Crelier <regis@google.com >
Commit-Queue: Régis Crelier <regis@google.com >
2019-11-11 19:03:54 +00:00
Konstantin Shcheglov
263ac017be
Use standard Set in LegacyTypeAsserter.
...
All types now use nullability in their `==` implementations.
R=brianwilkerson@google.com
Change-Id: Icb9050428d274d4a94060671709f59ff67927fce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-11 18:11:43 +00:00
Nicholas Shahan
c98df62dd0
[CFE] Add comments to clarify source encoding and offsets
...
I mistakenly thought the offset would be the location in the List<int> source.
Hopefully these comments will prevent confusion in the future.
See:
* https://dart-review.googlesource.com/c/sdk/+/124602
* https://github.com/dart-lang/sdk/issues/39271
Change-Id: Iba47b477d085c2a133ccd9aca645fe10906368bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124591
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2019-11-11 17:58:23 +00:00
Mark Zhou
1d6584720b
Migrating DDC dart:developer patch files.
...
Change-Id: I99fb8004433ac0b518c6da23dfb7d73d2a30e769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124421
Reviewed-by: Erik Ernst <eernst@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2019-11-11 17:43:23 +00:00