This CL moves modifier parsing out of parseMethod and parseFields
into parseClassMember and before findMemberName.
This is the next step in evenally removing findMemberName
and improving top level declaration recovery.
This CL also removes unused parameters from several fasta parser events.
Per discussion with Peter, tokens will be added back to each of these
events in a subsequent CL.
Change-Id: I4ffc0622b75581b5fdb527feeb19ae0b68c4eeaf
Reviewed-on: https://dart-review.googlesource.com/36820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This warning fires if a top level initializer depends on the type of a
method whose type is subject to type inference. This warning is
needed because the analyzer implementation of top level type inference
doesn't guarantee that the method type will be inferred prior to the
initializer, so it's possible that type inference will produce an
incorrect result. See #31925 for more details.
Change-Id: Iec048d2638877c16ae11a87eae0382b7352f726c
Reviewed-on: https://dart-review.googlesource.com/36841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The old implementation only validated a whitelisted set of use cases,
so it would often miss important subexpressions. The new
implementation is based on a RecursiveAstVisitor so by default it
visits all subexpressions; we use overrides for the specific cases
where it's not necessary to visit all subexpressions.
Fixes#31963.
Change-Id: Icb9833f51bef26874f655cd2ba4ffc509bfffef3
Reviewed-on: https://dart-review.googlesource.com/36803
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This change, and the code introduced, is probably not going to be required
once the platform kernel file is linked into the executable.
Change-Id: I24a837c3a633a625145cf90ff83d3e51b3d23eb6
Reviewed-on: https://dart-review.googlesource.com/36720
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
Some small clean-up, and fixing one test that relies on the changed behavior.
Change-Id: Ibfed0c41c3121f2dc13a0d67b7534693165eb5e2
Reviewed-on: https://dart-review.googlesource.com/36620
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
When the type to test against is instantiated and has no type arguments
there is a high probability that we receive instances of that class or
subclasses at runtime.
This CL therefore extends the fast-path of AssertAssignable/InstanceOf
by checking whether the instance class id is within the cid ranges that
directly/indirectly implement/extend the type to test against.
Currently we have an almost depth-first preorder numbering of class ids
in AOT, but there are exceptions. So each class can have a number of
cid-ranges as subclasses / classes which implement it's interface.
This seems to improve performance of dart-aot-v2
* flutter stock build by 15+%
* DeltaBlueClosures by 10+%
and reduces code size on
* flutter gallery by -3%
Issue https://github.com/dart-lang/sdk/issues/31798
Change-Id: I07dd91589cc3fcd8c5952bdba339e2e2a459e08e
Reviewed-on: https://dart-review.googlesource.com/35620
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This CL moves modifier parsing out of parseTopLevelMethod
and parseFields into parseTopLevelMember and before findMemberName.
This is the next step in evenally removing findMemberName
and improving top level declaration recovery.
* New ModifierRecoveryContext2 which will soon replace
both ModifierContext and ModifierContext2
* Remove now unused TopLevelModifierRecoveryContext
* Remove unused beginTopLevelMethod event arguments
* Remove unused handleNoType event arguments
* Address comment in https://dart-review.googlesource.com/c/sdk/+/36500
Change-Id: I6842a83d9604cdcca611d7209e3ebcc78de469d3
Reviewed-on: https://dart-review.googlesource.com/36680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This replaces the now-deprecated ioctl_netc_get_if_info.
Bug: 31970
Change-Id: If343eed52c7a53e3b85185108582a6abbd9136ed
Reviewed-on: https://dart-review.googlesource.com/36540
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This changes DDC/K to handle `dynamic` and `Object` equivalently at
runtime for the purposes of printing `extends` bounds of generic
function types.
Technically speaking DDK is the correct one (`<T>` is short for
`<T extends Object>` in the spec, not `<T extends dynamic>`).
In contrast DDC/Analyzer treat the absence of a bound as `dynamic`.
At runtime this distinction will disappear in Dart 2, and we may
stop tracking it completely, so this change is a step towards that.
Change-Id: Ie1ead2ad55b72718485fe0817456981873a6d04f
Reviewed-on: https://dart-review.googlesource.com/36563
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This is necessary to avoid confusion when a generic function or method
recursively calls itself.
Fixes#31759.
Change-Id: I4e3be2093e9d6b81f084250435ea7493ca6b2464
Reviewed-on: https://dart-review.googlesource.com/36363
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
See 38dcb10543 for details.
Change-Id: I00608f7106e1b37cde81b8145d8d748f8cd97804
Reviewed-on: https://dart-review.googlesource.com/36520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is the next step towards removing findMemberName
and improving class member and top level declaration
recovery.
* Remove modifiers from findMemberName results
* Inline modifier parsing in parseFields
* move non modifier recovery out of ModifierRecoveryContext
Change-Id: I9cb4abd7632021720ba184440f0b1af382e72794
Reviewed-on: https://dart-review.googlesource.com/36500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
The isolate creation callback flow was using DFE::kernel_file_specified()
to decide whether to load kernel program or not. However, since this flag
is not isolate specific, it was causing problems in the case where a dill
file was passed as the main dart program; the other isolates, even if
they were loading a snapshot, were looking for a kernel program.
This change was originally submitted as
"Make the decision, on whether to start the kernel isolate, liberal." It
was reverted due to failures on simdbc bots. This change is another
attempt which fixes those failures.
Change-Id: I096445faf470e77ab8f7cc810082891dcede5b60
Reviewed-on: https://dart-review.googlesource.com/36125
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This change also includes: Return error if --kernel-binaires is not
specified when compiling source to kernel using dfe.
Change-Id: I29a98a17e111421e046c8de51580c5a6cba9df3b
Reviewed-on: https://dart-review.googlesource.com/36521
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Adds a ProcessStartMode in which the child process inherits the stdio
handles from the parent.
Change-Id: Ibe7b8ae08caccaed827ae0a911a3cced7803cb6b
Reviewed-on: https://dart-review.googlesource.com/36362
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
I've removed this helper as it appears to be premature optimization.
Change-Id: Ib1a20171a62e4141d902ad3ad0eaecaaa0c75583
Reviewed-on: https://dart-review.googlesource.com/35809
Reviewed-by: Vijay Menon <vsm@google.com>
This brings back the mixin unrolling code used by DDC's Analyzer backend,
because it handles features kernel's unrolling does not:
- constructor forwarding for all constructors
- mixin field initializers
- mixin constructor calls
- mixin aliases (mixin applications that are themselves valid mixins)
- covariance check stubs for mixin aliases
- mixable classes that have an unnamed factory constructor but no generative
constructors
Change-Id: Ibb49ec45d0feff0bd0a2a0ba18a346bda75db882
Reviewed-on: https://dart-review.googlesource.com/35810
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
We are still running _2 suites on the legacy compiler, so I incorrectly removed
entries in the previous "fix".
TBR=johnniwinther@google.com
Change-Id: Ie251393e53d35c2eb2f7a5bd301e3cb837fce8a5
Reviewed-on: https://dart-review.googlesource.com/36482
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The _2.status files are not normalized properly, so our script missed this.
We need to follow up with some additional fixes to the .status files and to add
to our script a way to detect these issues (typically whenever we have a "Pass"
and can't find the line that said otherwise).
TBR=johnniwinther@google.com
Change-Id: Icd4a6c003df86c0bf5c0894e971be13bc927f4ba
Reviewed-on: https://dart-review.googlesource.com/36480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
test.py looks at the status code to find out if a test crashed or not.
On linux everything < 0 is a crash, but on Windows a bit pattern is
in play.
It is unclear why this is the case, but some test currently 'Fail'
(instead of the expected 'Crash') on Windows because of exit code
-1073740791 (aka 3221226505 aka 0xC0000409 aka
STATUS_STACK_BUFFER_OVERRUN
(https://msdn.microsoft.com/en-us/library/cc704588.aspx)) indicating
that something isn't quite right with the crash-sniffing on Windows.
This CL changes it to indicate a crash if the exit-code is "0xC0...",
"0x80..." or "0x40..." as listed by
https://msdn.microsoft.com/en-us/library/cc704588.aspx.
Change-Id: I6c692173c3c3b5fb6c857a55a739d8f136d662bf
Reviewed-on: https://dart-review.googlesource.com/36261
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This has not been done earlier because no decision was made about
how to handle endian issues. This change assumes the same low
level format at either end of the serialization/deserialization.
R=kustermann@google.com
Bug: 21818
Change-Id: I5d97c1d0b89badf9cb972f0b1977eba0d1c0b9f8
Reviewed-on: https://dart-review.googlesource.com/35962
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The content handlers on Fuchsia can potentially give each Isolate
different handles to use for stdout and stderr. This change provides
a hook for an embedder to call to supply the handles to Dart, and
removes hardcoding of stdio handles to 0, 1, 2.
Change-Id: Ic03b77adc9a911e9c754562fa6a91f9929e10dfc
Reviewed-on: https://dart-review.googlesource.com/36122
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>