Commit graph

63378 commits

Author SHA1 Message Date
Michael Thomsen
66fbaf30e6 Update CHANGELOG.md with AOT
Closes #36794
https://github.com/dart-lang/sdk/pull/36794

GitOrigin-RevId: 3e266b8cb053f43673f29ab7fb9d33ed23c48ba4
Change-Id: If99bd3c60a1777de4f7bff6ef5463802ccf1c60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100720
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-04-29 18:19:09 +00:00
Alexander Thomas
9de07a2c58 [infra] Bump version file on master to 2.3.0
This is a follow-up to:
https://dart-review.googlesource.com/c/sdk/+/99283

Change-Id: I67e613c879e8676f438b154dbcb2eac3d57a2a01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100741
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-04-29 18:18:33 +00:00
Brian Wilkerson
2f06696655 Include the keyword required when printing elements, with additional cleanup
Change-Id: If252711ece4ed92bb52b9285704d91944a482c4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 17:51:50 +00:00
Dan Rubel
49573f59d3 cleanup analyzer warnings
Change-Id: Ieb2fd5e64efe7dbd7da70b4ee2f723d0fd5243ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-29 17:50:26 +00:00
Ben Konyi
24396182e1 [ VM / Service ] Handle case where user navigates to Observatory without a slash trailing the authentication code.
Previously, navigating to an observatory URI similar to http://127.0.0.1:8181/KUhS6KoCm24=
would result in a missing auth code error. This change explicitly checks
for this case and issues a redirect response to
http://127.0.0.1:8181/KUhS6KoCm24=/ so index.html can be sent properly
in the follow up request.

Fixes #36763

Change-Id: I8a73f2ef08f6bf1ca5aed4ddaaf97ae3489f7e23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100631
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-04-29 17:03:49 +00:00
Keerti Parthasarathy
4038f91c38 Change the messaging for the CrOS touchscreen check
Change-Id: I873788752ab9e4d96c1f7e0907d5fb7602d06d0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-29 16:56:39 +00:00
Paul Berry
e2d0f5a50b Add featureSet parameter to Parser constructor.
And deprecate old parser configuration setters.

Change-Id: Ib1507b8d2b20be7c883061e2a92ec9205d6a378f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100664
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 16:42:19 +00:00
Keerti Parthasarathy
b378eef54a Add a option to pass in version file to tools
Change-Id: I3b7224b108cdb8693d17da90d499c0648f140bc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100721
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-29 16:40:50 +00:00
Paul Berry
37f915543f Introduce AstFactory.compilationUnit2 with a required featureSet argument.
Change-Id: I8d709fcb9be1b3a89e617a0c7b35f47813787f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99966
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 15:44:39 +00:00
Brian Wilkerson
3d0825da5d Improve the message when a mixin cannot be applied because the superclass does not implement a required class (issue 36775)
Change-Id: Ifdcf8de365dbdcb50aa70acc8552a302ef2c8e1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100700
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-29 15:13:49 +00:00
Paul Berry
3d0cdc8956 Switch perf.dart completely over to Fasta parser.
The only remaining code in perf.dart that was using the legacy
analyzer parser was in parseDirectives, which is part of setup, and
not part of the code being performance tested, so there should be no
effect on the benchmark.

Change-Id: I4676b10c367d477499c96f5220e622bb390752a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-29 13:04:38 +00:00
Stevie Strickland
4028fec3b5 Reland "[vm] Finish adding support for ECMAScript 2018 features."
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: Ie62e6082a0e2fedc1680ef2576ce0c6db80fc19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-29 09:11:48 +00:00
Konstantin Shcheglov
160aa37b9f Ignore exporting of unavailable libraries.
R=brianwilkerson@google.com

Change-Id: I1d6ff6c2f67463ce1a664a73e6bdd714a08d14ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-27 18:05:56 +00:00
Konstantin Shcheglov
f598581e41 Support for type parameters in function typed formal parameters.
See also https://github.com/dart-lang/sdk/issues/28515

R=brianwilkerson@google.com

Change-Id: I4365a159a969b5cb77b755a9dad8602a9992ab7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-27 18:05:16 +00:00
Brian Wilkerson
d816a46806 Convert MixinDriverResolutionTest to subclass DriverResolutionTest
Change-Id: Ia538b7fe0df7aa0f0c26834dab60415ed07211d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-27 17:05:06 +00:00
Konstantin Shcheglov
fd76dda221 Identify mobile or web Flutter correctly when both are possible.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/131257401
Change-Id: Ifccb54504e7551009cdc3a66dd454e653d3cdd4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-27 16:52:56 +00:00
Johnni Winther
7e0d76c5dd Compute BuiltWorld properties from member usage
Change-Id: I8a58d303c1c699aae2d6fe3a6dfdc43547b003a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-27 13:47:06 +00:00
Aart Bik
e00b2b577e [dart/fuzzer] restrict length parameter in List fill
Rationale:
Easily causes out of memory. For AOT, can even break
asserts on compilation consants.

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

Change-Id: I662c1e50338db636e2b558ac3a2761659d8b2ad4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100635
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-27 00:00:14 +00:00
Jaime Wren
5964ec4db7 Disable all tests in move_file_test.dart by renaming the file to move_file_disabled.dart
Change-Id: I18b044eb896cfb4c0f26211541a93ea4587b0a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100634
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2019-04-26 22:58:04 +00:00
Brian Wilkerson
c3669f787e Add a diagnostic for missing arguments associated with required named parameters
Change-Id: I78a46a41ae1c361da0995bb851414e19ef375477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100632
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-26 22:53:44 +00:00
Alexander Markov
f3b6028edc [vm/interpreter] Bump usage counters and trigger compilation of invoke-field
Without usage counters and compilation invoke-field dispatchers are
interpreted even if they are hot. As a result, DRT_GetFieldForDispatch
is heavily used and appears in profile.

Issues: FL-203, https://github.com/dart-lang/sdk/issues/36735
Change-Id: I3e04c16a7073de80c41257e0182b3f9592988e91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100633
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-26 21:44:55 +00:00
Aart Bik
ec15148db2 [dart/fuzzer] no target on unsupported build targets
Rationale:
This if "hides" the dart_libfuzzer target for
build targets that do not support the fuzzer tool
(e.g. no asan, ia32, etc.). This makes "build all"
possible again, and yields "unknown target 'dart_libfuzzer'"
for unsupported case. Also updates README accordingly
and fixes some formatting.

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

Change-Id: I61d85ae00d13a0eda3818d40b992cd81f5ee0357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100630
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-04-26 20:51:15 +00:00
Paul Berry
986978ad8e Additional FeatureSet plumbing for parser_fasta_test.dart
Change-Id: I6d0ff3f1b4a342717fd809f828db75401f9f0337
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-26 20:16:45 +00:00
Konstantin Shcheglov
0dc33da6e8 Add LinterContext.canBeConstConstructor().
So, the linter rule does not need to do its own hacks of AST.

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

Bug: https://github.com/dart-lang/linter/issues/1537
Change-Id: Id8d56c0abe077b439d4d67f7dc74b36c08acdf88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100277
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-26 19:27:15 +00:00
Brian Wilkerson
d03323783a Fix an exception in flutter outline when using ui-as-code elements (issue 36772)
Change-Id: If0cb8972cc172581d0365e4d9e0bab0cfee598c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100629
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-26 19:26:55 +00:00
Jaime Wren
c46deebfb6 Disable all the analysis server move_file_test refactoring tests
https://ci.chromium.org/p/dart/builders/ci.sandbox/analyzer-win-release/5285

Change-Id: I3593963625ecc9fb35182e7666d98be26f785e04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100662
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2019-04-26 18:28:35 +00:00
Brian Wilkerson
c6cc447e98 Convert StaticWarningCodeTest to use DriverResolutionTest
Change-Id: I2e5f282d79e7048984edbcd866ac4a8312e82b5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100626
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-26 18:18:35 +00:00
Paul Berry
b9bf239c65 Revert "Add support for recording context information with analysis errors, with one example"
This reverts commit 6114435ea5.

Reason for revert: Broke angular and angular_analyzer_plugin

Original change's description:
> Add support for recording context information with analysis errors, with one example
> 
> Change-Id: Iba1c48163ce264d85a68bcb9f70e5025a7cdbfbb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100563
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: I275c6e4473de73199ea9b5e490379ba58aec1d43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100628
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-26 18:03:57 +00:00
Jaime Wren
6c3a91f281 Take 2 on getting the analyzer bot fixed
Change-Id: Iba56a29069672aa469328308b2ffcc189ded5d05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100660
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2019-04-26 16:18:49 +00:00
Devon Carew
14d09498b7 [analyzer] don't traverse into dot folders when analyzing android manifest files
Change-Id: Ic0797064bc4209c597afb080adc050bf4a4c1f2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100569
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-04-26 15:14:39 +00:00
Martin Kustermann
832668ff6c Reland "[Infra] Let run_vm_tests --list output a test expectation marker"
Due to not having support for __VA_OPT__ yet the CL introduces a new
wet of macros ..._WITH_EXPECTATIONS() which can be given an expectation
marker.

Change-Id: I33812937f1b226fa89b3ab17a8a3483914abf2e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100643
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-26 12:15:19 +00:00
Martin Kustermann
119f937418 [vm/compiler] Make StoreIndexedInstr take unboxed values and make LoadIndexedInstr produce unboxed values
Currently the LoadIndexedInstr will mostly box resulting values which
might be untagged right after it to do binary int64 arithmetic on the
values.

Similarly StoreIndexedInstr takes only boxed values as inputs. Though
tight code using int64s will need to box just so the StoreIndexedInstr
unboxes it again.

To avoid the extra tagging/untagging we make the load return unboxed
values which can be optionally tagged afterwards if need be.

Issue https://github.com/dart-lang/sdk/issues/35154

Change-Id: I7e82107c2047e41699854e1534934a7cb9da691d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99149
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-26 10:34:19 +00:00
Johnni Winther
a1dd732ec6 Extract WorldBuilder results into an immutable BuiltWorld object
For resolution this is the KClosedWorld and for codegen this is the new
CodegenWorld object. This change removes the use of the world builders
after the world building has ended. It prepares for computing more of the
result data from the collected member usages.

Change-Id: I80032e3fc0e29179137b8c0380f09f68ab6fa03b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-26 07:52:58 +00:00
Daco Harkes
a23def41f9 [vm/dbc] Support UnboxedWidthExtender on DBC
Change-Id: If6446665f65c0b39dc3a0496c85f367b7738d79a
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-mac-debug-simdbc64-try, vm-kernel-mac-release-simdbc64-try, vm-kernel-reload-mac-debug-simdbc64-try, vm-kernel-reload-mac-release-simdbc64-try, vm-kernel-linux-debug-ia32-try, vm-dartkb-linux-debug-simarm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100541
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-04-26 07:21:28 +00:00
Jens Johansen
ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Aart Bik
7adad2a245 [dart/fuzzer] DartLibfuzzer README additions
More links, background, formatting

Change-Id: I5313cbbf30a6167a3533c9fd7a1fb4c31712cf49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100624
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-26 00:00:42 +00:00
Zichang Guo
33273b5b25 [vm] OperatingSystemVersion return Android OS version
OperatingSystemVersion on Android does not return OS version of Android.

Bug: https://github.com/dart-lang/sdk/issues/36625
Change-Id: Ia26bd5443b7eaf541f2c27c4e93d3c07a8613747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100567
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 23:08:43 +00:00
Aart Bik
c5cdc4ed89 [dart/fuzzer] Add build rule to link Dart with libFuzzer
Rationale:
First step towards integrating libFuzzer with Dart.
The initial target function is proof-of-concept.


Change-Id: I21f6ebf70fec05719423fef61fa5a9609500dc95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96987
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-04-25 21:29:42 +00:00
Jaime Wren
8c03636b75 Windows analyzer bot fix- normalize file paths that are resolved in memory
Change-Id: I29fa246e86afa7a56fc97e1662db765a120ad19c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100564
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2019-04-25 21:17:22 +00:00
Ryan Macnak
9a07ad88f4 [vm, irregexp] Cache the backtracking stack on the isolate to avoid memory leaks in jemalloc.
Bug: https://github.com/flutter/flutter/issues/29007
Change-Id: Ic08e6cdad087cb063350b0738a65f426e67864d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-25 20:08:52 +00:00
pq
7cd43a1de3 bump to linter 0.1.87
Change-Id: I4d68a91f50645995aa2d1c8e18efed61769221fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-04-25 19:03:33 +00:00
Brian Wilkerson
6114435ea5 Add support for recording context information with analysis errors, with one example
Change-Id: Iba1c48163ce264d85a68bcb9f70e5025a7cdbfbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100563
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-25 18:41:23 +00:00
Brian Wilkerson
6498a3e357 Add some tests of the listTokenDetails request
Change-Id: I5dc2ae390777454128f18bef95bb00dcbce18f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-25 18:41:14 +00:00
Paul Berry
74ac17c13f In BestPracticesVerifier, configure linter context with unit information.
This is necessary because as of
bb2a3ca6f6, LinterContextImpl.canBeConst
uses the linter context's unit information to figure out which
features are enabled, so it can make a correct determination of
whether the expression can be const.

Change-Id: I8987a33eaca206def9f03a74bc442a44b22e80e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-25 17:42:53 +00:00
Konstantin Shcheglov
e70273c306 Issue 36733. Completion in spread, if, and for elements.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36733
Change-Id: I019741086495eaaf1f2dc078d801f61a0919cc78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100523
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-25 17:18:50 +00:00
Aart Bik
d0b236c319 [dart/fuzzer] restrict stmt depth and length
Rationale:
We have consistent failures with DBC reaching
the 64K constant limit. Although a true problem,
as this stage, it is not so useful to keep
DartFuzz nightly runs red constantly for this.
This CL reduces the length a bit, so that we
hit this restriction less often.

https://github.com/dart-lang/sdk/issues/36646
https://github.com/dart-lang/sdk/issues/36658

Change-Id: Ief2c7293b0159b798ee0426751899dc7fffd4f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100464
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-25 17:17:20 +00:00
Ryan Macnak
ccf7eac86d [vm, jit] Make unoptimized instance calls compatible with megamorphic calls.
This is preparation for switching the call's stub when polymorphism gets too high.

Bug: https://github.com/dart-lang/sdk/issues/26780
Bug: https://github.com/dart-lang/sdk/issues/29294
Bug: https://github.com/dart-lang/sdk/issues/36409
Change-Id: If601ea97a1942a567bee0847afeb3b4e9c11481a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99705
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-25 16:53:51 +00:00
Konstantin Shcheglov
bba0be2797 Rework type parameters, use correct enclosing element / reference.
R=brianwilkerson@google.com

Change-Id: I7b6300f0eb9e9361155190b08912f6017fe9aaef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-25 16:38:21 +00:00
Liam Appelbe
317a075d93 [vm] Fix DEGUG typo and a few other bugs it was hiding.
Bug: https://github.com/dart-lang/sdk/issues/36672
Change-Id: I553623e5ec2d378006f5b3d4e7af8f80ef9b7d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-25 16:14:41 +00:00
Sam Rawlins
05d33b1240 Add WorkspacePackage support for InSummarySource sources
An alternative fix to https://dart-review.googlesource.com/c/sdk/+/94356

In this case, `library.source.fullName` results in a String representation
of a library's package: URI. :(

To accomplish this, each *Workspace's contains() method is refactored from
taking a `String path` to taking a `Source source`, so as to use package: URIs
as much as possible, avoiding looking at the filesystem and poking around for
Workspace markers (BUILD, BUILD.gn, WORKSPACE, .jiri-root, etc). This avoids
the issue with InSummarySource sources, which have a non-path `.fullName`, but
have a valid `.uri`.

These issues were found when trying to enforce @sealed internally.

Change-Id: Ia46f28aa7aad0fc4483a180fa47f1e509402da6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94985
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-25 16:08:43 +00:00