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

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: Incremental Compilation Support restored. 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/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..798c98059e16e1193c0b4a674623a3515d2cfcee 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,15 @@ 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 = typeof alias == "string" ? array[++index]
floitsch 2014/11/25 14:25:13 Use an if. The "?" gets too complicated.
herhut 2014/11/26 09:41:36 Done.
+ : (alias = name, array[index]),
+ funcs =
+ [originalDescriptor[name] =
+ descriptor[name] = descriptor[alias] = f];
floitsch 2014/11/25 14:25:13 indentation.
herhut 2014/11/26 09:41:36 Done.
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")};

Powered by Google App Engine
This is Rietveld 408576698