dart2js/http_test passes when run in isolation, but always times out
on my machine when run in a large batch. I marked it as slow in
unchecked mode (was already marked as slow in checked mode).
Some timeouts that were fixed in dart2js cps but somehow were added to
the status file again.
Some tests in corelib fail in CPS.
BUG=
Review URL: https://codereview.chromium.org//1292223003 .
Type propagation, shrinking reductions, and let sinking each took
more than 2 minutes on a stress test, where now they take a few
seconds.
Huge hash tables (Map/Set) were a big problem, especially when used as
worklists.
Let sinking had an issue with a linear-time search for the enclosing
continuation of an expression. This has been replaced with a visitor
state.
The stress test was:
tests/co19/src/LibTest/collection/ListBase/ListBase_class_A01_t02
This was only slow because negative constants get translated to
intercepted calls. That itself should be fixed, but the IR should
still be able to handle the stress.
The change in shrinking reductions altered the redex priority from
FIFO to LIFO which has a negative effect on code quality in
unwrapException (in any test case with a try/catch). It seems like
an existing issue that has surfaced.
Since I am going on vacation, I ask that someone would please
commit this on my behalf (assuming things are looking good).
--asgerf
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1252883003 .
The CPS RecursiveVisitor now uses an explicit stack of things to do
on the way out of a term. Every CPS pass has been hacked to fit the
new visitor paradigm.
The tree visitors now iterate over chains of ExpressionStatements.
This seems to do the trick, mostly because direct-style rewriting
significantly reduces the height of the tree.
The IR tracers still use deep recursion, but they are disabled by
default anyway so they are not critical.
BUG=
R=floitsch@google.com, karlklose@google.com
Review URL: https://codereview.chromium.org//1251083002.
Without reflection, redirecting factory constructor invocations are shortcut at the instantiation site. With reflection, code like
reflectClass(Foo).newInstance(const Symbol(''), [])
can hit a redirecting factory constructor and we need to emit a function that does the redirection and type substitution.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1227873004 .
The world will refuse to emit getters and setters for field it thinks
will be accessed directly.
Rewriting getter/setter calls to field accesses must happen at
build-time so we do not rely on an optimization for correctness.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1227543008.
Support try/catch/finally by pretending it is macro-expanded into
try/catch and try/finally:
try S0 catch (ex, st) S1 finally S2
==>
try { try S0 catch (ex, st) S1 } finally S2
The duplicated code for try/catch and try/finally is abstracted into a
function parameterized over translations for all the parts that
differed.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1207703002.
Try/finally is implemented by inlining. There is a try/catch to catch
exceptions in the try block. The catch body contains the finally code
followed by a rethrow. The code for finally is translated again after the
normal exit of the try block. Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.
Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1201983002.
The generated code uses different helpers than the SSA. In SSA, there are calls to buildFunctionType and _isTest. The CPS uses checkSubtypeOfRuntimeType, the "one size fits all" method we also use to test against type variable types.
When the function type has no type variables in it we could hoist the function type into a constant, but the constant system does not support type representation constants at the moment. But it seems like an optimization we may want to add later.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1180973003.
There are also a number of somewhat unrelated changes to get
better type information out of the global type inference.
The dependency on TypedSelector is causing a lot of problems there.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1175973005.