| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.js_emitter.interceptor_stub_generator; | 5 library dart2js.js_emitter.interceptor_stub_generator; |
| 6 | 6 |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../constants/values.dart'; | 8 import '../constants/values.dart'; |
| 9 import '../elements/entities.dart'; | 9 import '../elements/entities.dart'; |
| 10 import '../elements/types.dart' show InterfaceType; | 10 import '../elements/types.dart' show InterfaceType; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // A.foo() {} | 397 // A.foo() {} |
| 398 // A.bar() {} | 398 // A.bar() {} |
| 399 // } | 399 // } |
| 400 // | 400 // |
| 401 // Which are described by the map | 401 // Which are described by the map |
| 402 // | 402 // |
| 403 // {"": A.A$, "foo": A.A$foo, "bar": A.A$bar} | 403 // {"": A.A$, "foo": A.A$foo, "bar": A.A$bar} |
| 404 // | 404 // |
| 405 // We expect most of the time the map will be a singleton. | 405 // We expect most of the time the map will be a singleton. |
| 406 var properties = []; | 406 var properties = []; |
| 407 for (FunctionEntity member in analysis.constructors(classElement)) { | 407 for (ConstructorEntity member in analysis.constructors(classElement)) { |
| 408 properties.add(new jsAst.Property(js.string(member.name), | 408 properties.add(new jsAst.Property(js.string(member.name), |
| 409 backend.emitter.staticFunctionAccess(member))); | 409 backend.emitter.staticFunctionAccess(member))); |
| 410 } | 410 } |
| 411 | 411 |
| 412 var map = new jsAst.ObjectInitializer(properties); | 412 var map = new jsAst.ObjectInitializer(properties); |
| 413 elements.add(map); | 413 elements.add(map); |
| 414 } | 414 } |
| 415 } | 415 } |
| 416 | 416 |
| 417 return new jsAst.ArrayInitializer(elements); | 417 return new jsAst.ArrayInitializer(elements); |
| 418 } | 418 } |
| 419 } | 419 } |
| OLD | NEW |