Relinquishing execution flow and running event loop after every piece
of work in _FilesReferencingNameTask works, but has too much overhead.
If we instead use a fixed time quantum, we can spend less time overall.
E.g. time to search in analyzer files is 400 microseconds.
R=brianwilkerson@google.com, paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2535053002 .
Unlike the previous AstFactory (now called AstTestFactory), this class
is not just for testing; it is intended to be able to create all
analyzer AST objects used in production. Also, its methods are
non-static.
For now, all users of the new AstFactory access it using the final
variable `astFactory` in standard_ast_factory.dart. In future CLs I
intend to plumb a reference to the AstFactory through various analyzer
classes so that it can be used in a dependency injection style.
Also, the classes CommentType and UriValidationCodeImpl have been
moved out of the AST implementation file
(pkg/analyzer/lib/src/dart/ast/ast.dart) and to their own files so
that the AST interface will be able to continue to use them without
depending on the AST implementation.
In follow-up CLs I will change the analyzer and its clients to use the
AstFactory rather than the redirecting constructors in the AST
interface file, and then remove those redirecting constructors.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2522143003 .
We have an error report:
My guess is that `errorCodeByUniqueName` returned `null`.
It might be either a bug in `errorCodeByUniqueName`, or a shortcoming
or our current data version mechanism (which we know about - it should
be a hash of sources or something like this).
Either way, a missing error is better than a crash.
R=paulberry@google.com, brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2527423002 .
Currently failures on the buildbot will look for example like this:
Short reproduction command (experimental):
python tools/test.py -cdartk -t120 --write-debug-log --write-test-outcome-log --copy-coredumps --exclude-suite pkg language/transitive_private_library_access_test
But developers only would like to see
python tools/test.py -cdartk -t120 language/transitive_private_library_access_test
R=whesse@google.com
Review URL: https://codereview.chromium.org/2532123002 .
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".
Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context
A unit test has been added to check that the verifier rejects certain
invalid ASTs.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2531873002 .
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.
It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2467113003 .
Committed: b08fb1373f
co19 test suite updated to commit f05d5aee5930bfd487aedf832fbd7b832f502b15 of dart-lang/co19 repository, dated Nov 21 2016.
Status files are updated for this roll.
Sanity checks now run in a single pass rather than two, and
instead of building a set consisting of all members, it uses
a bit from the transformer flags to remember which members are
not orphaned.
As an additional check, it now checks that members are not
declared more than once.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2529973002 .
This was originally done to be consistent with FunctionType,
where the named parameters are sorted, but for FunctionNode
it is not necessary.
It causes issues for natives that expect parameters to be
declared in a certain order. It is also an issue if we
ever want to reuse the kernel format for summaries, where
it is also preferable to present the named parameters in
their original order.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2527933002 .
This CL changes dart2js such that the effect that we used to get with
option '--initializing-formal-access' is now obtained unconditionally,
i.e., that extension is now enabled by default.
dart2js will continue to accept the option, such that scripts passing
the option will not break.
The CL is _not_ intended to be landed at this time, the plan is to
enable the feature in a coordinated manner when all tools are ready.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2141023002 .
This breaks inlining because it expects that all collected ReturnInstr
are strongly connected to the rest of the graph.
Source based FlowGraphBuilder achieves that by eagerly stopping construction
as constructed fragment is closed (e.g. Throw is emitted).
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org/2528673002 .
- Kernel-to-IL translation leaves behind some unused constants without temp indices assigned.
- Let compile time errors propagate instead of failing with FATAL error in the post load class finalization.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org/2528763002 .
This updates co19 to commit 2e98931a4d40781110220d4b2d131efa6fc4669d
Merge branch 'co19patch' into rebased_co19_patch
Sort status lines ignoring alphabetical order
Status files updated according lates buildbot run results
Status files updated according the latest Chrome run
dart2js files updated for FF and Chrome on Linux
DEPS and VM status files updated
status file updated according Linux run
Status files updated according latest Dartium run
dart2js status file updated according the last tests run on FF
dart2js status file updated according the last tests run on Chrome and FF
Analyzer and VM status files are updated according last versions of co19 and sdk
BUG=
R=sortie@google.com
Review URL: https://codereview.chromium.org/2528953002 .
E.g.
file1:
------------
library crash;
part "file2.dart";
main() {
print(field2);
}
crash() {
try {
throw "Crashing!";
} catch(exception, stacktrace) {
print(stacktrace);
}
}
file2:
------------
part of crash;
var field2 = crash();
We want something like
#0 crash (whatnot/file1.dart:11:5)
#1 field2 (whatnot/file2.dart:3:14) <-- good line
#2 field2 (whatnot/file2.dart:3:5)
#3 main (whatnot/file1.dart:6:9)
and not like
#0 crash (whatnot/file1.dart:11:5)
#1 field2 (whatnot/file1.dart:3:14) <-- bad line
#2 field2 (whatnot/file2.dart:3:5)
#3 main (whatnot/file1.dart:6:9)
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2519133004 .