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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 693883003: Encode super calls via extra properties on prototypes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index f67fe0030254043ea8bd3846ff4f2304649a6cf7..c3e5ad545890a4fb802fb86fb14887323886b278 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1682,14 +1682,23 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
registry.registerDynamicGetter(selector);
registry.registerGetterForSuperMethod(node.element);
methodName = backend.namer.invocationName(selector);
+ push(
sra1 2014/11/03 18:30:56 What would it take to use an alias for getters too
herhut 2014/11/04 12:52:49 Getters are more complicated, as they can be real
+ js.js('#.prototype.#.call(#)', [
floitsch 2014/11/03 09:46:22 indentation.
herhut 2014/11/04 12:52:49 Done.
+ backend.namer.elementAccess(superClass),
+ methodName, visitArguments(node.inputs, start: 0)]),
+ node);
} else {
- methodName = backend.namer.getNameOfInstanceMember(superMethod);
- }
- push(
- js.js('#.prototype.#.call(#)', [
- backend.namer.elementAccess(superClass),
- methodName, visitArguments(node.inputs, start: 0)]),
+ methodName =
+ backend.namer.getNameOfAliasedSuperMember(superMethod);
+ backend.registerAliasedSuperMember(superMethod, node.caller);
+ use(node.inputs.first);
+ push(
+ js.js('#.#(#)', [
+ pop(), methodName,
+ visitArguments(node.inputs, start: 1)]),
node);
+ }
+
}
}

Powered by Google App Engine
This is Rietveld 408576698