Change-Id: I8e5d565cf92491c486d1210455837adeb317c6b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114856
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
That should allow us to "implement"
6f85cb83cf again in two steps:
* first we remove the dart:profiler as a required library, but retain it in the platform
* (we wait for stuff to roll, both in flutter and in google3)
* we remove it completely (i.e. not retaining it in the platform, removing the source etc)
Change-Id: Ieb77c2ba909300c05f3923c2edba7cab7d34fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115244
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
* Update optionalTypeArgs to consider mixins and static extensions
* Update visibleForOverriding to consider mixins
* Update visibleForTesting to consider private declarations, and
declarations on unnamed mixins
Bug: https://github.com/dart-lang/sdk/issues/38105
Change-Id: I50b87e0fafd7960abc945b240788b1a640f78621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115067
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Rationale:
Both the interpreter and compiler had some logic on when fields
could be unboxed. Rather than duplicating this logic, this CL
uses the same methods to get a more consistent view of unboxing.
Note that this add a slight overhead to the interpreter, but
only a slight. We could avoid this by duplicating the logic
to enforce consistency, but this has the danger of getting
similar issues in the future.
https://github.com/dart-lang/sdk/issues/37821
Change-Id: Icf0c1ad518d75c63e9da72e1f75eaf1cf903587f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115301
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This reverts commit a6141ff5c9.
Reason for revert: Blocking Dart SDK -> Flutter engine roll. See logs here: https://github.com/flutter/engine/pull/11836/checks?check_run_id=210988794
Original change's description:
> Add dart2native tool for building either an aot file or a stand-alone executable.
>
> *dart2aot has been rewritten in Dart accompanied by a trampoline script.
> *dart2exec is still missing implementation.
>
> Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
> Commit-Queue: Sarah Zakarias <zarah@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>
TBR=cskau@google.com,zarah@google.com
Change-Id: I4c5946ce0f0a66484e243b98cdcb7e2b24e2d705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Checking if an interpreted frame is marked for lazy deopt while
preparing to handle an exception was causing an assert to be hit. We
can skip this check for interpreted frames.
Fixes https://github.com/dart-lang/sdk/issues/38003.
Change-Id: Icea65868c6291864df93920fa25236bcc36fded5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115268
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
_Closure objects are created by the VM "magically", without invoking
constructor. Usually nullability of fields is calculated when compiling
a constructor, but constructor of _Closure is not compiled. With AST
nullability is also derived from field initializers, but this is not
the case in bytecode mode (as there are no initializers for instance
fields unless they are needed for hot reload).
Fixes language_2/bound_closure_equality_test with bytecode
and --optimization-counter-threshold=5.
Change-Id: If86a276c875f798af8511038326714e66e212cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115300
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Rationale:
The limit on the number of classes is the same as the number of methods
per class, leading to exponential growth of the generated program if
this limit is raised. This patch introduces an optional parameter to
increase the limit separately for different use cases.
Change-Id: Id74d00a47494162a67fd980c163243690c5c1ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115004
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
The test `pkg/front_end/test/flow_analysis/type_promotion/switch.dart`
wasn't running because it was declared in the wrong place (it should
have been inside the `data` directory). Merge it with the existing
test file `pkg/front_end/test/flow_analysis/type_promotion/data/switch.dart`.
Change-Id: Idc98464d88001ce68274a29ed73d02f6c378abc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115263
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The crash occurred when:
- The body of the for-loop contained a write to a variable that was
declared inside the body of the loop.
- At least one variable was declared outside the for-loop.
Fixes#37983.
Change-Id: I241312e1f1c9efb879bbff93fc0ca569d8ec8370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115262
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Rationale:
Adding a new element to a Map while iterating over the same Map
will cause an exception. This patch should avoid such assignments.
Change-Id: I82e461deabcf41291fe0d584905fbb03da2c8b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114752
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
This fixes language_2/control_flow_collections/for_inference_test
with bytecode and --optimization-counter-threshold=5.
Change-Id: I61ea83c92ea04a71edf564a9a68b57af1a17103f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115077
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Originally the spec made a distinction between when some of these
conditions were errors and when they were warnings. That distinction has
been removed, so this just cleans up our code to reflect that fact.
Change-Id: I3a6fdae2896eb93c6b9cacfea790cd9b553feec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 6f85cb83cf.
Reason for revert: CFE built before this CL breaks with dill built after; it expects dart:profiler to be present in the dill.
Original change's description:
> [SDK] Remove dart:profiler library which has been deprecated since Dart 1.2
> and remove all references to it in tests and the SDK build scripts.
>
> Change-Id: I65a4d71b74c66ca090eba28e922e2f70a7b2989d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114965
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I5fec5c7aec55377ba5cba0b55a25e67682220276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115242
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
The nullability on the LHS of type-parameter types is assumed to be set
explicitly, at the moment of creation of the type or some time after
that. The latter case is needed for when the bound of the corresponding
type parameter is not yet set.
The second change is that the overall nullability is not stored in a
field, but is computed as a getter.
Change-Id: Ifbe6922c3a17943dd6c4f054976516c4f6bfc96d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115209
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This reverts commit ecbea5a58e.
Reason for revert: broken with bare instructions and ABI bot
Original change's description:
> [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
>
> To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
> and allow Instructions to have patchable relocations against (the start of) these sections.
>
> Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
>
> Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com
Change-Id: I9787da6d42575ca4f5ae0a698052a19ac4275afd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115240
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
and allow Instructions to have patchable relocations against (the start of) these sections.
Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
*dart2aot has been rewritten in Dart accompanied by a trampoline script.
*dart2exec is still missing implementation.
Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
This is a reland of 4b5893f9cf
Nothing has changed, the revert was accidental.
Original change's description:
> Use identical as shortcut in equality checks
>
> These equality checks are showing up in a profile-run of the type flow analysis.
> For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
>
> Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Change-Id: Ia7bdf790f48eab2060f51328a50eaff153483203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115216
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
This reverts commit 4b5893f9cf.
Reason for revert: Got the operator associativity wrong
Original change's description:
> Use identical as shortcut in equality checks
>
> These equality checks are showing up in a profile-run of the type flow analysis.
> For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
>
> Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
TBR=kustermann@google.com,sigurdm@google.com
Change-Id: Ib71ca9595ad7d163de07911b813e9de3c93efcf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115213
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
We don't support expression fragments anymore, also don't need to
re-tokenize code.
R=brianwilkerson@google.com
Change-Id: Ic8bf930a2d7b81862ce08925405bdd479db8eaba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Handle empty names in document symbols
Change-Id: I336efa1b80c11af555562c6c5fc944bf1671b2e5
Handle extension kinds in document symbols
Change-Id: Ib04e099241abbd82e0676c3a5c5997de1a615adb
Prevent crash when SymbolKinds are not known in LSP
Change-Id: I265755b22fba18c5d5da70456ab2c76ed72a96a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
These equality checks are showing up in a profile-run of the type flow analysis.
For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Skip test that fails to compile because theres an error triggered by
constant evaluation because we're not compiling for a web-platform.
This should turn the bot green.
Change-Id: Icb7a4d5a55f14c146f03e17d06d518f615189e27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115205
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
If errors are caused by some file (say "a.dart") but are reported in
another library (say "b.dart") we are going to re-issue errors we
shouldn't have in the incremental compiler.
This CL introduces some test cases that currently fail.
Bug: 38167
Change-Id: I3c82fa72dab7c4714974c9caedc1906bead143ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115202
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
* Max and default for language version controllable via language options
* Default (if not set) comes from kernel static fields
* Kernel static fields updated to 2.6
* (Also set version for debug expression library)
* Test added that checks that the kernel static fields aren't out-of-date
(checked against python script "tools/make_version.py").
Change-Id: I65f26053081e4c55c215b677128f37fa970693c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>