Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: dart/pkg/compiler/lib/src/ssa/codegen.dart

Issue 762793002: Disable super-aliases during incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/dart/pkg/compiler/lib/src/ssa/codegen.dart b/dart/pkg/compiler/lib/src/ssa/codegen.dart
index a08610005cf5dc3df69ef963d1ab58379f8cf55c..c1ad12339ec7251a64233e78ea15d1826f3a0340 100644
--- a/dart/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/dart/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1669,36 +1669,37 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
}
} else {
Selector selector = node.selector;
- String methodName;
- if (selector.isGetter) {
- // If the selector we need to register a typed getter to the
- // [world]. The emitter needs to know if it needs to emit a
- // bound closure for a method.
- TypeMask receiverType =
- new TypeMask.nonNullExact(superClass, compiler.world);
- selector = new TypedSelector(receiverType, selector, compiler.world);
- // TODO(floitsch): we know the target. We shouldn't register a
- // dynamic getter.
- registry.registerDynamicGetter(selector);
- registry.registerGetterForSuperMethod(node.element);
- methodName = backend.namer.invocationName(selector);
- push(
- js.js('#.prototype.#.call(#)', [
- backend.namer.elementAccess(superClass),
- methodName, visitArguments(node.inputs, start: 0)]),
- node);
+
+ if (!backend.registerAliasedSuperMember(superMethod, selector)) {
+ String methodName;
+ if (selector.isGetter) {
+ // If the selector we need to register a typed getter to the
+ // [world]. The emitter needs to know if it needs to emit a
+ // bound closure for a method.
+ TypeMask receiverType =
+ new TypeMask.nonNullExact(superClass, compiler.world);
+ selector = new TypedSelector(receiverType, selector, compiler.world);
+ // TODO(floitsch): we know the target. We shouldn't register a
+ // dynamic getter.
+ registry.registerDynamicGetter(selector);
+ registry.registerGetterForSuperMethod(node.element);
+ methodName = backend.namer.invocationName(selector);
+ } else {
+ assert(invariant(node, compiler.hasIncrementalSupport));
+ methodName = backend.namer.getNameOfInstanceMember(superMethod);
+ }
+ push(js.js('#.prototype.#.call(#)',
+ [backend.namer.elementAccess(superClass),
+ methodName, visitArguments(node.inputs, start: 0)]),
+ node);
} else {
- methodName =
- backend.namer.getNameOfAliasedSuperMember(superMethod);
- backend.registerAliasedSuperMember(superMethod);
use(node.receiver);
push(
js.js('#.#(#)', [
- pop(), methodName,
+ pop(), backend.namer.getNameOfAliasedSuperMember(superMethod),
visitArguments(node.inputs, start: 1)]), // Skip receiver argument.
node);
}
-
}
}

Powered by Google App Engine
This is Rietveld 408576698