Commit graph

61880 commits

Author SHA1 Message Date
Nicholas Shahan d9c05534de [dartdevc] Add helper methods to emit For and ForOf loops
Creates a single code path for the each of the "for loops" regardless if you are
running with one of the experiment flags to prevent regressions in existing
behavior.

The helpers will also be used in by implementation of control flow collections.

Issue: #36005
Change-Id: Ieb62dd76488386db2214b2b6d935fcfd6e7c56b9
Reviewed-on: https://dart-review.googlesource.com/c/93930
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-02-22 23:34:11 +00:00
Nicholas Shahan 620862fb13 [dartdevc] Support SetOrMapLiteral nodes
Refactor to use a single code path for set and map literals regardless of running in an experiment mode.

Create helper method that will contain logic to handle the new control flow collections nodes.

Issue: #36005
Change-Id: I9b466bf7f987a00d3d630d7551bdc5f0b7c8a547
Reviewed-on: https://dart-review.googlesource.com/c/94041
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-02-22 23:12:31 +00:00
Paul Berry 9b55682a5c Prepare to publish analyzer 0.35.2
Change-Id: I532d805f26e453aec0a38f4ce5f9213f6acd0b95
Reviewed-on: https://dart-review.googlesource.com/c/94020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-22 22:20:42 +00:00
Mayank Patke e1992e0178 Revert "Remove the Dart constant system and move all required classes into the"
This reverts commit 5af8de8954.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Remove the Dart constant system and move all required classes into the
> JavaScript constant system.
> 
> Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
> Reviewed-on: https://dart-review.googlesource.com/c/93746
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: Ic28807774502d11a53572095616510a642cf75b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94081
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:54:57 +00:00
Mayank Patke 05d9c60a22 Revert "Move the JavaScript constant system into constants/constant_system.dart"
This reverts commit 1702b986c8.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Move the JavaScript constant system into constants/constant_system.dart
> in preparation to merge it with the base constant system and flatten the
> constant system hierarchy.
> 
> Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
> Reviewed-on: https://dart-review.googlesource.com/c/93840
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: If1b6291508c9792a6135a2ad5333b4bb3b800f69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94103
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:50:57 +00:00
Mayank Patke 388f8e7731 Revert "Merge the JavaScript constant system into the base constant system and"
This reverts commit cf51eb2fba.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Merge the JavaScript constant system into the base constant system and
> flatten the inheritance hierarchy.
> 
> dart2js only needs one constant system at most.
> 
> Change-Id: I72e446652ea44298677e986b06e63152e381353b
> Reviewed-on: https://dart-review.googlesource.com/c/93880
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: I2d403834ac3ac41371e041d21eec3d83d152343a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94102
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:46:52 +00:00
Mayank Patke 2c3dfa9e71 Revert "Eliminate singleton/static access to the constant system and expose its"
This reverts commit 027b76ecbf.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Eliminate singleton/static access to the constant system and expose its
> functionality at the top level.
> 
> Use sites have been updated to import the library with a prefix.
> 
> Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
> Reviewed-on: https://dart-review.googlesource.com/c/93842
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: I65310b2579c6746620ed6129e670206ed9bf5e91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94101
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:42:52 +00:00
Mayank Patke 163c49fef9 Revert "Flatten constant operations to implement JS semantics by default."
This reverts commit 8172270c95.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Flatten constant operations to implement JS semantics by default.
> 
> Change-Id: Id93e9a1ce77d8035928ba0b9c338a1030d0e13bd
> Reviewed-on: https://dart-review.googlesource.com/c/93960
> Commit-Queue: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com

Change-Id: I228c171ba25d24ab672add95e92e3f5d0656ddc4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94100
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-02-22 21:38:49 +00:00
Mayank Patke 8172270c95 Flatten constant operations to implement JS semantics by default.
Change-Id: Id93e9a1ce77d8035928ba0b9c338a1030d0e13bd
Reviewed-on: https://dart-review.googlesource.com/c/93960
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke 027b76ecbf Eliminate singleton/static access to the constant system and expose its
functionality at the top level.

Use sites have been updated to import the library with a prefix.

Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
Reviewed-on: https://dart-review.googlesource.com/c/93842
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke cf51eb2fba Merge the JavaScript constant system into the base constant system and
flatten the inheritance hierarchy.

dart2js only needs one constant system at most.

Change-Id: I72e446652ea44298677e986b06e63152e381353b
Reviewed-on: https://dart-review.googlesource.com/c/93880
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke 1702b986c8 Move the JavaScript constant system into constants/constant_system.dart
in preparation to merge it with the base constant system and flatten the
constant system hierarchy.

Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
Reviewed-on: https://dart-review.googlesource.com/c/93840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Mayank Patke 5af8de8954 Remove the Dart constant system and move all required classes into the
JavaScript constant system.

Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
Reviewed-on: https://dart-review.googlesource.com/c/93746
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-02-22 21:34:47 +00:00
Dan Rubel 272f58e543 Revise parser to generate handleLiteralSetOrMap
... and no longer generate handleLiteralSet or handleLiteralMap.
In addition, a new hasSetEntry parameter has been added to the
handleLiteralSetOrMap event generated by the parser to support
existing behavior. Once all listeners have implemented
unified collections and that feature is enabled by default,
the hasSetEntry parameter can be removed.

This is the third of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200

Change-Id: Ia305eab1f720658f357ac4102b0b0c8128d16997
Reviewed-on: https://dart-review.googlesource.com/c/93963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-22 19:58:38 +00:00
Ryan Macnak 30b47d24e6 [sdk] Remove unused --packages flag no longer recognized by gen_snapshot.
Change-Id: Ibcb27b11ed550724c2e8bac1b68801a2d3eb4892
Reviewed-on: https://dart-review.googlesource.com/c/94001
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-22 19:48:51 +00:00
Alexander Thomas 0ad7caa5af [testing] Improve multitest error messages
Previously, messages would contain "Warning:" twice and failed to print
which file the errors came from.

Removed newlines from messages because the logger only prints the first
line.

Fixes #34405

Change-Id: I34d3679a4d769d7c7e2488ca55ffd15f08af9b16
Reviewed-on: https://dart-review.googlesource.com/c/93990
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-02-22 19:44:21 +00:00
Dan Rubel 58cea93953 Update BodyBuilder to use handleLiteralSetOrMap
This is the second of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200

Change-Id: I5c277d05a3726a3f5a40823cf878f025167340e6
Reviewed-on: https://dart-review.googlesource.com/c/93741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-22 17:31:24 +00:00
Johnni Winther 8e2fcf7782 Advanced tracking of field initialization
Change-Id: I8c8edb517bc3a3805ac0d72388f4e5c7fc34247f
Reviewed-on: https://dart-review.googlesource.com/c/93680
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-22 16:08:16 +00:00
Johnni Winther 60e4f194b0 Recognize and inline effectively constant fields
Change-Id: I243ee80ebc45d9cdab2f7c944cf5eceb26185b2c
Reviewed-on: https://dart-review.googlesource.com/c/93436
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-02-22 14:06:05 +00:00
Paul Berry db62dc5323 Remove hardcoded precedence integers in front end.
Use the constants in pkg/front_end/lib/src/scanner/token.dart.  This
ensures that if the precedence numbers ever change (e.g. because we
need to insert a new expression type into the precedence table), it
won't cause any breakages.

Change-Id: Ie90122435c65dd51fe9be96afe0a8890cc245b55
Reviewed-on: https://dart-review.googlesource.com/c/93931
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-22 13:39:46 +00:00
Paul Berry 5aba7b7b85 Normalize expression precedence between analyzer and front_end.
Several places in the analyzer and the analysis server were using
hardcoded integers to represent precedence, rather than referring to
constants defined in the front_end.  This led to some subtle
off-by-one errors, because the old analyzer convention (prior to
integration with the front_end parser) used 0 to represent the lowest
precedence of an expression (and -1000 to represent the precedence of
non-expressions), whereas the front_end convention is for 1 to
represent the lowest precedence of an expression.  As far as I can
tell there was no user visible impact, but it made it very difficult
to reason about operator precedence.

This CL updates the analyzer and the analysis server so that they
don't hardcode any precedence values; instead they refer to named
constants in the front end.

In a follow-up CL I'll reduce some hardcoded precedence numbers in the
front end itself.

Change-Id: Id3869afeb83042cc7d6630a0a4a0533a07058736
Reviewed-on: https://dart-review.googlesource.com/c/93964
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-22 13:39:46 +00:00
pq ff265bb5ae remove dead default lint registration API
Change-Id: If900a670489c636b67c7866c18dfc220ba5f9877
Reviewed-on: https://dart-review.googlesource.com/c/93922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-02-22 13:37:36 +00:00
Jens Johansen 2087d6db46 initializeFromComponent has to include platform
For initializeFromComponent to work correctly the platform has to be
provided (as the other libraries provided are linked to some platform,
and loading another one is thus no good).
This CL changes it so we don't load another one, and checks that the
component we're trying to initialize from actually contains dart:core.

Change-Id: I88d30436c101c589b0555ff70ae21297ed665d7b
Reviewed-on: https://dart-review.googlesource.com/c/93435
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-02-22 13:08:45 +00:00
Peter von der Ahé 7f2a83ee07 BenchMaker: collect used type parameters
Change-Id: If6c18e66eded0ebe73575cca28dd77e5ae374890
Reviewed-on: https://dart-review.googlesource.com/c/93950
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-22 13:01:09 +00:00
Peter von der Ahé b3c9aa624e BenchMaker: print call operators
Change-Id: I83560b19e3f3ce3b535bc5a69c953a8df6a5f668
Reviewed-on: https://dart-review.googlesource.com/c/93948
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-22 13:01:09 +00:00
Peter von der Ahé 74f0a36579 BenchMaker: Print function type arguments correctly
Change-Id: Ieeae9ed53d86c2c2409be67397fad300f04849dc
Reviewed-on: https://dart-review.googlesource.com/c/93947
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-22 13:01:09 +00:00
Peter von der Ahé 6b29680b12 Enable collection of type checks for benchmarking
Change-Id: Iea59fcac1e56e3335f08c2a8dd7accc2b883547a
Reviewed-on: https://dart-review.googlesource.com/c/93946
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-22 13:01:09 +00:00
Kevin Millikin c9b8bae4e6 [Kernel] Add BlockExpression to the Kernel language
This is not yet used or tested.

Change-Id: Id050802926ad6452df3c39ace12ea5dd56d4faaa
Reviewed-on: https://dart-review.googlesource.com/c/87970
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-02-22 12:38:26 +00:00
Jens Johansen e4d1b28698 Incremental compiler should respect omitPlatform setting
Change-Id: Id842db646ba95945c8fadce0626cb8cbee2812ad
Reviewed-on: https://dart-review.googlesource.com/c/93433
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-02-22 11:44:45 +00:00
Aske Simon Christensen 25bd6a1bd8 [CFE] Remove dead code for boolean method invocation.
Boolean operations are translated into explicit kernel nodes, so they
will not appear as method calls during constant evaluation.

Change-Id: I30a0abfe37989228d5cff4b3fa3ff5407404e747
Reviewed-on: https://dart-review.googlesource.com/c/93980
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-02-22 11:31:15 +00:00
Martin Kustermann 128acb264b [VM] Decouple compile_type.h from runtime by making it only use runtime_api.h
Issue https://github.com/dart-lang/sdk/issues/31709

Change-Id: I36ae58a4d4f4540433cdb6de2aa370d025142863
Reviewed-on: https://dart-review.googlesource.com/c/93942
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-22 11:02:16 +00:00
Jens Johansen 93eca7745a Don't invalidate the entry point for no reason
In the incremental compiler we used to invalidate the entry point for
every invocation. This is no longer necessary, and we should stop.

Change-Id: I563bdea53c8ec85657fbb8be96d15ba3a7b57e3c
Reviewed-on: https://dart-review.googlesource.com/c/91824
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-02-22 10:52:25 +00:00
Stephen Adams af65aec21f [dart2js] Fix assignment chaining
TBR=sigmund@google.com

Change-Id: Iac7e40d60b39a7dd32b8a8ecc24a68781eb716fa
Reviewed-on: https://dart-review.googlesource.com/c/93932
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-02-22 02:23:45 +00:00
Stephen Adams bb8396592b [dart2js] Add tracing for codegen phases
Change-Id: Iace4d6037e7071d7642e510f0616c869cf30946b
Reviewed-on: https://dart-review.googlesource.com/c/93928
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-02-22 01:18:05 +00:00
jonahwilliams 3e304def65 switch dartdevc to kernel and fix path in rules.
The flutter engine needs to switch to the full SDK to include web support. As written, the dartdevc rules do not work outside of the sdk repo


Bug: https://github.com/dart-lang/sdk/issues/35834
Change-Id: I3b7711cf1920d86b82ddc4f0959b447207f54751
Reviewed-on: https://dart-review.googlesource.com/c/93760
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-02-22 01:02:05 +00:00
Stephen Adams b60a55510b [dart2js] Disable assignment chaining optimization
Disable while we look into variable allocator assertion.

Change-Id: Ib1e7c2eb869020ae8ecfa123801009adb6a742c7
Reviewed-on: https://dart-review.googlesource.com/c/93925
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-02-22 00:10:23 +00:00
Konstantin Shcheglov eff286becd Fix errors in mock SDK.
R=brianwilkerson@google.com

Change-Id: Ibb1beebaf6a2766a2fe6352868bd3464c9905f72
Reviewed-on: https://dart-review.googlesource.com/c/93927
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 23:55:33 +00:00
Jenny Messerly 4a50b02364 [dartdevc] fix #36001, non-generic classes and recursive supertypes
When two non-generic class had supertypes with mutually recursive type
arguments, the resulting module failed at startup. The compiler detected
the recursion and attempted to defer the supertype type argument
evaluation, but did not defer it long enough. The fix is to move these
deferrals after all classes are declared.

Longer term, a better fix will be #31003 which removes the need to
evaluate supertype type arguments during module initialization.

Change-Id: Ic8c5819521b3fedfcc207e932f11ae11cb03222d
Reviewed-on: https://dart-review.googlesource.com/c/93924
Commit-Queue: Mark Zhou <markzipan@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-02-21 22:48:10 +00:00
Ryan Macnak d253642f25 [standalone] Fix isolate messages for processes that a creating an AppJIT snapshot.
The standalone embedder was sorting classes in the main isolate, but not child isolates, causing the CIDs to diverge.

Also fix a few isolate tests.

Bug: https://github.com/dart-lang/sdk/issues/33128
Bug: https://github.com/dart-lang/sdk/issues/36000
Change-Id: Ic21acb02eb623ae177ed242aa21b0e243775e369
Reviewed-on: https://dart-review.googlesource.com/c/93923
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-21 22:39:39 +00:00
Brian Wilkerson f97f759ef3 Update the implementation of for loops
Change-Id: I492e8ce5303713cca0c742deeb53f670ebd21f84
Reviewed-on: https://dart-review.googlesource.com/c/93849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-21 21:23:19 +00:00
Stephen Adams 2b9e57e4b2 Move assignment chaining to own pass
- We get simplification from running after removal of HTypeKnown.
- Added chaining when the chain is used several times.

The best size improvement on apps I tested is 0.25% (minified).

Change-Id: If2c50dea5899efb402782ea92c76c4fe628e1c1d
Reviewed-on: https://dart-review.googlesource.com/c/93800
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-02-21 21:01:39 +00:00
Jenny Messerly 627e96c9c1 [dartdevc] simplify microtask scheduling using JS Promise
All of DDC's supported platforms have Promises, so we can use them
instead of MutationObservers (web) and timers (node.js).

See issue #20055 (same issue, but for dart2js).

Change-Id: Id635a4a9fa104a2ab19dd20824d209f682f831f9
Reviewed-on: https://dart-review.googlesource.com/c/91765
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-02-21 20:13:19 +00:00
Liam Appelbe ee32f8c87e [VM] Rehash sets after they are read from a snapshot.
Fixes: https://github.com/dart-lang/sdk/issues/35626
Bug: https://github.com/dart-lang/sdk/issues/35626
Change-Id: I4d5b3799072faf8abb16e9eac15b834dbecce07b
Reviewed-on: https://dart-review.googlesource.com/c/93843
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-02-21 19:39:09 +00:00
Alexander Aprelev 0e99581c35 [gardening] Restore flutter '--package' patch, add dartjs_info_tag engine patch
Change-Id: I19c4ceeca877f99128a733a23bb1ad5abd99e032
Reviewed-on: https://dart-review.googlesource.com/c/93848
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-02-21 19:06:40 +00:00
Ryan Macnak a6f6c55dc8 [timeline] In newer versions of Catapult, arguments to an async end event override those in the async begin event.
Bug: FL-135
Change-Id: Ie0763b068f61d6ee009540b822730d9a05b824ff
Reviewed-on: https://dart-review.googlesource.com/c/93900
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-21 18:50:29 +00:00
Ben Konyi 4cff5a4fd6 [ VM / Service ] Dynamically load source from linked-in platform kernel
- Added `Dart_SetDartLibrarySourcesKernel` to the Dart embedding API.
- vm_platform_strong.dill now contains the Dart SDK sources
- If vm_platform_strong.dill is linked into the Dart binary, the first
  request for a Dart SDK Script object from the VM service will load the
  sources for the script from the linked in kernel buffer.

Change-Id: I664abe31f9378d25ec79c21edce0b237a278495d
Reviewed-on: https://dart-review.googlesource.com/c/93375
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-21 18:22:39 +00:00
Dan Rubel bc53c4dcda Update AstBuilder unified collection parsing to reduce error messages
Change-Id: Ib1af352a7f957c775064eeaa946a401e1024c90d
Reviewed-on: https://dart-review.googlesource.com/c/93847
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-21 18:14:09 +00:00
Sigmund Cherem e3b8065625 Add support for --dump-info=binary
We continue to accept `--dump-info`, but now also accept `--dump-info=binary` so
we can use the new cheaper encoding.

Change-Id: I971cb9a3634ae1a333cfee14b2927c0e25000a01
Reviewed-on: https://dart-review.googlesource.com/c/93823
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-02-21 17:54:39 +00:00
Sam Rawlins 372537f1e4 Add first support for strict-inference as an analysis option.
The first code is HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE:

```dart
var a;  // Hint: The type of v1 cannot be inferred without a type or initializer
dynamic b;  // OK
var c = 7;  // OK
```

This is currently only enabled via an analysis options file:

```yaml
analyzer:
  language:
    strict-inference: true
```

I could add it as a flag as well, but to start using this internally at Google,
we only need support in the analysis options file.

Bug: https://github.com/dart-lang/sdk/issues/33749
Change-Id: Id2a6afa7c3d724b44c20576c7f48869abcf4255c
Reviewed-on: https://dart-review.googlesource.com/c/93700
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-21 17:28:19 +00:00
Konstantin Shcheglov c49537e743 Support for 'double' fields in summaries.
We already can store List<double>, but not `double` itself.

The LinkedConstantValue data structure I'm working on will have a
field of type `double`, so I need to support in in the generator.

R=paulberry@google.com

Change-Id: Ic5aa3a9a7266afabe6c64214fd68097fbebda4e8
Reviewed-on: https://dart-review.googlesource.com/c/93820
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 17:06:49 +00:00