We check all known files now, so we don't need looking up FileState(s)
by paths. It is expensive when we do it for thousand files in multiple
drivers.
Stopwatch is also not free, so now we check it every 100 files.
This makes _FilesReferencingNameTask about 4 times faster.
In total search of an element in a priority file is 2 times faster.
R=brianwilkerson@google.com
Change-Id: I2738df8035f84d20a8b7e1b6d3040d4461c2609d
Reviewed-on: https://dart-review.googlesource.com/58141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
- Add test for JavaScriptFunction type tests
- Make toString() for JavaScriptFunction more explicit.
Change-Id: I60042b909709c822c924336fd4973f35dc7f779a
Reviewed-on: https://dart-review.googlesource.com/58062
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Embedded addresses are not safe for AppAOT and AppJIT snapshots.
Change-Id: Id36adb2e430bfc92c409ec96db15f2ad2151b2cb
Reviewed-on: https://dart-review.googlesource.com/58060
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This CL adds base classes for breakpoint events (which support a
`breakpoint` getter) and async suspension events (which support an
`atAsyncSuspension` getter). Previously these getters were accessed
through dynamic dispatch.
Change-Id: I9bc450a8988483cd0662b1dfe31b4adaf0936ff9
Reviewed-on: https://dart-review.googlesource.com/57380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Relanding 4be50d6fa1 with fixes to DBC
and location summaries: AssertAssignable must save FPU registers.
For now we are limiting this to type checks against type parameter types.
In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).
Before this change in Dart 2 mode numbers were 51s and 57s respectively.
After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.
Issue https://github.com/dart-lang/sdk/issues/31798
Issue https://github.com/dart-lang/sdk/issues/33257
Change-Id: Ifb55f86453bfdf36a2e03bcd7f3197cfde257103
Reviewed-on: https://dart-review.googlesource.com/57980
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
related #33314
Change-Id: I3f715f5c3580c9f865a4579b732ba56c39c69012
Reviewed-on: https://dart-review.googlesource.com/58001
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This is necessary because HtmlElement.children= requires its parameter
type to be a List<Element>, and text nodes are not elements.
Change-Id: I99c91fe060c16f02d737d904f6869b3dad19c196
Reviewed-on: https://dart-review.googlesource.com/57005
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
VM option --limit-ints-to-64-bits was enabled by default a while ago,
and now we're preparing to remove it from Dart VM.
This CL removes all uses of this option in preparation for this cleanup.
Issue: https://github.com/dart-lang/sdk/issues/33306
Change-Id: I8f33cf4ca8ce7ef9a171a982346e43dd8cb722a9
Reviewed-on: https://dart-review.googlesource.com/57960
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This should be a non-breaking change since this is an internal
analyzer API. All clients that were making use of this internal API
have been updated to pass in the required argument.
Change-Id: Iec81454f6382c8de9ff6340d372338e678a3c73a
Reviewed-on: https://dart-review.googlesource.com/57920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
* When iterating over folders with folderIterator we must check
elapsed time and decide to exit before we call moveNext. If we
do it in an oposite order we will skip the current element when we
come back - because we will call moveNext again.
* Only add driver.addedFiles *once* to the list of files. Previous
we were adding it everytime we called perform() leading to duplicates
in the list.
Change-Id: Idd1d2a272661fe204b24af0be4539c3a154c9652
Reviewed-on: https://dart-review.googlesource.com/57826
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This test was looking up "int", "List" ... in a generated test library
instead of the "dart:core" library.
It seems like the old lookup has succeded because the C++ parser adds all
imports to the library object and the lookup mechanism uses the library scope,
which most likely falls back to the import scope.
Issue https://github.com/dart-lang/sdk/issues/33042
Change-Id: I37ea756fe53fe5dcbd8efe24053591816d5fc4af
Reviewed-on: https://dart-review.googlesource.com/57821
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The test times out, because we don't get any answer on our getNavigation().
Technically this happens because we dispose the corresponding instance
of AnalysisDriver, so it is removed from the AnalysisDriverScheduler,
and getResult() never completes.
Which, I think makes sense.
Once the analysis root is removed, the client cannot expect answers.
So, there is no need for the test.
R=brianwilkerson@google.com
Change-Id: I124ac3d6a4a903880c7b8f82cafe692b38c59017
Reviewed-on: https://dart-review.googlesource.com/57903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Change-Id: Iff246ba92976bab87b643ee9e96efa8f1db0cccb
Reviewed-on: https://dart-review.googlesource.com/57715
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 4be50d6fa1.
Reason for revert: Failures on SIMDBC64 and Analyzer bots.
Original change's description:
> [vm] Enable type stubs based type checks in JIT mode for some types.
>
> For now we are limiting this to type checks against type parameter types.
>
> # Performance improvements
>
> In Dart 1 mode Dart2JS compiles itself in 28s when running from source
> and in 23s when running from ideal app-jit snapshot (trained on the
> same workload).
>
> Before this change in Dart 2 mode numbers were 51s and 57s respectively.
>
> After this change in Dart 2 mode numbers are 38s and 32s. Meaning
> that regression is reduced by 50%.
>
> Issue https://github.com/dart-lang/sdk/issues/31798
> Issue https://github.com/dart-lang/sdk/issues/33257
>
> Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
> Reviewed-on: https://dart-review.googlesource.com/57601
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,regis@google.com
Change-Id: I85a30c962b0cd556310e19193f5993ab76ecf2e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/57840
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
For now we are limiting this to type checks against type parameter types.
# Performance improvements
In Dart 1 mode Dart2JS compiles itself in 28s when running from source
and in 23s when running from ideal app-jit snapshot (trained on the
same workload).
Before this change in Dart 2 mode numbers were 51s and 57s respectively.
After this change in Dart 2 mode numbers are 38s and 32s. Meaning
that regression is reduced by 50%.
Issue https://github.com/dart-lang/sdk/issues/31798
Issue https://github.com/dart-lang/sdk/issues/33257
Change-Id: I34bf5385a5cc3c7702dc281c6dfa89da85d3dde1
Reviewed-on: https://dart-review.googlesource.com/57601
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
The abstract class TypeInferenceEngineImpl does not really serve any
purpose, so remove it. If nothing else, it makes it easier to
understand what is going on and change things.
Change-Id: I9aabcb041b3fbc7d5b7b63dfef9effeb73a6bab8
Reviewed-on: https://dart-review.googlesource.com/57822
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Correctly typed as far as old mockito is concerned because it does not
check types. With this fixed we'll be clear to upgrade mockito inside
the SDK to the one that does.
Change-Id: If68c0bb02c8652be6b891c189fabee135423f94c
Reviewed-on: https://dart-review.googlesource.com/57712
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
I am about to start embarking on bug fixes and refactors to
FunctionType, so I want a set of tests that I can use to make sure I
don't break any important behaviors. These tests use a mock element
model, so they don't rely on any behaviors outside of FunctionTypeImpl
itself.
Change-Id: I037f6a8cd2ee2a94fba13bb9b6be9e7090e254e8
Reviewed-on: https://dart-review.googlesource.com/57708
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
substitute4 was only used by the kernel resynthesizer, which is not
being maintained at the moment (and which I believe needs to be
reworked anyhow). With substitute4 gone, _explicitTypeParameters was
always null (except in the case of CircularFunctionTypeImpl, where it
had no effect), so we can just replace it with literal `null`.
Change-Id: I5248e0f93b9a39c55d3e4e8b62150536656608e8
Reviewed-on: https://dart-review.googlesource.com/57709
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>