Commit graph

67633 commits

Author SHA1 Message Date
Daco Harkes c49378aadf [changelog/ffi] Document dart:ffi changes for D26 - tweaks
Follow up of https://dart-review.googlesource.com/c/sdk/+/122149

Change-Id: I74f93e0a17a4a648da742cd2e62a424cfc1eb3db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122621
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2019-10-23 09:45:25 +00:00
Jens Johansen 18fa7485ad [kernel] Read ContinueSwitchStatements in nested FunctionNodes correctly
Closes #39040

Change-Id: I8ae9a89cfd750dddbf0a994e93d9b2aa2d46490c
Fixed: 39040
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-23 08:34:27 +00:00
David Morgan 107546a18e Revert "[dartdevc] Making multi-root paths consistently use url-relative path separators."
This reverts commit eafe8b04c0.

Reason for revert: Breaks google3.

Original change's description:
> [dartdevc] Making multi-root paths consistently use url-relative path separators.
> 
> Fixes #38802
> 
> Change-Id: I8b0e9525d0be9a00b9189d673f2881d432de4b66
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122419
> Auto-Submit: Mark Zhou <markzipan@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=jakemac@google.com,markzipan@google.com

Change-Id: I5b2878b69f3d01852eb4d4429f7cd8909760d6f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122620
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-10-23 07:24:59 +00:00
Paul Berry 2e6afae4c3 Ignore EMACS backup files when running ID tests
Change-Id: I80891b2194522cd9c5746fff8c749a0edf2df4d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 07:04:16 +00:00
Paul Berry dfddeada02 Flow analysis: treat expressions of type Never as unreachable.
Change-Id: I4e6c629e4f9f8ebba3c7b2168b421a723c69928b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122417
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 05:52:26 +00:00
Sam Rawlins ba4f7f18cf Sort members in workspace tests
Change-Id: Ic9b6eb55d071c25b08e835b2768b41e7d57f101c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122491
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-23 04:32:47 +00:00
Sigmund Cherem cccb9ffb2a Stop timer callbacks after a hot reload
Change-Id: I90f0f2311524670fe52014de917afa3a35e3037d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122522
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-10-23 04:16:06 +00:00
Nicholas Shahan 1451e9ee39 [dartdevc] Respect the NNBD experiment flag setting more often when patching SDK
Tested with the dart:math migration.
https://dart-review.googlesource.com/c/sdk/+/120060

Change-Id: Id62dd197dfa4d4e744ae581c6cd423444baeb1dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122521
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-22 23:00:46 +00:00
Anna Gringauze 17ed3cb5b3 [dart2js] Fix URI leak when using deferred load
Passed library name instead of URI to "checkDeferredLoad" in the
generated JS. The URI was only used to report errors on library load at
runtime - the user should be able to to find the URI in the dart import
statemement instead.

Closes https://github.com/dart-lang/sdk/issues/37623

Notes:

- The URI is also stored in the deferred library's source map. If finding
this information on load failure is too inconvenient, we might consider
storing the URI in the main source map as well, and making sure that the
URI is loaded from the source map on load failure at runtime, for better
error reporting for users who have access to the source maps.

- Not sure how much work is needed for this to be done, so leaving this
until the need arises.

Change-Id: I90caa560e7c57c61e810b9ca4cfc648cddba5905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122200
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2019-10-22 22:47:37 +00:00
Lasse R.H. Nielsen 6ca96aceb7 Migrate dart:math to NNBD.
Change-Id: I8da8707957e9b2827e8d8ee0152c7260f7ddecd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120060
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-10-22 22:22:36 +00:00
jonahwilliams f11dea963c document readIntoSync return type
readIntoSync does not document what the return type of the function is, though it could be infered from the behavior of the non-sync method.

Change-Id: Ie62b5b4e5ea469a0dc841219f1515ac917325355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122409
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2019-10-22 22:13:36 +00:00
Nicholas Shahan c33faf391c [dartdevc] Move NNBD specific test helper methods to their own file
Allows for reuse of the standard helpers that create types with and without
NNBD.

Change-Id: I8e16483e704efb47173f56c126311f7d57ece8a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122487
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-22 21:55:26 +00:00
Alexander Markov 7ac22ac28f [vm/bytecode] Omit null stores into context when declaring a captured variable
Change-Id: I35c0de039021dd627e8d2604d37675d24c5ec089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122481
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-10-22 21:01:11 +00:00
Mark Zhou eafe8b04c0 [dartdevc] Making multi-root paths consistently use url-relative path separators.
Fixes #38802

Change-Id: I8b0e9525d0be9a00b9189d673f2881d432de4b66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122419
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-22 20:59:58 +00:00
Alexander Aprelev be3348253d [gardening] Fix sink use in frontend-server dartdevc.
This is follow-up to  https://dart-review.googlesource.com/c/sdk/+/122461.

Change-Id: Id0c11daa1f37bf7254e5a75f28d64cac37ea9175
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122520
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-22 20:53:06 +00:00
Martin Kustermann d9a306fc59 [vm] Avoid allocating monitors globally - embedders in certain situations will run into reported leakes due to them
Change-Id: Ied0446aebfdd8fb7e15c510cdf4160ff9ad013a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122148
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-10-22 20:31:56 +00:00
Aart Bik 5478c381db [dart/fuzzer] Resort to constant collections inside subscripts
Rationale:
Using constant, small collections inside subscripts avoids
growing collections too much due to allocating new elements
for every literal. This also allows using non-flat data
structures again in our nightly testing.

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

Change-Id: If4bdc72f88f8c7d181709e829d35105a54cf8889
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122423
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2019-10-22 20:22:26 +00:00
Sam Rawlins bc5fb05def NNBD i13n: Highlight non-nullable types with upstream triggered edges
Change-Id: I10fc2f731381ab60f0f724b2d463533895348500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122405
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-22 20:06:06 +00:00
Paul Berry 4ab09db0f4 Analyzer flow analysis for null-aware operators.
The front end implementation is in a previous CL
(https://dart-review.googlesource.com/c/sdk/+/122415).  This CL
contains the analyzer implementation and the integration tests.

Note that the analyzer implementation of null shorting is incomplete,
so some corner cases couldn't be tested.  I'll be fixing this in
follow-up CLs.

Change-Id: I0935ee4c67b24f8bf7c70cbb7ec56dd826fbf73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122416
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 19:18:16 +00:00
Paul Berry 689c934406 Flow analysis: add support for null-aware accesses.
Change-Id: I4367a1dd23d981b885a48d7fbe129d2288787a9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122415
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 19:18:16 +00:00
Ryan Macnak 6a65ea9cad [vm] Remove shared snapshot and reused instructions features.
Shared snapshots have been disused by Fuchsia deduping.
Reused instruction has been disused by Flutter code push.

Change-Id: Ia4cb570935c233a9365d521ca04a477c5550ef83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122421
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-22 19:02:26 +00:00
Alexander Aprelev db8370e361 [gardening] Fix frontend-server dartdevc windows test.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/121400.

Change-Id: I45afdc8094f8b8d4be3e774bf475dc7b20a71498
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122461
Reviewed-by: Jonah Williams <jonahwilliams@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-10-22 17:49:06 +00:00
Kallen Tu 4601bd7bff Modified supertype check error message to be more descriptive.
Change-Id: I3068bf195eb9a746d25ac62007eaeac0296d3087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121463
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-22 16:59:16 +00:00
Jens Johansen 0449905e2d [CFE] Add a serialization-and-unserialization step to strong test
Change-Id: Icb6275e9eaec0bbdd890719d780a0218fa660fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-22 13:40:01 +00:00
Michael Thomsen c8b903c2f9 Update CHANGELOG.md
Clarify that extension methods in 2.6 are in preview

Closes #39016
https://github.com/dart-lang/sdk/pull/39016

GitOrigin-RevId: 6f6a43bcfa314a0a7eea644ef588555550bef434
Change-Id: If018d323a358db465e9c60ae1ef1d0baec8ed178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122400
Reviewed-by: Alexander Thomas <athom@google.com>
2019-10-22 13:33:20 +00:00
Clement Skau 2a12a13d96 [Test] Skips emit_aot_size_info_flag_test on crossword.
This should cycle vm-kernel-precomp-mac-release-simarm_x64 green again.

#gardening

Change-Id: I48b12d7cd015fff75756dc2e2a28ca4f2d98fcbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122390
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-22 13:00:21 +00:00
Johnni Winther b26127fe01 [cfe] Add reachability test skeleton
Change-Id: Iac74d450816f1781512d44d533464e7c9857fed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122388
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-10-22 12:26:31 +00:00
Karl Klose 5814319bf9 [infra] Remove support for run.json
Change-Id: I5d8b02df2d2dad6b53e6365a9d004bed07f4c59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122387
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-10-22 11:40:14 +00:00
Daco Harkes cf3cb29dec [vm/bytecode] Do not emit inferred type if unreachable - fix comment
Follow up of https://dart-review.googlesource.com/c/sdk/+/122147

Change-Id: I5849bcfe76375b6e3a55f3450ad69af4ebd46801
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122340
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2019-10-22 11:20:24 +00:00
Martin Kustermann e2faac751e [vm/aot] Fully enable deduplication of instructions in bare mode
Currently the switchable calls require there to be a unique PC -> Code
-> Function mapping to re-construct the arguments descriptor which was
lost when transitioning from unlinked to monormophic.
=> This prevents instruction deuplication in bare mode for those
   functions, because the PC -> Function mapping is amgiguous (the
   frames don't have a Code object on the stack we can use)

This CL preserves the (name, args-descriptor) per switchable call site when we
go from unlinked to monomorphic state by remembering it in a map. When
transitioning out of monomorphic we can use this map to re-construct the
name and arguments descriptor (and delete the map entry).

Flutter gallery release size impact:

  * arm64: total -2.33 % (-3.62% RX)
  * arm:   total -1.72 % (-2.65% RX)

From local testing it seems like running flutter gallery in profile mode
and connecting via observatory the memory consumed by UnlinkedCall
instances seems minimal.

Change-Id: I55902e6f11c9941493c610ed18f26bc5fc3dcf59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121421
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-10-22 11:13:14 +00:00
Paul Berry aeede3c1b0 Flow analysis: pass catch variables to tryCatchStatement_catchBegin.
Previously, it was the caller's responsibility to call initialize()
for any variables declared in a catch block.  Now this is done
automatically.

Change-Id: If9c586e12f7d114517476e56e984d16a570648e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122413
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-22 10:56:54 +00:00
Paul Berry 1e7bfd6449 Sort declarations in flow_analysis_test.dart
Change-Id: Ie82537ffe4daa41ca9a15436d8f0788b1c1cfe8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122412
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-22 10:56:54 +00:00
Paul Berry 9579c4bc3c Flow analysis: simplify use of isExpression_end.
Previously, it was the caller's responsibility to determine if the
subexpression of an "is" expression was a read of a promotable
variable.  Now, the caller calls isExpression_end regardless of what
the subexpression is, and flow analysis determines whether promotion
should happen or not.

Change-Id: Ibba689935580d4e9c5ab79e5afb534c173386232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122411
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-22 10:56:54 +00:00
Johnni Winther a58d337bd3 [cfe] Add helper for creating binary expressions.
Change-Id: Ieeafa15bbecaaa53c4624219fa0256c03d2c3207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122380
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-22 10:04:54 +00:00
Johnni Winther e76f6d49e4 [cfe] Implement null-shorting for most expressions
Binary operations and parenthesized expression are shorted which they
shouldn't be. Also, so complex expressions, like compound assignment,
are not handled because they need to be encoded in a more high-level
internal expression to support choosing the receiver based on shorting.

Change-Id: I0bdeabdc21da7d80f533ea0880662bfb11341c6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121856
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-10-22 10:04:54 +00:00
Jens Johansen 596eb91228 [kernel] Update smoke_test_quick after CFE rename of _test to _suite
Change-Id: I87e416aa8838ccafb7d9044b8c30d46bd329cb72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122385
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-22 09:33:13 +00:00
Siva Annamalai e1c409792c Revert "Reland "Update BoringSSL to 4dfd5af70191b068aebe567b8e29ce108cee85ce.""
This reverts commit 7eeaeade6b.

Reason for revert: This change requires some changes to he Flutter license script before it can be rolled into Flutter, Since changes on the Dart side are mounting up I am reverting this change so the roll can move forward and then we will reland this change with the right fixes to the license checking script.

Original change's description:
> Reland "Update BoringSSL to 4dfd5af70191b068aebe567b8e29ce108cee85ce."
> 
> Change-Id: I7bdc0f0d55af2ecced789f1aa8f37b804641eaf4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121887
> Reviewed-by: Jonas Termansen <sortie@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=sortie@google.com,rmacnak@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I548844e9d58559e6ed5796dff08f3ab0644c6dc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122410
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-10-22 05:54:53 +00:00
Konstantin Shcheglov d0e35833b3 Remove UnitExplicitTopLevelAccessors, UnitExplicitTopLevelVariables.
Change-Id: Ic7273cca19e98f47b7ef4a3cf62ded9b0a51bed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122305
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:46:13 +00:00
Konstantin Shcheglov 159e0b74bc Remove SourceContainer, Source_ContentReceiver.
Change-Id: I6e801382605d412f1f24d09ee58009c249439d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-10-22 05:28:28 +00:00
Konstantin Shcheglov e85c98b1f9 Remove BuildLibraryElementUtils.
It was used by task model, so is not used anymore.

Change-Id: Ic0031adc8d1784d4e881489318d2a9efe954b9da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122282
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:22:08 +00:00
Konstantin Shcheglov 4ce76d4d46 Remove AnalysisCache, CachePartition, SdkCachePartition.
Change-Id: I8d6291f5292638571ae7dbf848f15acb2a9af8bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122283
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:20:23 +00:00
Konstantin Shcheglov 7d474c95bb Remove fixed GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED.
Change-Id: Id5119149cf24fe748a3100b3a2b774915928ddf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122303
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:14:03 +00:00
Konstantin Shcheglov c3cd6b0c6e Remove VariableGatherer and related.
Change-Id: I4c2982e14f09c4876765cc70fc47c0261eaf24b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122304
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:06:03 +00:00
Konstantin Shcheglov de63b83b5b Remove TypeParameterSerializationContext.
Change-Id: I491eb58ebac00cddb3112bcfafa51d39cda1788e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122302
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 04:51:45 +00:00
Konstantin Shcheglov bf9cef0ab9 Remove two unused methods in ElementImpl.
Change-Id: I5c023b8d4dc1261df5b2e58d13fe08508cf27a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122301
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 04:47:43 +00:00
Alexander Markov 6de2f92033 [vm,bytecode] Allocate objects lazily in bytecode generator
Previously, bytecode generator was allocating a bunch of objects
eagerly when starting bytecode generation for a member. Most of these
objects are maps and lists which are needed only under certain
circumstances. With this change these objects are allocated more lazily,
only when needed.

Also, this CL fixes crash in LinkReader.setOffset when reading/dumping
bytecode.

Change-Id: I11c561e4f00c456e92f42530d3d4e6008b5f5daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122407
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-10-22 00:30:32 +00:00
Nicholas Shahan 929a306bfc [tests] Fix missing space in failure message
Change-Id: I7d02362076fc17379dc67c98b87f96866dbde7aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122403
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-21 23:09:42 +00:00
Tom?s Arias a0291729f5 Fix documentation for InternetAddress.lookup()
Closes #38808
https://github.com/dart-lang/sdk/pull/38808

GitOrigin-RevId: 23b6561016286b1dd22cddf1337fb09f478deaa3
Change-Id: Iad5f38e140b201c4d8ea86d2769ae34e242ffc83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121040
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2019-10-21 23:06:52 +00:00
Zichang Guo b942142e9e [io] add testcases for link pointing to directory
As Alex suggested, add test for links of directory. Previous cl only check links pointing to a file.
https://dart-review.googlesource.com/c/sdk/+/122028/

Change-Id: I0529c9cdde3178a3364b0d091c833b5c63a39b47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122422
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-10-21 22:31:32 +00:00
Alexander Markov 230f48d685 [vm,aot] Simple unreachable code elimination before type-flow analysis, take 3
This is a reland of 56991ad94b

Original change's description:
> [vm,aot] Simple unreachable code elimination before type-flow analysis, take 2
>
> This is the relanding of https://dart-review.googlesource.com/c/sdk/+/121500
> with fixes.
>
> Original CL description:
>
> This change adds transformation for very early cleanup of unreachable
> code such as code guarded by if statements with constant conditions or
> code used in assert statements when assertions are disabled.
>
> The advantage of cleaning such code early is that type-flow analysis
> won't be looking at it and TFA-based tree shaker is able to remove
> more code.
>
> flutter_gallery_total_size -0.5663% (arm), -0.5409% (arm64)
> build_bench_total_size -2.533% (arm), -2.449% (arm64)
> gesture_detector_total_size -4.183% (arm), -4.072% (arm64)
>
> Change-Id: Ief8ebd0cd828c0e7a847a824f44d2d97a3595b87
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121901
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

Change-Id: I82ea0f70845851f85ec159c366f408aa7f9e5788
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122166
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-10-21 21:41:39 +00:00