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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.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: comments 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 | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
index a1d3610313a000087529643d0c114996f2b51616..3912a8d8e4cb4db9041fff0dd755ef3748dacfb0 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
@@ -143,12 +143,18 @@ jsAst.Expression getReflectionDataParser(String classesCollector,
jsAst.Statement addStubs = js.statement('''
function addStubs(descriptor, array, name, isStatic,
originalDescriptor, functions) {
- var f, funcs =
- [originalDescriptor[name] =
- descriptor[name] = f = ${readFunction("array", "$FUNCTION_INDEX")}];
+ var index = $FUNCTION_INDEX, alias = array[index], f;
+ if (typeof alias == "string") {
+ f = array[++index];
+ } else {
+ f = alias;
+ alias = name;
+ }
+ var funcs = [originalDescriptor[name] = descriptor[name] =
+ descriptor[alias] = f];
f.\$stubName = name;
functions.push(name);
- for (var index = $FUNCTION_INDEX; index < array.length; index += 2) {
+ for (; index < array.length; index += 2) {
f = array[index + 1];
if (typeof f != "function") break;
f.\$stubName = ${readString("array", "index + 2")};
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698