Fuchsia is transitioning from UTC time being tracked in the kernel,
to userspace UTC clock handles.
This preserves the existing behavior that each dart process
has access to the global UTC clock.
Bug: 43629
Change-Id: I23005bccd8bec09ed6db7c6f475b6f5d6e84613c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165500
Auto-Submit: Adam Lesinski <adamlesinski@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Sometimes our compiler loses type information on [Definition]s but
retains the more precise [CompileType] on the [Value]s, so use
the [Value]s [CompileType].
Issue https://github.com/dart-lang/sdk/issues/43534
Change-Id: Ibb3610f389ec55025655a8f0ac78a33a6269063d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165360
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Our compiler uses data dependencies to represent certain control
dependencies. In particular code that uses a SSA definition after an
AssertAssignable should use the AssertAssignable instead of it's input.
Issue https://github.com/dart-lang/sdk/issues/43534
Change-Id: I495b793a68a99385483c62e3cbc6a7e12b2527ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165562
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
We need to register `findType` with the codegen registry whenever we
construct a `TypeReference` so that the function is available at
runtime. We primarily do this whenever we encounter an `HLoadType`.
However, it's possible that we only construct a `TypeReference` during
constant emission, and therefore never register a static use.
We can use the `CodegenImpactTransformer` to register a static use for
`findType` whenever we encounter a `ConstantUse` whose value requires
it. These correspond to the uses of `_reifiedTypeNewRti` in the constant
emitter.
Change-Id: I93dade3c326f7e2c9d4806d8bdc2ee576a20d1c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165480
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
When flow analysis encounters a variable declaration of the form `T? x
= expr;`, if the type of `expr` is `T`, then the variable is
immediately promoted to type `T`.
Fixes#43099.
Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
Bug: https://github.com/dart-lang/sdk/issues/43099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Demoting a variable back to its declared type discards types of
interest, therefore in order to verify that a type is of interest, we
need to join a demoting path with a non-demoting path so that the type
of interest is preserved.
Change-Id: Ie9c3278936b189120c9f0085f1563ff8062e51db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164800
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
- Use null instead of empty array for the initial constants set, as fields dropped during snapshot are populated with null.
- Remove assumption that canonicalization will always be bottom-up. Deserialization clusters will cause canonicalization to be ordered by class instead of by depth.
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: Ia3ab68281c783299e682f6c60a744c320c19e981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165160
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Most of the time a hot restart will bail out due to the changed libraries,
but since the operation is pointless anyway it is better to short-circuit.
Change-Id: I86d3266f1502f612b0dd7cc6b7409c05bd7456c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165381
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
(these tests target the dartdev workflow which is not supported in
the precompiled runtime).
Also updated regress_41329_relative_test to not be a duplicate of the
absolute test.
Change-Id: I1df086c8cb2b6a03fad0043bc1f63b08370fdbae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165120
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
The setReachable method took a bool indicating whether the new state
should be considered reachable or not, however outside of tests the
value that was passed in was always `false`. Change to a
`setUnreachable` method taking no arguments.
This should make it easier to transition to a stack representation for
reachability.
Bug: https://github.com/dart-lang/sdk/issues/40009
Change-Id: I16a35ec3d5f44763a60e42f200a3caa619fac118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165142
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
All the logic we need for handling unassigned info in the presence of
closures already happens on entry to the closure, when we use
conservativeJoin to mark any variables assigned within the closure as
potentially assigned. We don't need any additional logic at the end
of a closure.
Fixes#43006.
Bug: https://github.com/dart-lang/sdk/issues/43006
Change-Id: Ibcaaacd5bd1d18d39be013f13a7ba771d29adce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Add language/extension_methods/static_extension_resolution_7_test.dart,
testing that the inference of a type argument to an extension method
invocation treats bounded type variables and promoted type variables
as specified, and as discussed in language issue #1182.
Change-Id: I99f358eb82dcce235edb091bc2bae172c2725d39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165022
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This increases our "local" coverage of the constant evaluator.
Run with something like
`pkg/front_end/test/fasta/strong_tester.dart -DupdateExpectations=true -DstressConstantEvaluator=true -DskipVm=true`
there is now almost coverage of everything (or a comment in the code
suggests that the path is probably unreachable).
Note that
`out/ReleaseX64/dart pkg/front_end/test/vm_service_coverage_constant_evaluator.dart pkg/front_end/test/fasta/strong_tester.dart -DupdateExpectations=true -DstressConstantEvaluator=true -DskipVm=true`
has erroneous misses, for instance (but not limited to) asserts.
These are caused by errors in the VM.
A follow-up CL will be created to turn on "stressConstantEvaluator" by
default and print out any sucesses in the expect files.
Change-Id: I837837be4f0487fdbe57c5107e4b3415de189177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163060
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Removes a cast that was made unnecessary with a fix to flow analysis.
Change-Id: Ia80493fbe64abddd268ca468a7860044954a3928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165143
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Change-Id: I8baa5a8ceb0e60dc9aad9188441371894b0f7f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164902
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>