CHA::HasOverride skips non-finalized classes when looking for overrides which means that we will install incorrect code if some subclass with an override was finalized while compilation was in progress.
To catch situations like this we record the number of finalized subclasses that class had
when CHA made the first negative decision about it (e.g. that it has no subclasses or that it has no overrides for some function) and before installing the code we check that number of subclasses matches.
Additionally renamed "leaf classes" to "guarded classes" because those classes are not necessarily leaf.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org/2002583002 .
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
Generalize current approach used for implicit getters/setters to all instance calls.
Additionally use propagated type to resolve targets if no concrete cid
is known:
class A {
void m() { }
void n() => m();
}
class B extends A { }
Even though the receiver type in n() can be A or B (concrete cid unknown), we can still
call m() directly since it is not overridden.
Also, allow inlining of methods that were not compiled yet in precompiled code.
BUG=
R=rmacnak@google.com, srdjan@google.com
Review URL: https://codereview.chromium.org/1410733006 .
I ran into issues with the collections library where classes and types were being finalized very late, affecting cha analysis.
class _LinkedCustomHashMap<K, V> extends _CustomHashMap<K, V> with _LinkedHashMapMixin<K, V>
abstract class _LinkedHashMapMixin<K, V> implements LinkedHashMap<K, V> {
Even though LinkedHashMap is a builtin object it can still be implemented after startup.
R=fschneider@google.com, iposva@google.com
Review URL: https://codereview.chromium.org//846213004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42874 260f80e4-7a28-3924-810f-c04153c831b5
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5