For method, getter, and setter invocations with names of methods on
Object on expressions with static type `dynamic`, if the invocation
cannot possibly be an invocation of noSuchMethod, infer the type of
the invocation using the type of the member of Object.
This implements the feature spec
472ec7780f
Fixes https://github.com/dart-lang/sdk/issues/32414
Change-Id: I135156346fe1468561d56a01cf3c5f0efde30739
Reviewed-on: https://dart-review.googlesource.com/56942
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: I9ae610f7e6e588ecec961af9ea72dcf6ee1751b7
Reviewed-on: https://dart-review.googlesource.com/57506
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I357b6164abc4d47ac558496ed3dbb149550e6f43
Reviewed-on: https://dart-review.googlesource.com/57180
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Change-Id: I3c31cdf200c77749e4465be99d832b65be4a775d
Reviewed-on: https://dart-review.googlesource.com/57508
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I8ab2d15f83e9547f19301b12d0bff9f1dc05de46
Reviewed-on: https://dart-review.googlesource.com/57561
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Change-Id: I1d9997ab22290e9fc882b64b0934f70c6aed2261
Reviewed-on: https://dart-review.googlesource.com/57505
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Remove tree-shaker as we're not using it, and it creates problems
when the SDK changes.
Remove scopes from AstBuilder as we will be phasing out AstBuilder
in favor of using BodyBuilder and the Forest API.
Change-Id: I51950c5d8bfb0493587336325f9da8f5bf8ecea6
Reviewed-on: https://dart-review.googlesource.com/57261
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
TBR: This CL only adds a missing changelog entry for the commit
08c893d55b.
Change-Id: I4963dbebc090e95b26ce043586cfa2db0df95f3c
Reviewed-on: https://dart-review.googlesource.com/57502
Reviewed-by: Erik Ernst <eernst@google.com>
As of patchset 5: The ruleset concerning class member conflicts
(apart from simple name clashes) has now been simplified
considerably, and it's expressed in one location, in a new section
(the locations where we previously had such rules are now
`\commentary{}` with a reference to the new section).
The old rules and the new simplified rules specify the same set
of conflicts (in that sense, patchset 4 == patchset 5).
The old description below gives details about what was changed
from the start of this CL until patchset 4.
------------------------------- OLD description:
Added conflict for constructor and setter with "the same name".
Discussed the inconsistent approach to conflicts between named
constructors and instance members with Lasse; we agreed that it
is confusing if we allow the constructor `C.n` to coexist with the
instance method/getter `n` and instance setter `n=`, except that
they must be inherited rather than declared in the enclosing class
`C`, so I adjusted the wording such that only _static_ members
conflict with named constructors.
One more reason why there is no conflict between `C.n` and an instance
member named `n` or `n=` is that the latter can _never_ be denoted
by `C.n` (but static members can be denoted by `C.n`, also in `C`).
Change-Id: I012e772ae6473fddd8f9944553d69e6a6ceeb2f9
Reviewed-on: https://dart-review.googlesource.com/56800
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Library reference is added for private names in order to resolve them correctly.
Invocation kind byte supersedes VM-specific name mangling and makes
ConstantICData more uniform with ConstantStaticICData.
Change-Id: I66542356209d98b3d0cf0e6b8eb19bda052c6b7e
Reviewed-on: https://dart-review.googlesource.com/57485
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
* 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>