Commit graph

65376 commits

Author SHA1 Message Date
pq cd30fa693d bump to linter 0.1.96
Change-Id: Ifd20c2551ef302a7e9e08f823cd1a68ddff75a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-08-03 00:35:21 +00:00
Stephen Adams a3d6b4802f [dart2js] new-rti: Use findType in parameter stubs
This fixes the stubs that default type parameters.
Some benchmarks test this behaviour.

Change-Id: If47d99e5fbf1a2bceeb0e6e930e27cfea6f3eedc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111871
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-08-02 23:59:01 +00:00
Konstantin Shcheglov 4bebfebdbc Initial support for extension methods inference.
Only the case with ExtensionOverride is supported for now.
Still fixes some co19 tests.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I6c7c98f4839a1fc40504d93107648d952a4176d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-02 23:24:41 +00:00
Ryan Macnak 6653611ae4 [vm, gc] Check if we should start concurrent marking after external allocations and background code finalization.
Bug: https://github.com/flutter/flutter/issues/36808
Change-Id: I2577ffa22e4dec5d659198948d490b4e17aae8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111664
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-08-02 22:08:59 +00:00
Brian Wilkerson 57b9ce7fb7 Report when super is used in instance members of extensions
Change-Id: I58370268e018d97c78667c900678e419af07e7ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111863
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-02 21:31:49 +00:00
Sam Rawlins af97015781 Fix markdown and Dart links in meta package
Right now they're dead. https://pub.dev/documentation/meta/latest/meta/meta-library.html

Change-Id: Iecc12075e56eb4caf115c34fdfb04d9b164ebe2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111865
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-08-02 21:08:59 +00:00
Konstantin Shcheglov 3a2576eca9 Use ExecutableMember.from2() in ParameterMember.getAncestor().
R=brianwilkerson@google.com

Change-Id: Ieb2a7ae700080ff2871e5a3d02e3c27ea7ee37ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-02 20:37:44 +00:00
Stephen Adams b16d018b29 [dart2js] new-rti: handle passing element type to [a]sync* methods
Change-Id: Iad5522f0a0fc3d34f06881ab2a0b42bc235f40ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111741
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-08-02 20:32:09 +00:00
Aart Bik 19085e3819 [dart/vm] Check SSA def-use dominance only
Rationale:
PushArguments violate some def-use dominance relations
after inlining. Fixing this seems not worth the engineering
effort. Rather we wait until we remove PushArguments
altogether (the optimizing compiler has no need for them).

https://github.com/dart-lang/sdk/issues/36899

Change-Id: I9265420ae8ec4981fe7170b9a1869dd56ae323cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111880
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-08-02 20:29:39 +00:00
Konstantin Shcheglov 9bb446aae1 Record if MethodDeclaration has NativeFunctionBody, so it external.
This fixes the issue with failing DDC tests like this:
co19_2/LayoutTests/fast/media/matchmedium-query-api_t01

R=brianwilkerson@google.com, paulberry@google.com

TypeError: html.window.styleMedia[$matchMedium] is not a function
Change-Id: Ic7a80c53122cdc3e0bcce835b5717413e342ce74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111862
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-02 19:43:39 +00:00
Konstantin Shcheglov 0e24437b81 Replace InterfaceType with Substitution in Member(s).
I ran it in google3:
https://test.corp.google.com/ui#id=OCL:261214112:BASE:261244079:1564722983792:f6286cfb

Change-Id: I820d2dbbaefe495c20b0d8fe3f7c54f1766d5689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-02 19:34:18 +00:00
Nicholas Shahan 6578435eff [infra] Fix broken code when raising errors in copy_tree.py
`Error` isn't a recognized name in this script. Updated to `RuntimeError`
instead so we can see the errors when they are raised.

Change-Id: I55c548c7cd07dc1980a31dc96d22acec326602a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111483
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-08-02 18:05:08 +00:00
Stephen Adams 6d13a6df94 [dart2js] new-rti: Lower some checks to a simpler form
HAsCheckSimple is a specialization of HAsCheck that calls a js_runtime
helper to do the check.

This CL specializes bool/double/int/num/String.

is-checks are not included but used by as/type checks, so there is not
much speedup for this CL.

Change-Id: Id65941d789e017350d3f9e181174e4cce768eea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110422
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-08-02 18:00:08 +00:00
pq ed2764d055 remove unused import
Change-Id: I59a1d2ba11baed58ce60517c2c402f811eabd8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111820
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-08-02 16:33:21 +00:00
Martin Kustermann fac682c5ef [vm/gc] Hold lock before accessing PageSpace::large_pages_
Change-Id: I08c4d125e929f0c1824204b813920ac8a7cf1f59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111721
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-08-02 15:26:01 +00:00
Brian Wilkerson f8f77eb4c0 Add keyword completion suggestions
Change-Id: I2ec6de7a68397aa9e43b155db52c5473e3d7035d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111667
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-02 15:09:01 +00:00
Jens Johansen a408e8ee97 Remove Kevin from kernel watchlist
Change-Id: I6154eb51ab4264646b8d9ec322e914e1842161ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111724
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-02 09:31:26 +00:00
Sergey G. Grekhov ca2f68e5f5 [co19] co19 roll b0220fc898c32d3944cb8c54cf7b78dd8c7cbadb..796f4de76de460e031bf3b20ce60a52e4ed417d9
t log b0220fc898c32d3944cb8c54cf7b78dd8c7cbadb..796f4de76de460e031bf3b20ce60a52e4ed417d9 --date=short --no-merges --format='%ad %ae %s'

2019-07-31 sgrekhov@unipro.ru Add another test for lexical resolution with conflicting extensions in a library
2019-07-31 sgrekhov@unipro.ru Fix typo and missing import added
2019-07-31 irina.arkhipets@gmail.com typo corrected.
2019-07-30 sgrekhov@unipro.ru Test fixed (listEquals -> iterableEquals)
2019-07-30 sgrekhov@unipro.ru Fix description of the current extension member tests and add new ones testing that instance method has higher priority than extension's one
2019-07-30 sgrekhov@unipro.ru More built-in types added to test on clause
2019-07-30 irina.arkhipets@gmail.com generic parameter inference test corrected, two new tests added.
2019-07-30 sgrekhov@unipro.ru Add test with 'call' method and no most specific extension
2019-07-30 sgrekhov@unipro.ru Change test assertion and rename
2019-07-30 sgrekhov@unipro.ru Change test description and add new one testing 'no most specific extension' case
2019-07-29 sgrekhov@unipro.ru Fix scope tests
2019-07-29 sgrekhov@unipro.ru Change all extensions in the test to not to be 'most specific'
2019-07-29 sgrekhov@unipro.ru Use more strong checking of 'this'
2019-07-29 sgrekhov@unipro.ru Check that it is no compile error if an extension declares a member with the same name as a member of the type it is declared on
2019-07-29 irina.arkhipets@gmail.com new test added, it checks that extension type parameter cannot be higher-order.
2019-07-29 irina.arkhipets@gmail.com test extension is appliedes expected.
2019-07-29 sgrekhov@unipro.ru Use correct checkings
2019-07-29 sgrekhov@unipro.ru Use correct functions call
2019-07-29 sgrekhov@unipro.ru Use correct functions call
2019-07-29 irina.arkhipets@gmail.com test expectations corrected.
2019-07-29 sgrekhov@unipro.ru Remove NNBD tests
2019-07-29 sgrekhov@unipro.ru Obsolete text removed from the test description
2019-07-29 sgrekhov@unipro.ru Use correct function type
2019-07-29 sgrekhov@unipro.ru Use correct function type
2019-07-29 sgrekhov@unipro.ru Use string interpolation
2019-07-27 irina.arkhipets@gmail.com got rid of higher order type variables.
2019-07-27 irina.arkhipets@gmail.com test check a parameter of unrelated type now; new test with implicit downcast added.
2019-07-27 irina.arkhipets@gmail.com expected result of the test corrected.
2019-07-27 irina.arkhipets@gmail.com more informative test description added.
2019-07-27 irina.arkhipets@gmail.com typo corrected.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-27 irina.arkhipets@gmail.com the test checks that an extension from non-platform libraries is not more or less specific than one from another non-platform library.
2019-07-26 sgrekhov@unipro.ru Add another tests with a call getter returning a function
2019-07-25 irina.arkhipets@gmail.com positive test case for the conflicting resolutions added, there should not be errors if members are not called directly.
2019-07-25 irina.arkhipets@gmail.com add a reference to the conflicting extensions.
2019-07-24 sgrekhov@unipro.ru Use correct syntax for unnamed extension with type parameters
2019-07-24 sgrekhov@unipro.ru Use correct syntax for unnamed extension with type parameters
2019-07-24 irina.arkhipets@gmail.com type parameters follow extension names now.
2019-07-24 sgrekhov@unipro.ru Use instance variable, not a class for testing
2019-07-24 sgrekhov@unipro.ru Fix typo (boolean -> bool)
2019-07-24 irina.arkhipets@gmail.com typo in the test corrected.
2019-07-24 irina.arkhipets@gmail.com "on" clause added to the tested extensions.
2019-07-23 irina.arkhipets@gmail.com typo in the test corrected.
2019-07-23 irina.arkhipets@gmail.com tests for Semantics of Invocations (Static extension methods)added.
2019-07-23 irina.arkhipets@gmail.com tests for Semantics of Invocations (Static extension methods)added.
2019-07-23 sgrekhov@unipro.ru Semantics of extension members tests added
2019-07-23 sgrekhov@unipro.ru Object methods test added
2019-07-23 irina.arkhipets@gmail.com tests for Static Members and Member Resolution (Static extension methods)
2019-07-22 irina.arkhipets@gmail.com tests for overriding access in extension methods added.
2019-07-22 irina.arkhipets@gmail.com removed needless @compile-error tags.
2019-07-22 irina.arkhipets@gmail.com added "on" clause to the extension declarations.
2019-07-22 sgrekhov@unipro.ru Static extension methods. Member conflict resolution tests added
2019-07-22 irina.arkhipets@gmail.com getter calls corrected.
2019-07-22 irina.arkhipets@gmail.com expected results of the test cases corrected.
2019-07-22 sgrekhov@unipro.ru Typo fixed
2019-07-22 sgrekhov@unipro.ru Remove wrong type argument
2019-07-22 irina.arkhipets@gmail.com typo in the getter corrected.
2019-07-22 sgrekhov@unipro.ru Typo fixed (Void -> void)
2019-07-22 sgrekhov@unipro.ru Typo fixed
2019-07-19 sgrekhov@unipro.ru Static extension methods. Member conflict resolution test added
2019-07-18 sgrekhov@unipro.ru Extension static methods acess fixed
2019-07-18 sgrekhov@unipro.ru Tearoff tests added and fixed
2019-07-18 sgrekhov@unipro.ru More tearoff tests
2019-07-17 sgrekhov@unipro.ru Tearoff tests added and small fixes
2019-07-15 irina.arkhipets@gmail.com added tests for overriding access in the static extension methods.
2019-07-15 sgrekhov@unipro.ru The call member tests added
2019-07-12 irina.arkhipets@gmail.com tests for extension conflict resolution added.
2019-07-10 irina.arkhipets@gmail.com tests for extension conflict resolution added.
2019-07-04 irina.arkhipets@gmail.com tests for static extension methods added: extension conflict resolution.
2019-07-04 sgrekhov@unipro.ru More extension member resolution tests
2019-07-03 sgrekhov@unipro.ru Typo in test fixed
2019-07-02 sgrekhov@unipro.ru Extension member resolution tests added
2019-07-02 sgrekhov@unipro.ru Covariant parameters test added
2019-07-02 sgrekhov@unipro.ru Typo in multitest fixed
2019-07-01 irina.arkhipets@gmail.com tests for static extension methods added (generic parameter interfaces and extension conflict resolution)
2019-07-01 sgrekhov@unipro.ru Fixes Test for scope completed
2019-07-01 sgrekhov@unipro.ru Fixes Another tests for Scope added
2019-06-28 sgrekhov@unipro.ru Test scope added
2019-06-28 sgrekhov@unipro.ru Ommited extension name test added
2019-06-27 irina.arkhipets@gmail.com tests for generic parameter inference added.
2019-06-27 sgrekhov@unipro.ru Tests for syntax scope added
2019-06-26 irina.arkhipets@gmail.com tests for the issues 32903, 34560 added, some typos fixed.
2019-06-26 sgrekhov@unipro.ru Issue number added to flaky test
2019-06-26 sgrekhov@unipro.ru Member declaration tests added
2019-06-24 sgrekhov@unipro.ru More tests for Static extension methods syntax
2019-06-24 sgrekhov@unipro.ru Added tests for Static extension methods syntax
2019-06-24 irina.arkhipets@gmail.com moved tests for triple-shift into LanguageFeatures/Triple-shift directory.
2019-06-21 sgrekhov@unipro.ru Name and value are mandatory for Cookie now. Also value check added
2019-06-19 sgrekhov@unipro.ru Add more NNBD static semantics tests
2019-06-18 sgrekhov@unipro.ru RGBA and UNSIGNED_BYTE constants were moved to WebGL class. Use them
2019-06-18 sgrekhov@unipro.ru Use approxEquals for math functions with tolerance 1-e15
2019-06-18 sgrekhov@unipro.ru Old multitest syntax replaced by new one
2019-06-17 sgrekhov@unipro.ru Initial commit. Tests for NNBD static errors
2019-06-17 sgrekhov@unipro.ru Revert "Initial commit. Tests for NNBD static errors"
2019-06-17 sgrekhov@unipro.ru Initial commit. Tests for NNBD static errors
2019-06-17 irina.arkhipets@gmail.com added static tests for non-function type aliases with simple bounds. Useless @compile-error tags removed.
2019-06-17 irina.arkhipets@gmail.com added dynamic tests for non-function type aliases with simple bounds.
2019-06-14 sgrekhov@unipro.ru Remove invalid use null from Language tests

Change-Id: I83d5ded8bc97a1b0bf3e8f19af401ae5283411f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111722
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-02 07:39:25 +00:00
Mike Fairhurst c0f23ce8bc [nnbd_migration] fix kind -> description, drop empty, tests
Change-Id: I7224167ae26344336f665827b145c57319076d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111382
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-08-02 07:35:41 +00:00
Ryan Macnak 330a401233 Increment ABI version.
The named of the recognized method `_GrowableList.withData` was changed to `_GrowableList._withData`.

Change-Id: I94b08fdbb39579c4713935b61a148db4baa751d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111780
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-08-02 05:13:58 +00:00
danrubel fc5b4e3cef Rework dartfix lint fixes to remove race condition
This refactors the way that dartfix finds lints to fix to be based on
error codes rather than manually running the lints. This prevents
a race condition that occurs between calling setAnalysisRoots and
requesting fixes.

Fix https://github.com/dart-lang/sdk/issues/37558

Change-Id: I35817a9b152a28db9e78662a5ea5096f275f68bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-02 02:04:57 +00:00
Ryan Macnak d08c203e30 Add various missing argument checks to dart:io natives.
Avoid reflective access to mirrors creating invalid reflectees.

Change type checks in embedding API functions to return UnhandledExceptionErrors instead of APIErrors so they are catchable by Dart.

Fixes invocation_fuzz_test.

Bug: https://github.com/dart-lang/sdk/issues/15274
Bug: https://github.com/dart-lang/sdk/issues/23869
Bug: https://github.com/dart-lang/sdk/issues/37680
Change-Id: Ife3e3cb894c59620b0318e4e08947a3d1d45bab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-08-01 23:32:40 +00:00
Ari Aye 650f32c1b0 Update to tflite_native@0.2.0
This change also copies the platform-appropriate tflite shared object into $SDK/bin/snapshots so that tflite_native running inside the analysis server snapshot will be able to resolve it correctly.

ariaye@ariaye1:~/sdk/sdk$ ./tools/build.py -a x64 -mrelease create_sdk
ariaye@ariaye1:~/sdk/sdk$ ls out/DebugX64/dart-sdk/bin/snapshots/
analysis_server.dart.snapshot  dart2js.dart.snapshot  dartanalyzer.dart.snapshot  dartdevc.dart.snapshot  dartdoc.dart.snapshot  dartfmt.dart.snapshot  kernel-service.dart.snapshot  kernel_worker.dart.snapshot  libtensorflowlite_c-linux64.so  libtensorflowlite_c-mac64.so  libtensorflowlite_c-win64.dll  pub.dart.snapshot  resources

Change-Id: I474a3b676f99feaa84dba9c7723dc867a7a01f52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111669
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-08-01 23:05:45 +00:00
Brian Wilkerson 622ec5099f Support tearoffs through extension overrides
Also add tests for other forms of tearoffs

Change-Id: I43ee36ffcc9e69af6b2785153c6d95f5de814371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111668
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-01 21:35:53 +00:00
Konstantin Shcheglov 42e978ca54 Fix Windows bot.
Change-Id: I4a92643e2007818555c96cd782c7ef9b6b17c42d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111670
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 21:31:32 +00:00
Brian Wilkerson 86bdb3e3fa Clean up some warnings in analysis server code
This also sorts the content of these files. The analyzer team uses the Sort Members function on all of the source code in our packages.

Change-Id: Id0700954aefe63f6c7d2e43df021997f95ad7e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111663
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 21:24:00 +00:00
Johnni Winther 972d4e9a75 [cfe] Move relativize code from dart2js to cfe
Change-Id: I2e07dcf91adf65965583189972b0c27cc0aee526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111427
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 21:07:50 +00:00
Stephen Adams db3028ac5e [dart2js] Enable --benchmarking-x
Change-Id: I9fd19c8bbc1e4dff5606ca59e2a97b005c9015d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111680
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-08-01 19:53:13 +00:00
Brian Wilkerson 7826b4faf1 Partially support extensions of function types
This causes some of the language_2 tests to stop crashing, but doesn't
fully implement support for extensions of function types.

Change-Id: Ie1fad540f3ed0b5ed46aec7162f9fe3f15244db0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-08-01 19:28:06 +00:00
Ryan Macnak b66cd42372 [vm] Fix deadlock in isolate shutdown, take 2.
Enter a safepoint when waiting for child isolate spawns to complete, since the child isolate now requires its parent (along with all other members of the isolate group) to participate in safepoints.

Adjust shutdown of ThreadPool isolates to re-enter the isolate before waiting for outstanding spawns.

Bug: https://github.com/dart-lang/sdk/issues/37679
Change-Id: I760c0f75b77a3884ac3f4757f0c6920a417f3453
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111524
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-08-01 19:04:11 +00:00
Nicholas Shahan 6cec64691b [dartdevc] Remove variance from type bounds in generic function subtypes
As I understand in early versions of strong mode generic function subtypes could
have contra-variance in the bounds of the type parameters. Now the spec states
they must be equal.

Fixes #36501

Tested and passing with the fixed language_2/generic_function_bounds_test
https://dart-review.googlesource.com/c/sdk/+/109726

Change-Id: Ie11d6318a542867e0541d81e2a18e5e25d3f0d9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110361
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-08-01 19:00:06 +00:00
Konstantin Shcheglov a05ef7c0cc Store inferred type arguments for tear-off(s).
This change passes pre-submit run over google3.
https://test.corp.google.com/ui#id=OCL:260993915:BASE:261043007:1564632838252:e80ace42

Change-Id: Ibef739f241fdb60a574da971961b1abe6abde9c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 18:25:39 +00:00
Stephen Adams 5456641022 More canonicalization_hashing tests
These behave poorly on dart2js.

Change-Id: I15f73dce79912151e172038932dbedf5dd725530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-08-01 18:03:56 +00:00
Mark Zhou dbabe4dea6 [dartdevc] Imports/Exports are now aliased relative to the library root to disambiguate cross-module name conflicts.
Note: Changes in this CL will require some google3 changes (mostly in code related to test entrypoints).

We encountered an issue whereby cross-module programs importing files
with the same name (but separate identities/locations) were being
overridden throughout all of DDK's module builders. For example, a
module importing "x.dart" and "y/x.dart" would export {x: x, x: x$} -
the latter renamed module shadowing the first. DDC handles this by
prepending a formatted module-root-relative identifier string, so
"y/x.dart" becomes something like y__x, and the export becomes {x: x,
y__x: y__x}. However, this results in some code bloat, especially as
paths become deeply nested. More importantly, the $-renaming scheme is
not consistent across modules. Were we to export x$ instead of x, how
would the importing library know whether x or x$ referred to "y/x.dart"?

To have the best of both worlds, we're introducing the concept of a
module alias that exists at the boundary of module imports and exports.
We use this module-root-relative alias to differentiate modules with the
same name but use the shorter $-renaming scheme throughout the generated
code. Relevant points:

1) jsLibraryAlias has been introduced alongside jsLibraryName.
jsLibraryName no longer must be unique - that property having been
transferred to the alias. DDK no longer just outputs pathSegments.last,
instead adopting DDC's scheme of "creating" a special alias from the
module root. jsLibraryName's temporary IDs are renamed using the
existing DDK scheme.

2) Libraries are now associated with NameSpecifiers. The name and asName
fields represent jsName and jsAlias, respectively, for exports
(vice-versa for imports).

3) The test frameworks have been taking advantage of DDK's previous
naming scheme (throwing way the module root, keeping just the name). A
common pattern is to expect DDK's output symbol to be "someexport", then
forcing DDC's output (normally "some__path__someexport") to resemble
that with the deprecated "library-root" flag set to the path of the
output JS file. We resolve this by updating the scaffolding code to look
for the module-root-relative (long) name, which requires a bunch of
path-to-identifier subsitution logic. The "absoluteRoot" bool in the
sourcemap test runner is a way to reenable this DDC-specific deprecated
behavior. The test runner now requires this alias in the html generator.

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

Change-Id: Iaaa82f3350d424af195967b55c87cb32b30a3d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108942
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-08-01 17:24:59 +00:00
Ryan Macnak ebc4a59b61 Use Dart_PrepareToAbort in segfault handlers for consistency.
Change-Id: Ie4c838c8f8b68b16a0bda2e8a59005bee6c1bf30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111523
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-08-01 16:41:43 +00:00
Alexander Markov 136aee0655 [analysis_server] Fix flaky hanging in analysis server benchmark
This hanging was exposed when running analysis server benchmark on the VM
with bytecode due to different timings.

Benchmark was sending a request to analysis server and then subscribing to
a broadcast stream, which was populated from the output of analysis server
process.

Before the fix it was possible that benchmark wouldn't see
CompletionResultsParams which was posted to test.onCompletionResults
between sending a request and subscribing to test.onCompletionResults.
As a result, benchmark was waiting on a Future for a skipped
CompletionResultsParams indefinitely.

Change-Id: I6f282b504437d687ccac3e96fada201bf25dbd10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111484
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-08-01 16:30:13 +00:00
Konstantin Shcheglov 677f434a6b Fix computeUnlinkedApiSignature() to change signature when body changed from/to empty.
R=brianwilkerson@google.com

Change-Id: Ib103017308bbd3bc1eecd992cb924ff0d02a9e32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-01 16:26:43 +00:00
Paul Berry 7582d344d6 Migration: handle assignment of null to generic type.
Change-Id: I439095cf3d3abb3e780084561e4fc620d47ad492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-08-01 16:08:23 +00:00
Aart Bik 150e8f89d5 [dart/vm] Fix dominance violation
Rationale:
The flow graph checker still had a few ugly exceptions
due to dominance violation after inlining. This CL fixes
the violation, removes the exceptions from the flow graph
checker, and also adds a new utility that can be used in
some other places.

https://github.com/dart-lang/sdk/issues/36899

Change-Id: I42766af22a3696fe050b0e5c4a2dfe930933fc40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111502
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-08-01 15:54:33 +00:00
Nicholas Shahan 08553214ad [dartdevc] Fix optional and named params being detected as not nullable
When compiling the SDK, nullable inference was marking optional and named
parameters as not nullable when they had default values that are not nullable.

This is wrong because the caller could pass null at the call site if they want.

Fixes: #37700
Change-Id: I9d2baae9e4491587b25dcacda4b3df151b9a2754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111602
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-08-01 15:24:19 +00:00
Brian Wilkerson bbc97f5f79 Improve some diagnostic messages
Change-Id: I4784d995d701004dee23f6295a1687fc626a7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111603
Reviewed-by: Kathy Walrath <kathyw@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 14:50:49 +00:00
Samir Jindel 0ea0409401 [vm/ios] Don't use __clear_cache on iOS, it's not always available.
Change-Id: Ia80b543587b3dc265c4a4d97befff73d915ad2be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110560
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-08-01 14:14:39 +00:00
Johnni Winther 7825801189 [cfe] Refactor [ValueKind] to support unions of types.
Change-Id: Ief59777ab304a166bb6b27e29ff126a5f55df5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110910
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-08-01 13:07:19 +00:00
Johnni Winther 68e4eeee12 [cfe] Handle property access, update and method invocation on explicit/implicit this in extension methods
Handles property access, update and method invocation on explicit and
implicit this in extension methods. Also use ReadOnlyAccessGenerator
instead of ThisAccessGenerator to handle explicit this.

Change-Id: Ifd6861b1f931f854a39ddfb9ddae35ebf6094327
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110904
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 12:04:59 +00:00
Martin Kustermann 91dadded66 [vm/compiler] Recognize _asyncStackTraceHelper and build special graph if !FLAG_causal_async_stacks
This is a follow-up to [0] necessary due to mixed bytecode compiled code mode.

[0] https://dart-review.googlesource.com/c/sdk/+/110919


Issue https://github.com/dart-lang/sdk/issues/37668
Closes https://github.com/dart-lang/sdk/issues/37702

Change-Id: If3ac86224644bf02160722ff23eac0c30dbd4697
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111641
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-08-01 10:47:59 +00:00
Jens Johansen a69c81ac34 Id testing for directories with .packages etc
We should also be able to test for larger examples, so this CL adds
support for directories where all files are included. If the directory
contains a .packages file that is used so we can test packages too.

Change-Id: Iceda03505575bd9e5604a6e374b7f5fa7185a82e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111421
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-01 09:25:28 +00:00
Jens Johansen d49de8b68f succinct option for id testing
Add a "-s" (succinct) option to have a more dense output.
Meant for use together with "-a" so one can get a quick overview of how
many tests fail, e.g.
out/ReleaseX64/dart pkg/front_end/test/id_testing/id_testing_test.dart -a -s

Change-Id: I9e1d91694be76e6c66bf0f3c9168783f920a5bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110914
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-01 09:25:28 +00:00
Aske Simon Christensen 60f646a51c [CFE] Do not accept null expressions in constant evaluator.
The constant evaluation method would produce a NullConstant whenever it
was given a null expresssion to evaluate. Since most expressions can't
be null, this could hide some internal inconsistencies and silently
emit incorrect output.

This change tightens the null checks to only check expressions which
can be null (default arguments and initializing expressions for
non-const variables).

Change-Id: Idcfc5df18ce2f8e0b2c51d64288b00fd3315d52b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-08-01 08:39:48 +00:00
William Hesse d89fd68871 [infra] Update pub/sub script to send <10MB when message is base64 encoded.
Change-Id: Ie1f8fe67d06cbdcdc6d13d48dd3f177a48cbc5b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111431
Reviewed-by: Alexander Thomas <athom@google.com>
2019-08-01 08:30:18 +00:00
danrubel 86acffa440 fix prefixed type recovery crash
This fixes a crash when parsing an invalid prefixed type preceding a list literal.

Fix https://github.com/dart-lang/sdk/issues/37674

Change-Id: I43e84248c8addf6ed744fa0a836595a53a332d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-08-01 02:52:11 +00:00