Chromium Code Reviews| 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")}; |