On iOS name resolution can take unexpectedly long because it waits for both ipv4 and ipv6 results and in some cases ipv6 lookup can take long. This CL runs explicit ipv4 and ipv6 concurrently and picks up first successfully resolved name it can connect to.
Fixes https://github.com/dart-lang/sdk/issues/41451
TEST=standalone/io/http_force_concurrent_ipv6_lookup_test
Change-Id: Ie9b7ca0493d945e2eeb8de1dec7bbacdeb902785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177560
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Currently `Uri.http` and `Uri.https` factory constructors do not allow for `queryParameters` to be `Map<String, dynamic>`, but only `Map<String, String>`, when in fact the main `Uri` constructor does work with `queryParameters` as `Map<String, dynamic>`.
Closes https://github.com/dart-lang/sdk/pull/42564https://github.com/dart-lang/sdk/pull/42564
GitOrigin-RevId: 6fa130cc4325ae99d96260e8dc0a222398e7522f
Change-Id: Ia1ee0911ec4d80df75792a365af9ca143a729fa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163620
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This CL avoids the infinite loop created by allowing the parser
to parse it as a complex type (despite no actual name after it) and
adds a few asserts in an attempt to catch rewriting on eof (setting a
token after eof).
Fixes#42229Fixes#44477
Change-Id: Ie2da0957894067a3d4748cb6384bc9d6cf32c215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150521
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
S-register operand used in VCVTDS instructions cannot be allocated to
an arbitrary Q-register and needs to be constrained (otherwise an
invalid instruction is generated).
TEST=runtime/tests/vm/dart/regress_42067_test
Fixes https://github.com/dart-lang/sdk/issues/42067
Change-Id: I46b5ff3c75a50361eccebb1c74878bfb3c35d301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178162
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This is a step toward deferring literals, to effectively split binary size for libraries that are more data than code, such as localizations. Bare instructions mode still has all constants in the root snapshot because it has one global ObjectPool.
dart2js+analyzer product X64 non-bare:
app.so 10072728 -> 8479824 (-15.8%)
app.so-2.part.so 14074512 -> 15016976 (6.69%)
app.so-3.part.so 9225936 -> 9888984 (7.18%)
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: If61f6156e3fc2dd539331335b3bf0458102b7c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168991
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
messages.
* UNCHECKED_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_METHOD_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_OPERATOR_INVOCATION_OF_NULLABLE_VALUE
* UNCHECKED_PROPERTY_ACCESS_OF_NULLABLE_VALUE
* UNCHECKED_USE_OF_NULLABLE_VALUE_AS_CONDITION
* UNCHECKED_USE_OF_NULLABLE_VALUE_AS_ITERATOR
* UNCHECKED_USE_OF_NULLABLE_VALUE_IN_SPREAD
* UNCHECKED_USE_OF_NULLABLE_VALUE_IN_YIELD_EACH
Additionally, improve the ADD_NULL_CHECK quick fix by supporting
expressions which need to be null-checked in a for-each, a yield-each,
and a spread.
Bug: https://github.com/dart-lang/sdk/issues/44603
Change-Id: Ie493a2dc1c05b64a16fd17c77d3468e8d562c497
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178080
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This test has been failing for a long time because it had invalid expectations.
The test was written to test that, when overriding a member and making a
super call on a native class, we properly call the super Dart stub and
the super JavaScript method.
The former was handled properly (in the test the default parameter value
was injected according to the super type), but the latter was never
implemented (the generated code invoked `receiver.foo` instead of
`BB.prototype.foo.call(receiver, ...)`
We don't have plans to add support for the latter at this time. In the
future we do want to consider adding a static error checker to ensure
that we don't attempt to use this missing feautre.
Change-Id: I5f5179ebdf31d24d4a0b1edb8f947b94f85934ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178060
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
The implementation was completed in previous CLs, but hidden behind a
flag. This CL switches on the feature and adds integration tests.
Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I0e2d7ac96d3a6d68d33d49f1eab5c341c9167f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175500
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit bc43d06479.
Reason for revert: Breakage in https://github.com/flutter/flutter/issues/73176
Original change's description:
> [pkg:js] Add errors for JS interop using @Native classes
>
> Closes https://github.com/dart-lang/sdk/issues/44211
>
> - Preprocesses and hashes Native classes defined in the sdk.
> - Adds an error if you use a JS class with the same underlying name
> as a Native class.
> - Adds tests with different namespaces to test for the error.
>
> Change-Id: I649e8b2346de8cc6d11205941a37152ce42104b9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175423
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I4b492015468d41335fc5c9d4952560d303841695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178260
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Bumps `package:ffi` to a version using `?`.
Moves `ffi_sample.dart` from `general` to `nnbd` to prevent errors on
the usage of `?` in `package:ffi`.
Change-Id: I8bce1850ce4d144174a2e3705b0ae00523b45c73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178201
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
During expression evaluation, we are collecting all variables in
all scopes that contain the current breakpoint line, and adding them
as available in current scope, which makes variables declared below
the current breakpoint line declared but undefined in JavaScript.
There is one exception to this seen so far - a variable
declared on the current breakpoint line might appear as not declared
in JavaScript and cause expression evaluation not to work due to
JS compilation errors.
This change fixes the issue by not collecting variables that are
declared on or after the current breakpoint line, making them undeclared
in dart (which also is correct according to dart scoping rules).
Closes: https://github.com/flutter/flutter/issues/72094
Change-Id: I113b69531171e0348d44edb8db6dd08a599c9db3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177760
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
When hot reload stress testing calls Dart code from stack overflow
check, Dart code may throw various runtime exceptions such as
StackOverflowError, not just UnwindError.
This is a possible fix for the flaky crash
../../runtime/vm/runtime_entry.cc: 2517: error: Bad script uri hook: UnhandledException
version=2.12.0-edge.26805bc63631b60de9ec31049ce93f6df3e17fde (be) (Thu Jan 7 01:55:41 2021 +0000) on "linux_x64"
pid=3227, thread=3254, isolate_group=main(0x5588bcb15c00), isolate=main(0x5588bcaee800)
isolate_instructions=5588baecc6e0, vm_instructions=5588baecc6e0
pc 0x00005588bb2905fc fp 0x00007ff59389eff0 dart::Profiler::DumpStackTrace(void*)+0x7c
pc 0x00005588baecc892 fp 0x00007ff59389f0d0 dart::Assert::Fail(char const*, ...)+0x82
pc 0x00005588bb305af8 fp 0x00007ff59389f2a0 dart::DRT_StackOverflow(dart::NativeArguments)+0xf18
pc 0x00007ff59aa023e2 fp 0x00007ff59389f2e0 Unknown symbol
on the test language_2/unsorted/stack_overflow_stacktrace_test.
This test is supposed to trigger stack overflow eventually, which may
also appear in hot reload stress testing.
TEST=language_2/unsorted/stack_overflow_stacktrace_test
Change-Id: Iad1feeecd7ee2aea451d1c698d17680cbc29d02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178081
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Fixes a bug in the null safety migration which did not allow a null
return from custom watcher factories.
Change-Id: Ia44978bc2b612451257386ab7839f18ffcb8623c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178061
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Changes:
63f1110 Make argument to featureValueOf dynamic (#164)
71eeaee Make the item argument to Match dynamic again (#163)
2071cfd Add types to more parameters (#162)
5d52720 Allow null-safe code to do `same(null)`. (#161)
05db35c Delete .test_config (#160)
e8b4964 remove redundant experiment (#159)
48fe280 Bump SDK constraints for pub (#158)
225cc13 allow the 2.12 prerelease sdks (#157)
b9ce574 Prepare for the 2.11 dev SDKs (#156)
fe4e68a Update .travis.yml
Change-Id: I90c8d9d2f21d6454f1ace977deb9efec0d29d93d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177881
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Note: This is a reland:
- Relocates the tests.
- Adds status file skip for dartkp.
TEST=runtime/observatory{,_2}/tests/service{,_2}/notify_debugger_on_exception_test.dart
Bug: https://github.com/flutter/flutter/issues/17007
Change-Id: I5c79c140c5e7dee9dfeaa6d4bf750cf4d72f6e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177580
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This crashed because the canonical name for the replace procedure
was unbound before all references to it had been loaded, causing
subsequent reads of the canonical name to create reference without
a target.
This broke the flutter web smoke tests.
Change-Id: I6249cfda85ff76b5e2dd31bb0cf8d6312ad50c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177861
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Before this CL, the map we use to "reuse" references when doing
experimental invalidation mapped from String to Reference.
In bug #44523 two abstract member-signatures have the same textual
(String) name meaning that via the lookup one would get the correct
one, one would get the wrong one, they would get the same one
which eventually causes a crash when trying to serialize.
This CL fixes the issue by mapping via the Name instead, which
basically - for private names - wraps the name and the library
which disambiguates it.
This CL also includes the reproduction of #44523.
Fixes#44523.
TEST=Mostly relying on existing test coverage.
Change-Id: Ib62ebca0b7f5092f0b8410d3c458663c3032eca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177704
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
For normal Dart code a usage of a constant (e.g. from a static const
field) is "inlined": It is represented as a `ConstantExpression` AST
node with a reference to the "evaluated" `Constant` node.
=> Static const fields are never accessed by generated code.
We would therefore not need to represent static const fields in
Kernel/VM anymore. Though there are a few exceptions where the VM's
runtime code needs access to them, which is why they are kept.
The VM runtime code doesn't need an isolate-specific slot for such
static const fields (it's a waste).
=> This CL changes the runtime code that accesses such fields to operate
on the `IsolateGroup`s initial field table instead.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=Pure refactoring - relying on existing test coverage.
Change-Id: I5994811a1c1016b2f523b318b698c9e052a98c29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177709
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
included commits:
392a3cb4 Inline all usage of package:package_config (#2821)
fdf7b052 Handle empty version constraint (#2796)
d786b479 Inline package:http_throttle (#2812)
789be3d4 Don't re-precompile if current global installed was same version (#2810)
9851bf64 Simplify reproduction command (#2797)
8eba9cfb Remove unused function (#2808)
a377b5a6 Pass a Uri to package:http APIs (#2794)
12d49078 Fix git not installed test on windows (#2803)
d74520ac Deprecate flutter constraint upper bound (#2780)
Change-Id: Iecff8cc12fe55f12018b4e1f2257886317d2b5cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177603
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
As part of making the compiler and other subsystems independent
of `Isolate` we have to move various state from `Isolate` to
`IsolateGroup` (or to another place).
The access of `ObjectStore::closure_functions()` was spread out over our
codebase, including from `Isolate`. This CL moves it to a centralized
place - ClosureFunctionsCache.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=Pure refactoring - relying on existing test coverage.
Change-Id: I3b282623f07614cdc2c2a863bd5b9d6c7748d36f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177130
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
All tests in dart2js/native rely on this functionality, so testing that
private imports work seems redundant.
Change-Id: I25e9619206703c6f842beea903533aaf0301f1fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177820
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This one was somehow missed with the others.
Change-Id: I5d06cedc4d00c3fa5f2390d211389382f64e2fc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177761
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Unreachable members could be used as interface targets of dispatch
table calls, so they should have correct unboxing metadata.
This change fixes attaching unboxing info to such members.
TEST=runtime/tests/vm/dart/regress_44563_test.dart
Fixes https://github.com/dart-lang/sdk/issues/44563
Change-Id: I5da6a8d07048904eb94b05bfba11bdf72d655e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177621
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This allows additional types/modifiers that cannot be mapped from highlights region (for example where the existing `keyword` region type needs to be mapped into both `keyword` and `keyword.control` to support different colours as the original textmate grammar did.
Change-Id: Ie71b165fa6e4d902c068854cbbba4039ddefe185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177605
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Empty maps are fairly common; delaying allocation of the backing store saves time and memory for empty maps. Non-empty maps probe an extra time for the first insert.
Most maps also have few associations, so reducing the initial backing store size also saves memory on balance. The best value for dart2js would be 2 associations, but this CL changes it to 4 as a compromise with other benchmarks on Golem.
Runtime as Score geomean 2.620%
MemoryUse geomean -5.233%
dart2js CompileSwarmLatest 0%
dart2js CompileSwarmLastedMemoryUse -10.51%
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/26081
Change-Id: I80a925f698f3df44fae5e97e1804c8dff2ce0c60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176583
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>