This reverts commit 038e981f89.
Reason for revert: Breaks some tests; visible changes to some web UIs.
Original change's description:
> Fix duration.toString() to conform the description
>
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
>
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
>
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=lrn@google.com,zichangguo@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Since CodeSourceMaps are not serialized when non-symbolic stack traces
are enabled, use a different CSM encoding in this mode. Here, we write
out the line number as before and then the column as a separately
written integer.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: If9aec2f52551d04eb45626744957e625bcc17d3d
Bug: https://github.com/dart-lang/sdk/issues/42397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151824
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Hoist 'one' in all versions of benchmark for uniformity.
Change-Id: Id2aaa9b18903ff33e3057c01e13ff332fc8979ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151180
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
A 'final' local can be assigned via definite assignment or via a
'late' initializer.
Fixed: 42422
Change-Id: I5e03ca534fb18fcb928db99daa6654c8942c9bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151867
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Set global null safety flag based on the snapshot instead of trying to
detect it per isolate (was causing issues with the vm isolate loading).
Should fix https://github.com/dart-lang/sdk/issues/42421
Bug:42421
Change-Id: I9143560b76fedcb991e96522cbf5d820fde99f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151866
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
- created class representing module metadata, added metadata to JsCode
class
- added module information to metadata, such as module name, load
function name
- added import and file uris for libraries
- added experimental-emit-debug-metadata flag to frontend_server
- added frontend server tests to check for saved metadata
Related: https://github.com/dart-lang/sdk/issues/41852
Closes: https://github.com/dart-lang/sdk/issues/40774
Change-Id: Iecbbf1e4eea1919e01f002f45363d30707cb1590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150181
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
In generic function types when a type parameter T's bound is Never in
the current environment T should be normalized to Never where it
appears in the function type signature.
For example when S is never in:
`T Function<T extends S>()` --> `Never Function<T extends Never>()`
Passes the new generic_function_type_object_normalization_test.
Change-Id: I6ce2328bc81cd0df7bbc69fd8e59a45f707e9318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150290
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
If "CONNECT" is used in HttpClientRequest, it is supposed to create a
tunnel and reuse the socket. The socket should remain open instead of
being closed.
Bug: https://github.com/dart-lang/sdk/issues/37808
Change-Id: Ic765bdc6fe4d3e21b3117e882b38e3abae15ceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148684
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
The partitioning has the property that for every reference from loading unit S to unit T, either
- the reference is through a deferred prefix, or
- T is guarenteed to be loaded before S
The partitioning is constructed by cutting the dominator tree of the library import graph at deferred imports. It is suboptimal if there are deferred imports to multiple libraries in a connected component, but the expected use case involves loading units with a single deferred entry.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I3c49044ae19112525f197b077b36e4ce874b81ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151470
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
If the Content-Length has been set by contentLength setter, manually
setting the header to the same value will lead to the header being
dropped, since _contentLength is not updated in set() method. The method
set() will erase the header and add back the header with new value. As
_contentLength is not updated, when it adds back the new header, it
looks at _contentLength (Which is not reset) and skips the addition (
_contentLength is the same as the new value, we had the header already).
Bug: https://github.com/dart-lang/sdk/issues/42369
Change-Id: I3fba7cc332bdff0ba56e602ac810fbaeb85d2606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151427
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This reverts commit 16f09f20b3.
Reason for revert: Trigger finger. Shouldn't have been merged.
Original change's description:
> [vm] Replaces fuchsia.deprecatedtimezone
>
> (prior attempt was rolled back as it caused downstream tests to time
> out. See prior attempt at: See:
> https://dart-review.googlesource.com/c/sdk/+/149206)
>
> The FIDL library fuchsia.deprecatedtimezone is going away. There are
> different and better ways to obtain the same functionality. This change
> removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
>
> Adds inspect metrics that allow whitebox testing of the runners. Here's
> a sample `fx iquery` excerpt from a running device, showing both a dart
> and a flutter runner exposing the same OS diagnostic metrics.
>
> ```
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
> dst_status = 0
> get_profile_status = 0
> timezone_content_status = 0
> tz_data_close_status = 0
> tz_data_status = 0
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
> dst_status = 0
> get_profile_status = 0
> timezone_content_status = 0
> tz_data_close_status = 0
> tz_data_status = 0
> ```
>
> Under nominal operation, all of the above values should be equal to 0.
> Nonzero values indicate an error.
>
> This functionality is guarded by Fuchsia integration tests at
> //src/tests/intl.
>
> Tested:
> (compile locally for Fuchsia and deploy)
> fx test //src/tests/intl
>
> See:
> - https://github.com/dart-lang/sdk/issues/42245
> - https://github.com/dart-lang/sdk/issues/39650
>
> Fixes#39650
>
> Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> Commit-Queue: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com
Change-Id: I7e3f8b9724e30653ca5fccaf912e940edcbcf974
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151861
Reviewed-by: Filip Filmar <fmil@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
(prior attempt was rolled back as it caused downstream tests to time
out. See prior attempt at: See:
https://dart-review.googlesource.com/c/sdk/+/149206)
The FIDL library fuchsia.deprecatedtimezone is going away. There are
different and better ways to obtain the same functionality. This change
removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
Adds inspect metrics that allow whitebox testing of the runners. Here's
a sample `fx iquery` excerpt from a running device, showing both a dart
and a flutter runner exposing the same OS diagnostic metrics.
```
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
dst_status = 0
get_profile_status = 0
timezone_content_status = 0
tz_data_close_status = 0
tz_data_status = 0
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
dst_status = 0
get_profile_status = 0
timezone_content_status = 0
tz_data_close_status = 0
tz_data_status = 0
```
Under nominal operation, all of the above values should be equal to 0.
Nonzero values indicate an error.
This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.
Tested:
(compile locally for Fuchsia and deploy)
fx test //src/tests/intl
See:
- https://github.com/dart-lang/sdk/issues/42245
- https://github.com/dart-lang/sdk/issues/39650Fixes#39650
Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This does not include breakdown for resolution yet.
I wonder if this more general information could replace specialized
CiderCompletionPerformance fields 'resolution', 'suggestions', etc.
WDYT?
R=brianwilkerson@google.com, keertip@google.com
Change-Id: I4685dc2a8de8028ce84cc2640943f45c8cf047e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151811
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
VM calls certain functions from core libraries implicitly and in
certain cases such functions can take null as argument.
This change fixes parameters which were declared with non-nullable
types, but in fact they should take null.
These incorrectly declared parameters trigger non-null assertions in
weak mode.
Change-Id: Ia80fa28e437b25427f13f9e672a069fa722e966a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151784
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
On a per output-unit basis, repeated large strings are shared via a
`string$` pool.
TODOs:
- don't do it with strings passed to JS() code (they might need
to be property accesses).
- tweak thresholds, using different thresholds for slow/run-once code.
Change-Id: Ib14245d9d428e52fb2ca23f34fa533de97fa2208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136304
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Changes:
Doing this always in precompiled mode meant increased data segment sizes
when CodeSourceMaps are stored, since encoded line/column information is
larger in the LEB-like encoding used. Now we only store column
information when we produce non-symbolic stacks, since the increased
space needed to store the columns is instead in DWARF sections and can
be stripped or elided.
Original description:
Previously, we passed line number information to the stack trace printer
and to DWARF by changing the non-special positions in the CodeSourceMap
to line numbers in precompiled mode. However, doing this lost column
information.
We get the column information back in the majority of cases by encoding
the line number and column information when neither is too large to pack
together into 30 bits. (Here, 20 bits for line and 10 bits for column.)
Otherwise, we just store the line information as before, though due to
using a bit to encode whether column info exists, it's reduced to 30
bits. If the line info is too big for that, we just return kNoSourcePos.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: Ia8baee71468da6100a170fa305d03059ffd17f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151822
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This hint flags code such as
int time = watch.elapsedMillisecond;
and encourages using `var` everywhere:
var time = watch.elapsedMillisecond;
Though if the type is not obvious to a developer, we should be allowed
to write it.
Furthermore it copies the rules from
`package:pedantic/analysis_options-1.9.0.yaml` to avoid being
automatically opted-in to new rules when a new package:pedantic
gets rolled into the SDK.
Change-Id: I45c72584885c608a56745685e9068ba83dfbed47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151526
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>