Before this change we erroneously override TARGET_OS with target_os value, which for example resulted in dart sdk built as part of Fuchsia targeting Fuchsia, rather than host os(Linux).
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=36723
Change-Id: I92b698a331c8c5ef802f0b329ebf13616f29952f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118372
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
I was working of switching runtimeTypeMatch() to purely
typeSystem.isSubtypeOf(), without working around dartbug.com/35993
and dartbug.com/33441, but bots were failing. I think that was because
of this issue with incorrect tear-off types. We have to fix it before
switching to less generous TypeSystem.
R=brianwilkerson@google.com, paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
In this change, we also push HTML escaping to mustache.
Changes can be seen in x20 pages emailed to the team.
Change-Id: I239668a0844fb5bd7c90848f25a3cbf29e50363d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
There is no clear defination on setLibraryDebuggable in rpc. But obviously breakpoint should be not set and hit if library is not debuggable. Correct this behavior.
Bug: https://github.com/dart-lang/sdk/issues/36914
Change-Id: Ic75f89055eeb69279a504366fe35f3e98b173abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118340
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
* Clear bytecode for all functions including closures and field
initializers, so their object pools are not preventing constant
objects from being reclaimed by GC.
* Bytecode reader should use dynamic invocation forwarders in AOT too.
* Fix assertion in RegisterTypeArgumentsUse (type arguments in
generic closure functions could come from _prependTypeArguments call).
Change-Id: I2154c87f30720607288ec12012a6d0ec1db618dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118365
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Platform::Init (now Platform::InitOnce) was only being called directly
from the CL embedder and could not be invoked via any path in the embedding
API. Platform::InitOnce is now invoked in both dart::bin::BootstrapDartIo and
dart::embedder::InitOnce.
Fixes https://github.com/dart-lang/sdk/issues/37586
Change-Id: I594908895c19e3058f707f920e265e79ca4cecd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117591
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Consider the following situation:
class A { foo() {...} }
class B extends A { foo() {...} }
During AOT compilation (in case FLAG_lazy_dispatchers == false)
Resolver::ResolveDynamicAnyArgs was not looking for possible methods
when getter is requested. As a result, if method extractor A.get:foo
has been created, but B.get:foo hasn't, then lookup for B.get:foo
incorrectly returns A.get:foo (instead of null).
Similar situation was previously fixed for a particular call site of
ResolveForReceiverClass (which uses ResolveDynamicAnyArgs):
https://dart-review.googlesource.com/c/sdk/+/30520
However, there are more calls to ResolveForReceiverClass in the compiler
where its incorrect result may be used.
Change-Id: I4ebd6b91157cc048b94e5a5ce182c42dc808f4f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118260
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
We also now don't try to share parts of strict FunctionType(s).
So, I'm removing the corresponding tests.
If we decid that we need this, the correct place to do this is
the type algebra.
Change-Id: I4f7d9df892f8606af8f0403358e56d4a07bdd025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118321
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This reverts commit 96b8401cfc.
Reason for revert: works incorrectly because kernel-to-il emits multiple initializing stores for the same field. see language_2/field_parameter
_test
Original change's description:
> [vm/compiler] Drop redundant initializing stores of null
>
> Dart objects are allocated null-initialized so initializing stores of
> null value can be removed from the graph.
>
> Issue https://github.com/dart-lang/sdk/issues/38454
>
> Change-Id: I1ba0c3a21462ba8a3409fc648027b4ebf0b1040e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118286
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,sjindel@google.com
Change-Id: Ic0c51986168cb51316d3872514719b34cfc780cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118289
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Not doing it can lead to the same input producing "different" outputs.
Note that this is a follow-up to cdcec63569
where I forgot about the incremental summary-only case.
Change-Id: Idf76c3839f46c468a62350968b353be7235d91b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118287
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Dart objects are allocated null-initialized so initializing stores of
null value can be removed from the graph.
Issue https://github.com/dart-lang/sdk/issues/38454
Change-Id: I1ba0c3a21462ba8a3409fc648027b4ebf0b1040e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118286
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Before this CL we would miss some dependencies when recording
dependencies because we cache certain calculations that upon calculation
can mark things as needed.
Change-Id: If9ff872021b0fb77cbcc787112bb91f3ade71243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Printing out the flow graph before and after round trip serialization
revealed slight differences between the flow graphs that might lead
to either bugs or different results in compilation. Remove these
differences.
Also in this change:
* Remove cases where printing or serializing a flow graph could have
the side effect of creating new `CompileType`s or `AbstractType`s
not previously in the graph.
* Ensure reaching types for `Value`s are cloned if the binding
definition changes and check that reaching types either have no
owner or are owned by the `Value`'s definition with the
FlowGraphChecker. (Before this change, we had `CompileType`s in
the graph whose owner had long since been removed from it.)
* Adds `ASSERT`s to check that unexpected non-canonical `Instances`
are not allowed as the value of `ConstantInstr`s and adds some
canonicalization that did not previously occur.
Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: I334ffa2a6383291a7cb318343c71bd55a41269a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117143
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>