On the otherwise path it was producing a block that ended with a call. Such IR
is invalid because blocks can only end with control flow instructions, like
Branch, Goto, Return or Throw.
Bug:
Change-Id: I67971fba00c01f1e063ac584abfa6aec2ea376d9
Reviewed-on: https://dart-review.googlesource.com/19004
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
_SignalController._controller needs to have runtime type
StreamController<ProcessSignal> to avoid an implicit downcast failure
in the getter _SignalController.stream.
Change-Id: Idb033897525e26e17d7cdad345ee0cb6080626a8
Reviewed-on: https://dart-review.googlesource.com/18682
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
In the implementations of min and max, when a and b are doubles and a
== 0.0, we have special case logic to return `(a + b) * a * b` and `a
+ b`, respectively. These expressions both have type `double`,
whereas the return type is required to be `T`, and the type system
can't guarantee that `double` is assignable to `T`, because all that
is known is that `T` extends `num`.
(Note: a human reader can see that since a and b are doubles, and a
and b have static type `T`, it follows that double must be a subtype
of `T`. But the type system doesn't have the ability to reach this
conclusion).
To work around this issue we assign to a temporary variable of type
`num`. Since `T` extends `num`, it is safe to return the temporary
variable.
Fixes#31162
Change-Id: I7eeea43384ce134f3b44d266af908a87f8e0e36a
Reviewed-on: https://dart-review.googlesource.com/18515
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
With the current block size, this reduces space for forwarding information from two words per moved object to two words per (kObjectAlignment * kBitsPerWord) bytes of heap (1.6% on 64-bit, 3.1% on 32-bit).
dart2js compiling dart2js:
Compactor/Sweeper Runtime Max RSS
Sliding (binary search table) 105 s 1.085 GB
Sliding (bitvector) 57.8 s 998.566 MB
Evacuating 66.2 s 1.714 GB
Concurrent sweep 53.8 s 1.183 GB
Blocking sweep 55.0 s 1.181 GB
Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ia6eec4f0162c3959154c5155df24cc06694ecac7
Reviewed-on: https://dart-review.googlesource.com/17721
Reviewed-by: Erik Corry <erikcorry@google.com>
The purpose of this refactoring is to provide a convenient way to
write JSON independently of VM service, which is excluded in PRODUCT
build mode.
Change-Id: I55700d9ead6ef9269a98714d8178f1edb35435cb
Reviewed-on: https://dart-review.googlesource.com/18502
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.
Relanding to fix bad toolchain conditions in dart_os_config and
dart_arch_config.
TO-549
Change-Id: I276f47d9071233acb98f6029a4666da0cee33d7d
Reviewed-on: https://dart-review.googlesource.com/18361
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
This reverts commit 8fc90bd3bc.
Broken precomp bots due to wrong toolchain condition in dart_arch_config and dart_os_config.
Change-Id: Ic5c75f9ca3a0d4f316678354da44d1fcca10499d
Reviewed-on: https://dart-review.googlesource.com/18360
Reviewed-by: Zach Anderson <zra@google.com>
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.
TO-549
Change-Id: Ida92521724cf7af34b34fb8c6d3514a226c48dd4
Reviewed-on: https://dart-review.googlesource.com/18145
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Update the package() template to match the new syntax. This change keeps these
packages working the same way they do currently (i.e., being included in the
system image). In the future, we'll want to remove this annotation and separate
these packages from the system image.
Change-Id: I0f0de3a07afc68a36d07c2e1cc9aa5b22072bf65
Reviewed-on: https://dart-review.googlesource.com/18241
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
It appears like the manual flow graph building code for
MethodRecognizer::kObjectRuntimeType is wrong and was exposed by
enabling it recently.
Change-Id: Ia4be8c4bc7c3342e0cdf1cb8b270dc48b5f2fde4
Reviewed-on: https://dart-review.googlesource.com/17920
Reviewed-by: Martin Kustermann <kustermann@google.com>
Now that we do eager rehashing of linked hashmaps we no longer have the
index field be `null` (which in the past signaled we needed rehashing).
This means we can teach the optimizer that loads from the index fied
always result in kTypedDataUint32ArrayCid.
Change-Id: Ic012881c12b2310a6337696521fa1355afd4069f
Reviewed-on: https://dart-review.googlesource.com/17447
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Previously we would sometimes build specifically hand-crafted flow graph
code for recognized methods and sometimes let the normal flow graph
builder do it (depending on whether inlining was triggered via
[CallSiteInliner] or [CallSpecializer]).
This CL makes us use the hand-crafted flow graph building for recognized
methods in both cases.
Change-Id: I58405b16adca810fd7ccff32027b9d4a13858976
Reviewed-on: https://dart-review.googlesource.com/17445
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This change brings down core snapshot size by ~750KB, and brings
down app-jit snapshot size of simple "Hello, World" dart script by
~650KB. The bot cycle times will also come down by around ~20%.
Change-Id: I2a01c98bedc7ebfa2a653983995486a71504daf3
Reviewed-on: https://dart-review.googlesource.com/16323
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Remove parsing support for 'super' that was meant to declare lower bounds of
function type parameters, since this feature did not make it into the spec.
Change-Id: I4087d0e108c5984437083a05a065fe785888d2f7
Reviewed-on: https://dart-review.googlesource.com/17360
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This is a baby-step towards building an SDK targeting the host arch
during a cross-build. This will require a similar update to the use
of dart_config in the Flutter engine at //flutter/lib/io/BUILD.gn:19.
Change-Id: I8b871cceb53038cab8407264664c5ce545e6e010
Reviewed-on: https://dart-review.googlesource.com/17523
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This improves
* JIT performance by around 14%
* precompiled performance by around 2%
on a simple map microbenchmark.
Change-Id: I623e2a715a709f89f2514ae30fbb504ee2e31661
Reviewed-on: https://dart-review.googlesource.com/17165
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This allows the normal VM metadata lookup code to find metadata attached
to members which come from mixed-in classes.
This allows e.g. putting a @AlwaysInline / @NeverInline annotation on
methods of mixin classes.
Change-Id: I70639dc78fc5bab98ac7cee107c2042f84d07888
Reviewed-on: https://dart-review.googlesource.com/17164
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>