* Add "usingFastaParser" accessor for Analyzer engine tests
* Update Analyzer compile time error code tests
* Add additional checks for async/await/yield as identifiers
* Update built-in as type variable error message
* Check for "this." in local declaration parameters
* Remove unnecessary asserts
and address comment in https://dart-review.googlesource.com/c/sdk/+/57022
Change-Id: I54b5ac22f912289dad6360646fae7eca717bbd98
Reviewed-on: https://dart-review.googlesource.com/57220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Ensure closures are not moved out of the main output unit accidentally.
This was seen in a large app, I haven't yet come up with a small repro for our
unit tests.
Change-Id: Ie1d4b3b5396eeeb41528e355c7f0d4abdfca7154
Reviewed-on: https://dart-review.googlesource.com/57521
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Renames the target to dartdevk_sdk (to match dartdevc_sdk), and switches
dartdevk_sdk and dartdevc_test_pkg to use prebuilt_dart_action.
Change-Id: Ib31c85c46743a005bb95cf888055a4d093ffe07f
Reviewed-on: https://dart-review.googlesource.com/57481
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
The method ObservatoryApplication._switchVM calls newVM.onDisconnect
and requires the resulting future to be completed with a String. In
normal operation, this is satisfied and we just need to change a few
static types to enforce it. But when FakeVM was in use, the future
was completed with `this`. Since ObservatoryApplication._switchVM is
the only call site that cares what the future is completed with, it
makes sense to just change all the types to Future<String> and modify
FakeVM accordingly.
Change-Id: Id94d27ac6a42f31ab19ccc9ad8dd270ecf4042b4
Reviewed-on: https://dart-review.googlesource.com/57400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
When the constant transformation is enabled on annotations, we need to fix handling
of @ExternalName annotations in the kernel_loader to ensure that we are setting
is_external = false on native methods.
The original revision is in patchset 1.
# Test Plan
The only regression was on benchmarks, Golem results are pending.
Change-Id: Ib80bb9f532299056e770a3b378cc5ad9ee451f57
Reviewed-on: https://dart-review.googlesource.com/56960
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This change fixes findNativeName() in package:kernel/transformations/treeshaker
to handle constant evaluated Dart annotations. This function is used from
TFA and kernel tree shaker.
This change is a prerequisite for enabling constant evaluation of annotations.
Change-Id: I40f91cce6b34f0e262db7ae6f0fd98303acbf133
Reviewed-on: https://dart-review.googlesource.com/57401
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
This prepares the generator to be implemented by the analyzer.
Change-Id: I487a1704943fbe40ca20031372a436f74ef32752
Reviewed-on: https://dart-review.googlesource.com/57320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I2c24961573887ea56b0a09152c8926b3445e6c01
Reviewed-on: https://dart-review.googlesource.com/57006
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
GrowableArrayMarker was a class that implemented int and was used to
enable implementation of default List factory constructor in pure Dart:
factory List([int length = GROWABLE_ARRAY_MARKER]) {
return identical(length, GROWABLE_ARRAY_MARKER) ? new _GrowableList<E>(0)
: new _List<E>(length);
}
Its existence complicated all kinds of things in the VM and it is finally
time to remove it.
Instead we build List factory body directly in IL.
This CL also provides inlining rule for `new List(n)` case.
Change-Id: I870751658a4ac17fce649c9ac70395ff88a5436c
Reviewed-on: https://dart-review.googlesource.com/57262
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
... as reported by the 2-dev.19 analyzer:
```nocode
info: Unused import. (unused_import at [tools] addlatexhash.dart:28)
```
cc @kwalrath
Closes#31958https://github.com/dart-lang/sdk/pull/31958
GitOrigin-RevId: b4b7f9ab8cd3b04618f29d5ada5eefb1e0592f19
Change-Id: I17195312c8580b9f51d0f00099c6283bf23cdffe
Reviewed-on: https://dart-review.googlesource.com/45620
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
* Use 3-arg variant of open() to fix compilation on GCC and also to ensure
that created file is readable/writable by all users.
* Avoid changing protection on code pages emitted into VM isolate heap: this
allows to profile stubs.
Change-Id: I2b621596405ad78f54a63cfebde7a1af9fa15911
Reviewed-on: https://dart-review.googlesource.com/57263
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Change-Id: Ib9efeb06d1c6857b07f3c42724310621416a0fc8
Reviewed-on: https://dart-review.googlesource.com/57080
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I91185015ea8cc05b332dda6d6ac9f3582a29cb4c
Reviewed-on: https://dart-review.googlesource.com/57240
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
After some discussion, we decided that it's not necessary to publish
alpha versions when making non-breaking changes. (The rationale for
publishing alpha versions is to minimize the number of breaking
changes, since breaking changes to a popular package can potentially
slow down pub's version solver, but this is not an issue for
non-breaking changes).
Change-Id: I3f4f975712af43b6b0475f2c68dc430c394454cb
Reviewed-on: https://dart-review.googlesource.com/57140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Not sure why they were async, they don't call any async API themselves.
R=brianwilkerson@google.com
Change-Id: I5ba1c5124e9cf224f13b91d1fc8ecd85e4e0a206
Reviewed-on: https://dart-review.googlesource.com/57100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
- Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).
Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
Add a clause indicating that FunctionCallTreeNode (in
lib/src/sample_profile/sample_profile.dart) implements
M.FunctionCallTreeNode. This allows the two types for `root`
inherited by FunctionCallTree to be consistent with each other: the
type inherited from CallTree<FunctionCallTreeNode> is
FunctionCallTreeNode whereas the type inherited from
M.FunctionCallTree is M.FunctionCallTreeNode.
Change-Id: I0b48c57f84681a7d40afadfb59c72501cfe38577
Reviewed-on: https://dart-review.googlesource.com/57002
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.
This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.
Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
This splits create_archive.py into two steps. One that creates the .tar
and one that creates the .cc for the .tar. This way on Fuchsia, the
second step will take the prebuilt instead of building it.
Change-Id: I7f407f9e70db3135884eeeb61aa5aec3091f1fcc
Reviewed-on: https://dart-review.googlesource.com/56291
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This CL improves recovery when parsing field type arguments
and adds more tests for parsing type parameters and type arguments.
Change-Id: Ib6ee4081f898d0421d90a66de84d686206a06a8f
Reviewed-on: https://dart-review.googlesource.com/56682
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.
Added test to check this.
Fixes#33251
Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
Change-Id: Iec5347b5f091b9fd6ff3c24047b011527f8b08ee
Reviewed-on: https://dart-review.googlesource.com/56802
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I221f421449ffc4b51916b5741b7c909a828c50cd
Reviewed-on: https://dart-review.googlesource.com/56840
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>