Dmitry Stefantsov
7ea2dfad20
[kernel] Add ability to (de)serialize DirectPropertySet
...
Change-Id: I769941faa7b80eddb5a9c52f250191dca6c9ecd3
Reviewed-on: https://dart-review.googlesource.com/c/89527
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2019-01-18 13:15:44 +00:00
Dmitry Stefantsov
50c06c55ba
[kernel] Add ability to (de)serialize DirectPropertyGet
...
Change-Id: Ie75b45601f898a8286c72e97e11e7c08b64c00e8
Reviewed-on: https://dart-review.googlesource.com/c/89526
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2019-01-18 13:15:44 +00:00
Dmitry Stefantsov
793fbc0d4a
[kernel] Add ability to (de)serialize StaticSet
...
Change-Id: I1efa620f4dfad37f4cbcbca94e9fa12ca7bfd752
Reviewed-on: https://dart-review.googlesource.com/c/89586
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2019-01-18 13:15:44 +00:00
Peter von der Ahé
b0017d758c
Refer to correct locations in SDK (and other dill files)
...
Fixes https://github.com/dart-lang/sdk/issues/35559
Fixes https://github.com/dart-lang/sdk/issues/35558
Change-Id: I902273759c6d3076779ccf120a79fd972d939827
Reviewed-on: https://dart-review.googlesource.com/c/90181
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2019-01-18 12:37:24 +00:00
Kevin Millikin
c9a55b437a
[Kernel] Remove the dedicated fromEnvironment constants
...
These can be represented as an unevaluated static invocation.
Change-Id: Ib827345f1f65a09f1a856eae33366722a2e613d2
Reviewed-on: https://dart-review.googlesource.com/c/90008
Commit-Queue: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2019-01-18 10:10:42 +00:00
Peter von der Ahé
1a0367a373
Create test which demonstrates issues 35558 and 35559
...
Change-Id: I521ea3f7cf8d02f9e23edc1a9775fbd65bf64e4a
Reviewed-on: https://dart-review.googlesource.com/c/90180
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2019-01-18 09:44:18 +00:00
Dmitry Stefantsov
6205d7e82c
[kernel] Add ability to (de)serialize StaticGet
...
Change-Id: I8593c38c38f7aa4a9b8d573516681158db7f670c
Reviewed-on: https://dart-review.googlesource.com/c/89546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2019-01-18 09:31:06 +00:00
Dmitry Stefantsov
e529988474
[kernel] Rename ScopedReference to ScopedUse
...
Change-Id: Ie18096e1bbeb6fcf7d638838cfd96627fb07b1af
Reviewed-on: https://dart-review.googlesource.com/c/89545
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
2019-01-18 09:31:06 +00:00
Dmitry Stefantsov
f437fa02c2
[kernel] Nest *Environment into *State for (de)serialization
...
Change-Id: I580a67fd366546d7526e8b8204111aa89bb34c79
Reviewed-on: https://dart-review.googlesource.com/c/89284
Reviewed-by: Daniel Hillerström <hillerstrom@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2019-01-18 09:31:06 +00:00
Konstantin Shcheglov
0dea413d94
Tests for reachability, fix for try/finally.
...
R=paulberry@google.com
Change-Id: I18d1b987cb7375ae83125b4af3ed1ff712613e33
Reviewed-on: https://dart-review.googlesource.com/c/90124
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-01-18 08:08:17 +00:00
Jens Johansen
e3302cdb8f
Follow-up to storing problems in the ast
...
Change-Id: I2bfe8ad8d86806e0f5ffa026566cfa234b82154b
Reviewed-on: https://dart-review.googlesource.com/c/90005
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-01-18 07:15:36 +00:00
danrubel
2faab1d4c0
Update AstBuilder to build spread collection AST structures
...
Change-Id: Ifde5047933d810bdda77fe1b46eb6f69b7eabc5a
Reviewed-on: https://dart-review.googlesource.com/c/90082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-18 00:05:30 +00:00
Dan Field
5b1daaac6c
Exposes a thin layer over getsockopt/setsockopt for supported platforms.
...
This allows developers to have more fine grained control over socket
options supported by their platforms, particularly when there is not a
nice way to encapsulate differences between IPv4 and IPv6 options (as
with IP_MULTICAST_IF and IPV6_MULTICAST_IF). It also begins the work
of exposing socket level and option values, although keeping it for now
only to a minimum necessary to assist with setting the multicast
interface for datagram sockets.
This CL also marks `multicastInterface` as deprecated.
Bug: https://github.com/dart-lang/sdk/issues/17057
Change-Id: I39b3bf3d32d39de1c777acea4425d6eb2226355d
Reviewed-on: https://dart-review.googlesource.com/c/89164
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2019-01-17 23:05:21 +00:00
Konstantin Shcheglov
b692a6d183
Improvements for flow analysis.
...
Support for 'IfNull' expression.
Support for 'rethrow'.
Tests for definite assignment and assignment expressions.
Change-Id: I053d27ca05e4ccaccc6a9fc7e10a481cd481ab21
Reviewed-on: https://dart-review.googlesource.com/c/90102
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-17 21:30:48 +00:00
Dan Rubel
ddce2824fa
Add more spread collection fasta test cases
...
Change-Id: I998234da8f9e3f1e5902f8cd3fcad884c012f128
Reviewed-on: https://dart-review.googlesource.com/c/90080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-17 20:29:47 +00:00
danrubel
6639cbd6c3
Add AstBuilder spread-collections and control-flow-collections flags
...
Change-Id: I280b09970851d0d5bc0ad630be94ccd11f4385b1
Reviewed-on: https://dart-review.googlesource.com/c/90081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-17 20:29:27 +00:00
Stephen Adams
1020a22290
[dart2js] Do more native method inlining
...
Check if the call is typesafe instead of inlining only when type
checks are disabled.
Change-Id: Ie391bd7013941ffd3852fb8e2421e8827f41b6d0
Reviewed-on: https://dart-review.googlesource.com/c/89926
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-17 20:21:36 +00:00
Paul Berry
f353719b08
Ignore unnecessary_cast hint.
...
The cast is no longer needed due to the class hierarchy changes in
https://dart-review.googlesource.com/c/sdk/+/89923 . But we don't want
to remove it yet, because we don't want to unnecessarily make the
analyzer_plugin to depend on the very latest analyzer. So for now we
ignore the hint.
Change-Id: Ic5314181cd78d72e5c9b1d00f38302773f0a789c
Reviewed-on: https://dart-review.googlesource.com/c/90101
Commit-Queue: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 19:52:56 +00:00
Konstantin Shcheglov
3513f872ce
Extract DartFileEditBuilder.importLibrary() into separate file.
...
R=brianwilkerson@google.com
Change-Id: I2f4a4943ad4db573504a890e29424357e0775839
Reviewed-on: https://dart-review.googlesource.com/c/89722
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 19:22:05 +00:00
Brian Wilkerson
ac1bf656c4
Non-breaking changes to add code-as-ui support
...
Change-Id: I8a2f0fe4e8e732f866d16e7d349fb21b8dd46194
Reviewed-on: https://dart-review.googlesource.com/c/89923
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 16:55:19 +00:00
Konstantin Shcheglov
3919491d3e
Improvements for flow analysis.
...
Support for 'for'.
Support for 'for-each'.
Support for 'switch'.
Support for local functions and closures.
Support for 'try/catch/finally'.
R=paulberry@google.com
Change-Id: Idd0e528b706c1094e2bfdf32f84a9bcd7c80968a
Reviewed-on: https://dart-review.googlesource.com/c/89921
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-17 16:47:09 +00:00
Danny Tuppeny
17a439633d
Add a custom LSP method dart/diagnosticServer to start server/return port
...
Change-Id: I9d9be244251099c947b2998f0a45ec29ef29ad83
Reviewed-on: https://dart-review.googlesource.com/c/90012
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 16:37:49 +00:00
Danny Tuppeny
7e05c2cd62
Add ability to generate custom classes for custom LSP methods
...
Change-Id: Ie613a828fd6d92133e3d5cb53673c37734fb6eec
Reviewed-on: https://dart-review.googlesource.com/c/90011
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 16:37:49 +00:00
Kevin Millikin
b00193fa5f
[Kernel] Signal an error for invalid native invocations
...
Calls to the factory constructor 'new List' can turn into static
invocations of a backend-specific factory function. Signal an error
instead of crashing.
Change-Id: Id0a8a7f0f847c03225b7fa9da2351032d15522e0
Reviewed-on: https://dart-review.googlesource.com/c/90006
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Kevin Millikin <kmillikin@google.com >
2019-01-17 15:12:04 +00:00
Peter von der Ahé
21c42e914e
Compute supertypes
...
Change-Id: I85fd7894b026180b1bc418602c0f09fcfea0a543
Reviewed-on: https://dart-review.googlesource.com/c/89543
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 14:23:07 +00:00
Peter von der Ahé
181b3898eb
Follow up on review comments
...
Change-Id: Ie5c3d31630b638653e5e27002b029915b8f940cf
Reviewed-on: https://dart-review.googlesource.com/c/89542
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 14:23:07 +00:00
Peter von der Ahé
660c33fde6
Add TypeBuilder.declaration
...
Change-Id: Iede4bde8e30bb4ac034c0cb0db49a843ff84d48b
Reviewed-on: https://dart-review.googlesource.com/c/89541
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 14:23:07 +00:00
Peter von der Ahé
3e24b60516
Hierarchy expectation files
...
These expectations will be used in a future CL.
Change-Id: I0e0659054732251452b32fedfd0ee52fac068f44
Reviewed-on: https://dart-review.googlesource.com/c/89524
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 14:23:07 +00:00
Peter von der Ahé
ef2e000a52
Share expectation matching
...
Change-Id: I15e8d4c622a7980e170cf38e2ff57738ea57f01c
Reviewed-on: https://dart-review.googlesource.com/c/89521
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 14:23:07 +00:00
Peter von der Ahé
f3cee0147c
Fast versions of legacy and strong tests.
...
These versions don't run the VM on the generated .dill files.
These tests are still "Slow" in status-file lingo, as they run for
about 30 seconds on a fast machine.
Change-Id: I7bd326a14c8f1f1905d4c6b4d5f850a95b135325
Reviewed-on: https://dart-review.googlesource.com/c/88967
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2019-01-17 14:23:07 +00:00
Aske Simon Christensen
e3d6709289
Error message for circular constant expressions
...
Handles the situations described in #34204 and #34189 when front-end
constant folding is enabled.
Change-Id: I64fd8449ac1661f6fe67411113c6f99d8009547c
Reviewed-on: https://dart-review.googlesource.com/c/90007
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2019-01-17 14:21:47 +00:00
Vyacheslav Egorov
6dfb3e9f60
[vm/tools] Add pkg/vm/bin/compare_sizes.dart
...
This script can be used to compare two outputs of --print-instructions-sizes-to
and render a table that highlights symbols that became bigger or smaller
between two compilations.
Change-Id: I011584a370d8c94061da42e8e4f253c84d870bc3
Reviewed-on: https://dart-review.googlesource.com/c/89643
Reviewed-by: Aart Bik <ajcbik@google.com >
2019-01-17 11:52:14 +00:00
Jens Johansen
dab228e55f
Save problems in ast - fasta changes
...
Change-Id: Id38f5e7495c245e5a7b161b55c58b8826c146a80
Reviewed-on: https://dart-review.googlesource.com/c/90000
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2019-01-17 10:46:13 +00:00
Jens Johansen
1c82f6757c
Save problems in ast - kernel format changes
...
Change-Id: I978c90762ee85a6d7936d6a55e11d5d95d509b4f
Reviewed-on: https://dart-review.googlesource.com/c/89507
Reviewed-by: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2019-01-17 10:41:53 +00:00
Peter von der Ahé
ddc1de50d6
Use ClassHierarchyBuilder in all modes.
...
Change-Id: Ia4df46c2e9f6edc25274492c4a7ea85a4f4b95e1
Reviewed-on: https://dart-review.googlesource.com/c/88959
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2019-01-17 09:39:44 +00:00
Johnni Winther
430560d928
Track parameter use in invocations in MemberUsage
...
Change-Id: I53b4ad1ff533d913bdff7e48558fdc56ce016e3f
Reviewed-on: https://dart-review.googlesource.com/c/89525
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-17 08:48:48 +00:00
Kevin Millikin
e36ad1dad0
[Kernel] Build an invalid constant for evaluation errors
...
An invalid constant is (currently) represented by an unevaluated
invalid expression. Using this instead of null fixes 63 out of 125
CFE constant-evaluation crashes with constant-update-2018 and
correctly signals 26 more previously-missed compile-time errors.
Change-Id: I5b4de3995b3a59978dfa08fc542ef0f027572eb6
Reviewed-on: https://dart-review.googlesource.com/c/89506
Commit-Queue: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2019-01-17 07:26:04 +00:00
danrubel
da09945643
Update dartfix pubspec before publishing
...
Change-Id: I542aa5973aa22725980baf048fa07bc10d7b85bb
Reviewed-on: https://dart-review.googlesource.com/c/89902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-17 02:05:53 +00:00
danrubel
b81c1b2095
Parse spread collections in map literals
...
This CL adds support for parsing spread collection entries in map literals.
For now, all listeners report an error on the spread collection tokens
'...' and '...?' until support has been added for those listeners.
Change-Id: I299bb1524fda39746471c07e618df6a2305b1a2e
Reviewed-on: https://dart-review.googlesource.com/c/89860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-17 01:32:35 +00:00
Dan Rubel
1b0d93366d
Add list literal spread collection fasta test cases
...
Change-Id: Ia17b7e1d4f97565a8ca7a93b1db35896d0f2f647
Reviewed-on: https://dart-review.googlesource.com/c/89700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2019-01-17 01:32:15 +00:00
Brian Wilkerson
6c2ea4936a
Clean up several deprecation hints
...
Change-Id: I6191ddc4bb4a98c4976d8bc281b084bfd5073547
Reviewed-on: https://dart-review.googlesource.com/c/89941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-01-17 01:05:24 +00:00
Stephen Adams
9cdce03e16
[dart2js] Improve null receiver guard removal near JS code
...
Null receiver guards (which look like "t1.toString;") are removed in more cases
where the following JS fragment would throw a TypeError on the same value.
Change-Id: I3872f00c90432077199542f4485b8e991f82fa21
Reviewed-on: https://dart-review.googlesource.com/c/89765
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-16 23:59:28 +00:00
Konstantin Shcheglov
84273b9f36
Improvements for flow analysis.
...
Support for ConditionalExpression.
Check for potential mutations in closures.
Un-promote on assignment.
Support for 'while' statement.
Support for 'do-while' statement.
R=paulberry@google.com
Change-Id: Ic9e33a08057dc3519efec759702c52ddada728ed
Reviewed-on: https://dart-review.googlesource.com/c/89763
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-01-16 21:17:10 +00:00
Alexander Markov
78abb98ee7
[vm/bytecode] Fix AST removal for package-split kernel files with bytecode
...
In package-split mode, bytecode generation is performed separately for
each package. Previously, dropping AST was done right after generating
bytecode. However, dropping AST for a package makes it impossible to do
constant evaluation in other packages which import the package with dropped
AST. This breaks bytecode generation for subsequent packages.
To work around this problem, in package-split mode AST is removed
temporary until dillp file is written. After that, removed AST is restored
back.
Change-Id: I3d8b6a8ad98f2fe88b57f7b6393bbbe87b046c21
Reviewed-on: https://dart-review.googlesource.com/c/89822
Auto-Submit: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2019-01-16 19:04:40 +00:00
Mike Fairhurst
a5f102a7d1
Analyzer: first pass at reporting unchecked nullable value usage.
...
Change-Id: I095c7feff821535a17c7cbb0c4bdb9bb04253f16
Reviewed-on: https://dart-review.googlesource.com/c/88752
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Mike Fairhurst <mfairhurst@google.com >
2019-01-16 18:38:34 +00:00
Danny Tuppeny
c5bfccc6fb
Make downloading the LSP spec a flag and commit the version parsed locally
...
Change-Id: Ib46be800dcfe3369bcc9a222d1097ae4a0efdff6
Ensure licence/attribution is included in our copy of the spec
Change-Id: I48efdb6dad5c2ba04eb18cd397fc44f678a9a7f5
Reviewed-on: https://dart-review.googlesource.com/c/89533
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Danny Tuppeny <dantup@google.com >
2019-01-16 17:20:54 +00:00
Danny Tuppeny
dbeec3bbf3
Fix formatting in generated LSP file header
...
Change-Id: I1447a4250ab0e8c8fcd26a85ff5949c587a6a77f
Reviewed-on: https://dart-review.googlesource.com/c/89517
Commit-Queue: Danny Tuppeny <dantup@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-16 17:04:43 +00:00
Danny Tuppeny
bfe15d87d8
Fix LSP exceptions serializing ResponseErrors with Uris
...
The ResponseError.data field was typed `dynamic` (as in the LSP spec) but this allows us to accidentally put non-serializable classes in it which will result in server errors when we try to send them back.
This change forces them to Strings and it's up to the code constructing the error to convert any additional data to a string first.
In order to catch this in tests, the mocks now force serialisation of all types flowing from the server to the client (this already happened for client to server).
Change-Id: I5d7f322e1a4296b1479468e36d81daebdbb4ab52
Reviewed-on: https://dart-review.googlesource.com/c/89511
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-16 16:57:43 +00:00
Paul Berry
7984dc4fcc
Prepare to publish analyzer version 0.34.2.
...
Change-Id: I70f9036cd18fc5aa4d30b0005dfe577d0bb11fb7
Reviewed-on: https://dart-review.googlesource.com/c/89821
Commit-Queue: Paul Berry <paulberry@google.com >
Auto-Submit: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-16 16:44:43 +00:00
Danny Tuppeny
4b1b2f9176
Switch LSP formatter to not fetch resolved ASTs that aren't used
...
Change-Id: Id9ec4b9977a6e721085aae4b9f81645e41fc7893
Reviewed-on: https://dart-review.googlesource.com/c/89505
Commit-Queue: Danny Tuppeny <dantup@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-16 16:03:23 +00:00