Commit graph

85320 commits

Author SHA1 Message Date
Konstantin Shcheglov
2f6c7e31df Parse 'agument' when 'macros' feature is enabled.
Bug: https://github.com/dart-lang/sdk/issues/48541
Change-Id: I01b6b5bb9062a1921e0e171419a9ec1349621d8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-04-27 20:38:37 +00:00
Nate Biggs
8033bb0fa0 [dart2js] Add interner for DartTypes.
This interner handles both Kernel DartType and the dart2js model.

Some samples of memory usage before and after this change (from linking/output phase):

Before: https://screenshot.googleplex.com/ctYKkApkrqaoHDg
After: https://screenshot.googleplex.com/4fyCXXNNUbyWSyu

Before: https://screenshot.googleplex.com/4nLYCQ6CkqdzgaQ
After: https://screenshot.googleplex.com/5N9btNjGbsdHpW3


Change-Id: I1b86bc1a134703259830a6ea31b4ccb10abaea8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241621
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-27 20:33:34 +00:00
Paul Berry
3203a0784a Additional tests for deferred function literals.
These tests exercise the "deferred type inference of function
literals" part of https://github.com/dart-lang/language/issues/731
(improved inference for fold etc.) for super-constructor invocations
and redirecting constructor invocations, both of which have their own
code paths in the analyzer.

Change-Id: I6877ac3c07a3cca31550ba74d941d250c8410cfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241987
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-04-27 20:30:35 +00:00
Alexander Markov
609ba96115 [vm] Fix assertion failure during class finalization
TEST=vm/dart/regress_48323_1_test

Issue: https://github.com/dart-lang/sdk/issues/48323
Change-Id: I50c04a269183c0df5b4ce0ce7be32cd2385e95d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242601
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-04-27 19:19:54 +00:00
Stephen Adams
d50e9e9355 [dart2js] Migrate ir/static_type_cache.dart
Change-Id: Ife640422d829cf7e74015876788df1c83e4df3ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242522
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-27 19:08:04 +00:00
Stephen Adams
4d9da00440 [dart2js] Migrate elements/types.dart to NNBD
- create a small 'facade' interface CommonElementsForDartTypes so that common/elements.dart can implement this interface to break the cycle between common/elements.dart and elements/types.dart

- Separate the tagging enums used into serialization into a separate 'tags.dart' library.

- Scattered hints to help the migration tool.

Change-Id: I8dbb993ebeb85f240392bafa53e4cc235825f63e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242506
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-27 19:05:44 +00:00
Aaron Clarke
904303f8a1 Made HashMap.update faster by reducing it to one lookup.
fixes https://github.com/dart-lang/sdk/issues/48866

Test=ci and golem

Change-Id: Ia56bd5b5de83dc8f7263eeda27e7abd3af42851e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242120
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-04-27 18:30:14 +00:00
Ryan Macnak
ad4126bba4 [vm, compiler] Use more compressed instructions on RISC-V.
dart2js.aot.rv64 25290024 -> 25042040 (-0.98%)
dart2js.aot.rv32 24466620 -> 24000012 (-1.91%)

TEST=ci
Change-Id: I0b60d0c3bd8df036426898e00cf650b398abb397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242065
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-04-27 17:11:35 +00:00
Ryan Macnak
5748add35c [vm] Use a big-endian encoding for snapshot ref ids.
When unconditionally adding in each byte, this causes the last-byte marker to appear in a constant position. The correction factor for each exit branch is the same, allowing it to be folded into subsequent load offsets.

Startup.ReadProgramSnapshot(StartupTime): on a Moto x4
  arm32  40456 -> 37414 us (-7.52%)
  arm64c 46012 -> 44457 us (-3.38%)

TEST=ci
Change-Id: Ie7fd69504f9d9edf0c17458281a3750931d7d97b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242392
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-27 16:08:19 +00:00
pq
a369ec9ea4 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: I830cb452de32ed1b966a176ff88321af9493c62c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242504
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 16:06:47 +00:00
Konstantin Shcheglov
c6f10e69dd Separate building macro applications and executing.
Change-Id: Iaa6eb486a1765b9a35f113d800b29a11fea8c2f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-04-27 16:00:04 +00:00
Danny Tuppeny
6a35b62adf [analysis_server] Don't insert default argument values when already present
Fixes https://github.com/Dart-Code/Dart-Code/issues/3906.

Change-Id: Ia6bec7e9924114de5428ef6474c8ba44a202a45f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242549
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-27 15:58:45 +00:00
Danny Tuppeny
f8d011ebb4 [analysis_server] Fix flaky tests that didn't wait analysis context rebuilds
Change-Id: If8731da0128752c01a4d2f4aaab22af2a07ab4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242542
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-04-27 14:31:44 +00:00
Danny Tuppeny
5dafbb8889 [dds] Provide better error output for DAP protocol violations
See https://github.com/flutter/flutter/issues/99734.

Change-Id: Idf23f745d0736db41a195fd5294b5f545c2a39a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240541
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-27 14:12:54 +00:00
Vyacheslav Egorov
df29275537 [vm/aot] Strip google3 scheme in --resolve_dwarf_paths
This makes some internal tools work better with our DWARF information.

TEST=tested manually internally

Bug: b/230585082
Change-Id: I7223ff368dc75b4f45eecee8478f29816670051c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242560
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-04-27 13:07:21 +00:00
Johnni Winther
39333427c0 [cfe] Augment test to use nonfunction type alias
Change-Id: I478d1abf75f8a9a9d162a75f9885545d61c9d5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242541
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-04-27 12:47:18 +00:00
Martin Kustermann
b85679eaf3 [vm] Avoid runtime call in common type literal "T" case
Right now all type literal usages will perform a runtime call which is
rather slow.

Flutter happens to use type literals such as `return T;` in hot code
which causes this to show up in the profile.

This CL adds fast paths for type parameter type literals if
the type parameter value (i.e. entry of TAV corresponding to T):

    * is `null`: return `dynamic`
    * is a non-FutureOr [Type] with compatible nullability: return value
    * is [FunctionType] with compatible nullability: return value

otherwise fall back to runtime call.

It makes simple type literal uses 10x+ faster - the kinds that Flutter
is using.

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

TEST=vm/dart{,_2}/instantiate_type_literal_test

Change-Id: I1139d6689aedbc68321f47ee6c9946a3323fbf6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241968
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-27 10:26:25 +00:00
Jonas Termansen
68a6b6fa63 [benchmarks] Roll benchmark_harness to 6a99d14719ef3f251041a9fcbe0589f312499696
2022-01-29 kevmoo@users.noreply.github.com Fix analysis_options issue (71)
2021-10-20 kevmoo@users.noreply.github.com Move to pkg:lints (70)
2021-09-27 whesse@google.com Minor Syntax Highlighting Improvements
2021-09-27 whesse@google.com Merge branch 'master' into patch-1
2021-09-27 whesse@google.com Merge pull request 63 from parlough/patch-1
2021-02-24 parlough@gmail.com Remove "Learning more" link
2020-09-10 philippefanaro@gmail.com minor syntax highlighting improvements
2021-08-18 vegorov@google.com Change LICENSE to BSD (69)
2021-07-31 kevmoo@users.noreply.github.com Fix updated lints (68)
2021-07-10 kevmoo@users.noreply.github.com Dart format with latest SDK (67)
2021-06-01 parlough@gmail.com Update README example for modern Dart conventions (64)
2021-04-20 kevmoo@users.noreply.github.com Update dev_dependencies on build_* (66)
2021-03-31 58489007+franklinyow@users.noreply.github.com Merge pull request 65 from dart-lang/franklinyow-patch-1
2021-03-31 58489007+franklinyow@users.noreply.github.com Update LICENSE
2021-02-05 jakemac@google.com stable null safety release (62)

Change-Id: I3fe7f4941b2903cf9eada99a4d31fee74a884fd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212747
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2022-04-27 08:50:24 +00:00
Ahmed Ashour
7352712902 Fix UseResult in AsExpression
Fixes #48879

Change-Id: Ib43b72f96d05a119f37e18ca47bf71d2d0ebc52c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242287
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-27 03:36:44 +00:00
pq
bb47e41ab2 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: I873400f61748a145f3c2a6630a21bcd1975c309c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242503
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:29:34 +00:00
pq
68fa0e96d0 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: If663698d9cab270accd477a507071232905bc083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:23:06 +00:00
pq
4b7a27a922 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: I8a558d2c9b80d2a0411ca8603201d62451c734dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242501
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:15:24 +00:00
pq
cdaf885546 no_leading_underscores_for_local_identifiers
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: Idf2b91fa3b845d8b921b7eb68b937d19c4ea188e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242502
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:15:04 +00:00
Ryan Macnak
57f68b377a [vm, gc] Don't round Scavenger::UsedInWords up to the nearest TLAB.
Rounding usage up to the TLAB causes excessive growth because it gives the growth policy a very inflated view of the survivor ratio.

Ensure new-space grows specifically to provide enough TLABs for active mutators.

TEST=golem
Change-Id: Iab01df18c6a8ac996e0f0b2707c9da7e14c7f4a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241689
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-26 23:35:54 +00:00
Ryan Macnak
19a59df399 [vm, compiler] Unroll object initialized to the allocation unit.
1/2 or 1/4 branches executed per object initialization for uncompressed and compressed pointers respectively.

Note ARM32 already has double-wide initialization.

TEST=ci
Change-Id: Iacc61cac39f74191bb2e5e06cd48b90c006b8585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241622
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-04-26 21:49:34 +00:00
Konstantin Shcheglov
63a2c57903 Await resolveForCompletion() in performWork().
Change-Id: Ia2ca0a417986f5d2a5dbd19837af342c173ddcc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-26 19:31:34 +00:00
Brian Wilkerson
a4dceb5ec1 Remove ServerDomainHandler
Change-Id: Id32d55b7e8b14c9dd63d843bb463cc6559600ff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242482
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-26 18:28:24 +00:00
pq
7ef0a4b9e5 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.


Change-Id: I6fac27b2b720343d10732afce5cd0e8ae5ce5ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242422
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-26 18:25:14 +00:00
pq
5470e07025 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: If6e6497418e7044ce906d87981e3b3afa1f26da8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242423
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-26 17:48:43 +00:00
Konstantin Shcheglov
79a78bde6d Remove unused global counters and timers.
Change-Id: I5a4dfbde154711a98b4752e4f5c6168ddd341853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-26 16:58:54 +00:00
Konstantin Shcheglov
86a9491759 Set 'includeSources' to 'true' so that stack traces include line / column.
Change-Id: I0db127e55e95a8535bc853ba9b0a45451a151e2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-26 16:02:23 +00:00
Brian Wilkerson
b922aa00f2 Remove CompletionDomainHandler
Change-Id: I242358ec168fd047576117f2cbfe6e380e9c86c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-26 16:02:17 +00:00
Martin Kustermann
efdffab8b7 Reland "[vm] Fix some async* semantics issues: Only run generator if there's active subscription (not paused/cancelled)"
This fixes an issue where VM would run the async* generator after a
`yield` / `yield*` even though the subscription may be paused or
cancelled.

Furthermore this fixes an issue where `StackTrace.current` used
in async* generator crashes VM and/or produces truncated stack
trace.

This fixes the following existing tests that were failing before:

  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t08
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t10
  * language/async_star/async_star_cancel_test
  * language/async_star/pause_test

New in reland: Allow the generator to to cause cancelling it's own consumer.
This addresses the issue of original revert
  -> see https://github.com/flutter/flutter/issues/101514

Issue https://github.com/flutter/flutter/issues/100441
Issue https://github.com/dart-lang/sdk/issues/48695
Issue https://github.com/dart-lang/sdk/issues/34775

TEST=vm/dart{,_2}/causal_stacks/flutter_regress_100441_test

Change-Id: I091b7159d59ea15fc31162b4b6b17260d523d7cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242400
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-26 12:01:34 +00:00
Martin Kustermann
0b5a8faa01 [vm] Ensure hot-reload will allocate-finalize new classes if old ones were
This was missed when is_allocate_finalized() was introduced and is now
revealed due to [0] having added

  ASSERT(cls.is_allocate_finalized());

into object allocation paths that were calling finalization code before.

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

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

TEST=Fixes test failures.

Change-Id: I5ff0491d4980630cbdbf799f15aa45089ee4d15f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242101
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-26 11:45:48 +00:00
Aske Simon Christensen
89e485cd2e [dart2wasm] Refactor generate method into individual kinds
Change-Id: I6c41931232f6b3805271c85e544431763d2c747d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241966
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-04-26 09:00:03 +00:00
Dan Field
fe30c3f235 [vm] Expose whether extension stream has listeners, guard postEvent
This avoids json encoding that was otherwise happening even in product mode. JSON encoding shows up CPU profiling as taking significant time, particularly on low end devices.

TEST=runtime/observatory/tests/service/developer_extension_test.dart

Bug: https://github.com/dart-lang/sdk/issues/48860
Change-Id: I2cf4d949e85c0b23de01ec2033b04527d40c76fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242081
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
2022-04-26 07:53:43 +00:00
Jens Johansen
d2356115d0 [CFE] Demonstrate late lowering recompilation bug
Change-Id: I8af2b05294c17b80ff2c3f92e5c4d38e5da7aaa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242285
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-04-26 06:46:03 +00:00
Konstantin Shcheglov
2fc5effcaf Use AwaitExpressionImpl directly, remove from factories.
Change-Id: I2e0e68fedb7057b71d67856f59220aded7dd1f56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242390
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-26 05:38:33 +00:00
Konstantin Shcheglov
dc26f9b2f3 Reanalyze when code that might be executed by a macro changes.
Change-Id: Ib47ca17ddec19df90b2409113cfe36ad1920ffcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242388
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-26 05:38:19 +00:00
Brian Wilkerson
0927b5bfd7 Remove the SearchDomainHandler and FlutterDomainHandler classes
Change-Id: I4673664068296f9a42fc2e1797f64db4022e8537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242387
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-04-26 04:24:33 +00:00
Stephen Adams
b314f3f5ea [dart2js] Migrate selector.dart and call_structure.dart
Change-Id: Idd3e326fb974118d593b1737f898ac78567a054c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242301
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-04-26 03:49:13 +00:00
Chris Bracken
eabec1c6a5 Use Utils::StrDup in place of strdup
This avoids warnings about strdup being deprecated in favour of _strdup
on Windows.

TEST=manual build, observe no warnings are produced

Bug: https://github.com/flutter/flutter/issues/59199
Change-Id: Ide390f3a719b9598bea0fc9976be3fb337f4de37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242386
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-04-25 23:12:53 +00:00
Konstantin Shcheglov
d8b0237e54 Add Stream.whereType() extension method.
This is a tool that will help us later.

Change-Id: I7d0411da702c46ce57d88070afd1f35cd1dd0dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242385
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-25 22:44:03 +00:00
Sam Rawlins
e9e48993f8 Remove unused maxResults parameter
Change-Id: Icbf8321aaca10dafad1ae34cbc395085b13b3b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242382
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-25 21:47:14 +00:00
Konstantin Shcheglov
ccfc5d8ca2 Implement resolveForCompletion() using the same queue of requests as other.
With linking elements being async the resolution operation became
interruptable, so we might see incomplete element model sometimes.

Change-Id: Ic108fd1e45b055dba1a46e9a80cdc7fb2ed5ee4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-25 21:43:33 +00:00
Konstantin Shcheglov
76387a9c5b Support for google3 locations in 'packageRoot' and KernelCompilationService.
Change-Id: I90910bc3c966f648ade107d10d4c7f593c67c7a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-25 19:46:13 +00:00
Joshua Litt
460c2115e7 [dart2wasm] Factor type code into its own file.
Also encodes `typeTypeArguments` as a FieldIndex instead of a number
literal.

Change-Id: I6e71c1ec358fdbadaa2b3c9d94975647c5be52fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242320
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-25 19:31:52 +00:00
Joshua Litt
c242053202 [dart2js] Fix bug in constant impact visitor.
Currently we do not collect constants from UnevaluatedContants.

Change-Id: Ie9ff2cd09cdd654f2294f4eee42edbfdc652695f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-25 18:51:37 +00:00
Sigmund Cherem
2b806379e2 [dart2js] update pubspec.
My local IDE was happy using the .packages file that used to be
pre-generated by default.  That file was removed from the repo, so I
need to call "dart pub get" to generate it on my local workflow.
This changes makes it possible to do so.

Change-Id: I7c9433cb71423c60810c6a5fc18e7da73c9bbe0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242261
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-25 18:29:02 +00:00
Aaron Clarke
cd8ceb0a99 Updated the DynamicLibrary docstring to specifically call out static
libraries and to avoid confusion between "DynamicLibrary" and "dynamic
library".

fixes: https://github.com/dart-lang/sdk/issues/44126

Change-Id: I7aab94e94b4e31ccffea047dcaaffc6fb6447662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242242
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-25 18:19:52 +00:00