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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.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: Fix handling of [Object] and stubs generation. 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index dfd5a92a974849f20cdaecc6a8e44d7428143636..0f01f9c86572926652e2c1bf78a4637cc4c23fd5 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -323,6 +323,12 @@ class JavaScriptBackend extends Backend {
*/
final Set<ClassElement> specialOperatorEqClasses = new Set<ClassElement>();
+ /**
+ * A set of members that are called from subclasses via super.
+ */
+ final Set<FunctionElement> aliasedSuperMembers =
+ new Setlet<FunctionElement>();
+
List<CompilerTask> get tasks {
return <CompilerTask>[builder, optimizer, generator, emitter];
}
@@ -528,6 +534,20 @@ class JavaScriptBackend extends Backend {
return name;
}
+ /**
+ * Record that [method] is called from a subclass via `super`.
+ */
+ void registerAliasedSuperMember(FunctionElement method) {
+ aliasedSuperMembers.add(method);
+ }
+
+ /**
+ * Returns `true` is [member] is called from a subclass via `super`.
+ */
+ bool isAliasedSuperMember(FunctionElement member) {
+ return aliasedSuperMembers.contains(member);
+ }
+
bool isInterceptedMethod(Element element) {
if (!element.isInstanceMember) return false;
if (element.isGenerativeConstructorBody) {
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698