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

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

Issue 753113002: 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: pkg/compiler/lib/src/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 6b1261faf32e745c497012e0ff96a05943a2a3af..6c023a50b65a5e6f64be5e690e31ef3e76f4e020 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1682,14 +1682,23 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
registry.registerDynamicGetter(selector);
registry.registerGetterForSuperMethod(node.element);
methodName = backend.namer.invocationName(selector);
- } else {
- methodName = backend.namer.getNameOfInstanceMember(superMethod);
- }
- push(
+ push(
ahe 2014/11/25 09:33:03 I assume this is because super getters aren't supp
herhut 2014/11/25 14:03:20 It simply was not common enough to optimize for.
js.js('#.prototype.#.call(#)', [
- backend.namer.elementAccess(superClass),
- methodName, visitArguments(node.inputs, start: 0)]),
+ backend.namer.elementAccess(superClass),
+ methodName, visitArguments(node.inputs, start: 0)]),
+ node);
+ } else {
+ methodName =
+ backend.namer.getNameOfAliasedSuperMember(superMethod);
+ backend.registerAliasedSuperMember(superMethod);
+ use(node.inputs.first);
ahe 2014/11/25 09:33:03 Is there a more descriptive name for this node?
herhut 2014/11/25 14:03:20 The entire file uses [node] for the current node b
ahe 2014/11/25 14:10:33 What I meant is: Is there a more descriptive name
herhut 2014/11/25 14:25:01 Got you, there is. Done.
+ push(
+ js.js('#.#(#)', [
+ pop(), methodName,
+ visitArguments(node.inputs, start: 1)]),
node);
+ }
+
}
}

Powered by Google App Engine
This is Rietveld 408576698