Optimize dynamic call tracking using random sampling.
Apply source maps to improve dynamic call tracking accuracy.
Dynamic calls within the sdk are now attributed correctly.
Fix bug formatting modules where we were incorrectly flagging them as JS.
BUG=
R=jmesserly@google.com, vsm@google.com
Review-Url: https://codereview.chromium.org/2811343002 .
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2771453003 .
For example:
type 'TopLevelVariableElementImpl' is not a subtype of type 'FunctionTypeAliasElement' in type cast where
TopLevelVariableElementImpl is from package:analyzer/src/dart/element/element.dart
FunctionTypeAliasElement is from package:analyzer/dart/element/element.dart
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2824873002 .
I think this happens when a driver is disposed why search is in
progress. So, we need to make defensive copies.
This also makes me realize that we don't handle situations when
a driver instance is disposed, but it has pending requests, such as
getResult(), getIndex(), etc - actually any getXXX(), and search. As
it is now, I think we just leave these Future(s) and they never
complete.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2818163003 .
Add function_type_arguments field in closure instances.
Lots of other smaller changes, also related to generic function semantics.
This is still work in progress, with a change of direction in the design:
The type argument vector of a generic function will be prepended with the type
arguments of enclosing generic functions. The re-allocation and concatenation
will be done in nested generic function's prolog. This will greatly simplify
instantiation of types at run time without having to search the context for
parent function's type arguments. However, a closure instance now requires an
additional field. On the other hand, type parameters do not require a
parent_level field anymore.
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2818273002 .
1. Simplify HPhi nodes that merge refinements of the same value.
2. Replace the condition of HIf with a constant when the HIf does nothing (no controlled statements or phis).
Together with existing optimizations, this can optimize `s?.toString()` to `s` when `s` is known to be a nullable String.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2823543002 .
We see (rarely, but still) situations when FileState attempts to read
a *.unlinked file, but the file is empty. We think that this happens
when the user's machine crashes, so files are created, but not fully
written to disk.
This change has its cost - increase of FileByteStore.put() CPU usage
from 7% to 10% on Mac.
R=paulberry@google.com, brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2821683002 .
The type Map<T, Foo<Set<T>>> contains one type variable referenced twice,
so there are two inputs into the HTypeInfoExpression instruction.
If Foo is a typedef, T can be reused, e.g.
typedef E Foo<E>(E a, E b);
As the typedef is expanded (to Function(Set<T>, Set<T>) => Set<T>) it
should not consume additional types from the to-level input. We
prevent this by capturing the types and using the captured type
expressions inside the typedef expansion.
TODO: We should make the type subexpression Foo<...> be a second
HTypeInfoExpression, with Set<T> as its input (a third
HTypeInfoExpression). This would share all the Set<T> subexpressions
instead of duplicating them. This would require HTypeInfoExpression
inputs to correspond to type variables AND typedefs.
BUG= https://github.com/dart-lang/sdk/issues/28749R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2812393003 .
Having an issue forwarding Symbol::InTypeCheck into dart and back;
without it, the exceptions that are thrown are `TypeError`s and not
`CastError`s.
Certainly a bit longform to read, as well.
Committing for feedback/suggestions/help
BUG=
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2805903004 .
Had to allow a means of supplementing existing errors/line info, but
then also for where dart has no response whatsoever (like html), need a
way to provide analysis options and line info in addition to errors.
Happy to clean it up, but also not very motivated to make it perfect
since it should be temporary.
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2815643004 .