Commit Graph

27924 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Alexander Markov 830b3d5f36 [front-end server] Remove obsolete --strong option
Corresponding cleanup in flutter tools:
https://github.com/flutter/flutter/commit/cf6a8d6a4727919436daed8444a273ea7ffe8d73

Cleanup in the flutter engine:
https://github.com/flutter/engine/commit/ddceed5f7af13531ec38d522916736c0e42e4619

Change-Id: Idbc2d42aeb53e461e48522cb961feca30de8f1cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124209
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-11-11 17:33:03 +00:00
Jens Johansen 96822518f9 [frontend_server] Add reproduction test of incremental serializer bug
Reproduction of https://github.com/flutter/flutter/issues/44384
and a few fixes to old tests.

Change-Id: I7c20721c34127a2b3fe4f56947b2cfc6465bd6f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124689
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-11 12:41:43 +00:00
Johnni Winther 4a661e19e2 [cfe] Remove type_promotion_look_ahead_listener.dart
This experiment isn't used.

Change-Id: I8a45283182e361f6fc69f586346e01913b83560a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124686
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-11 11:51:57 +00:00
Jens Johansen 12c92332f8 [CFE] Parser test can run scanner in non-nnbd-mode
Tests in the folder "non-nnbd" are run in non-nnbd mode.

Change-Id: I27c2acec93f729b76f024f12dcfb84f31903e0b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124688
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-11 11:43:07 +00:00
Karl Klose 684c456ffc [cfe] Remove reify runtime
Change-Id: I7f8ad03326cbdbf1e75bc3ced024f8b467f5892c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124687
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-11-11 11:15:57 +00:00
Jens Johansen 48f0b83ff2 [CFE] Allow ! in cascade
Fixes #39286.

Change-Id: I4e7270dacf7bc43accae4d45d26146cfb7d2b1ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124330
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-11 09:44:12 +00:00
Jens Johansen cf2a474438 [CFE] Fix incremental serialization bug caused by missing parameter passing
When implemention the incremental serializer, I forgot to pass it on in
the incremental kernel generators "IncrementalKernelGenerator.fromComponent"
and only did it in "IncrementalKernelGenerator", meaning that when using
"IncrementalKernelGenerator.fromComponent" the incremental serializer wasn't
used properly, namely nothing got invalidated.
Now it gets passed correctly, things get invalidated and everything should
be fine.

Fixes https://github.com/flutter/flutter/issues/44384.

Change-Id: Ic2e7f7330dc6ee62dd8e7bf6684d7bee8ee328bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124684
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-11-11 09:40:42 +00:00
Johnni Winther a7a54afbaa [cfe] Support failure log printing in unit_test_suites
Change-Id: Ibc0d81aaabcf2913ba97f242bbdc2d7968b1a5ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124682
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-11 08:31:52 +00:00
Stephen Adams 64e65a7dab [dart2js] new-rti: Use local in setting up type$
Saves 0.05% on CM. Should be slightly faster too - fewer tokens to
parse.

Change-Id: I9ce674525817e215e868a616729a465a60b8ef20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124468
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-11-09 02:11:28 +00:00
Mayank Patke 8f1be54906 [dart2js] New RTI: Improve normalization of is-tests.
Change-Id: I48e5a19af931dd2f76cceea6b5a9abb513d5fd39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124463
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-11-09 02:06:09 +00:00
Devon Carew be2866b9b1 [analyzer] update lib/crash_reporting.dart
Change-Id: Ie3b3ffc8a0e0351341f28ff26bbb3c82deb0b5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124640
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-11-08 23:29:58 +00:00
Nicholas Shahan 750a83b896 [dartdevc] Fix crash when source files contain non-UTF8 characters
* Treat the assertion condition offset as a character offset in the file.
* Allow unrecognized characters to be replaced by a placeholder character. This
  is unrelated to the fix but is just a precautionary measure.

Fixed: 39271
Change-Id: I4871ea41d3a46d26ecac5047265a1dbc1c889350
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124602
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-11-08 23:10:59 +00:00