This is the first step towards improving the Selector as an
abstraction used by the resolver, builder, and enqueur. The
intent is to have the resolver construct selectors that can
be used for method lookup, tree shaking, and for simplifying
the logic we use to build the correct SSA instructions for
sends (some of which are quite complex).
Next step is to get rid of more of the adhoc selector building
that's done outside of the resolver and clean up how we resolve
sends. After that, I'll start removing the need for passing
around both a name and a selector in a lot of places.
R=ahe@google.com,sgjesse@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10825337
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10637 260f80e4-7a28-3924-810f-c04153c831b5
If a self-recursive function calls itself with different argument
types that the ones currently expected the actual recompilation of the
function did not take place. This caused wrong JavaScript code to be
generated.
This change queues the generated JavaScript code to be invalidated to
after compiling the current function so that it itself can be
invalidated correctly.
R=floitsch@google.com, ahe@google.com
BUG=dart:4492
TEST=tests/compiler/dart2js_extra/regress/4492_test.dart
Review URL: https://chromiumcodereview.appspot.com//10854140
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10622 260f80e4-7a28-3924-810f-c04153c831b5
Currently code assumes that a member's immediate enclosingElement is
its class element.
If we introduce compilation unit override elements into the enclosing
chain, this will no longer be true.
This CL changes the places that assumes this to use isMember() or
getEnclosingClass(). The assumption is still in place in isMember(),
which will need to be modified when things change.
Review URL: https://chromiumcodereview.appspot.com//10834243
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10438 260f80e4-7a28-3924-810f-c04153c831b5
The propagated types at call sites for dynamic invocations are
collected. When a functions is compiled it is checked whether
there is type information available from call sites. If so the
function is compiled with the asumption that these types will
always be provided. If these expected types change during the
rest of the compilation process the generated code for the
function will be flushed and the function scheduled for
compilation again.
Note that the scheduling for being compiled again is not using
the re-compilation queue. The Re-compilation queue is used for
re-compilation functions when all functions have been compile
once and type information will not change.
R=floitsch@google.com, ahe@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10827181
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10383 260f80e4-7a28-3924-810f-c04153c831b5
Instead of storing a boolean to indicate whether a field is only
intialized to an integer store the propagated type instead. If
different types are encountered for the same field indicate this with
HType.UNKNOWN.
Also fix a bug in the checking, as potential single type initializers
is not the same as known single type initializers.
This is in preparation for information on other types than integers.
R=floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10584009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8963 260f80e4-7a28-3924-810f-c04153c831b5
For each field which is accessed directly in the generated JavaScript
code track whether all the setters are setting the field to an integer
constant. If that is the case the codegen will always generate ===
comparison when comparing to an integer constant.
To know for sure that only integer constants are assigned the
functions having the getters need to be recompiled.
This gives ~10% on Delta Blue.
R=ngeoffray@google.com, floitsch@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10539156
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8796 260f80e4-7a28-3924-810f-c04153c831b5
This is a prototype with the ability for dart2js to retry the
compilation of a method after everything has been compiled
once. Information collected during the first compilation can then be
used when retrying the compilation.
During compilation information on whether setters are used on specific
fields is collected. When compilation is retried and there are no
setters for a field it is treated as if it was declared final.
As this is a prototype there are some issues we need to discuss, e.g.
* The two queues should probably be generalized some way - maybe with
listeners on specific changes to the collected information
* Throwing Pass2BailoutException when retrying compilation is a bit of
a hack. We should probably not try to retry something we can't.
* Where to store the imformation collected during compilation
This is one way of improving Delta Blue with 25-30%.
R=ahe@google.com, ngeoffray@google.com, kasperl@google.com, ager@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10537025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8647 260f80e4-7a28-3924-810f-c04153c831b5