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

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: Renames registerAliasedSuperMember. Created 6 years 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 fa1ea1f83da5d4cfcd93e708f69d35dbdabda863..a912125c93e019f51404b454628dd4dd36cc054e 100644
--- a/dart/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/dart/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1662,36 +1662,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.maybeRegisterAliasedSuperMember(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);
}
-
}
}
« no previous file with comments | « dart/pkg/compiler/lib/src/js_backend/backend.dart ('k') | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698