| 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.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import '../../closure.dart' show ClosureFieldElement; | 7 import '../../closure.dart' show ClosureFieldElement; |
| 8 import '../../common.dart'; | 8 import '../../common.dart'; |
| 9 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
| 10 import '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 824 |
| 825 String holderName = | 825 String holderName = |
| 826 namer.globalObjectForLibrary(helpers.interceptorsLibrary); | 826 namer.globalObjectForLibrary(helpers.interceptorsLibrary); |
| 827 // TODO(floitsch): we shouldn't update the registry in the middle of | 827 // TODO(floitsch): we shouldn't update the registry in the middle of |
| 828 // generating the interceptor methods. | 828 // generating the interceptor methods. |
| 829 Holder holder = _registry.registerHolder(holderName); | 829 Holder holder = _registry.registerHolder(holderName); |
| 830 | 830 |
| 831 Iterable<js.Name> names = | 831 Iterable<js.Name> names = |
| 832 backend.oneShotInterceptorData.specializedGetInterceptorNames; | 832 backend.oneShotInterceptorData.specializedGetInterceptorNames; |
| 833 return names.map((js.Name name) { | 833 return names.map((js.Name name) { |
| 834 Set<ClassElement> classes = | 834 Set<ClassEntity> classes = |
| 835 backend.oneShotInterceptorData.getSpecializedGetInterceptorsFor(name); | 835 backend.oneShotInterceptorData.getSpecializedGetInterceptorsFor(name); |
| 836 js.Expression code = stubGenerator.generateGetInterceptorMethod(classes); | 836 js.Expression code = stubGenerator.generateGetInterceptorMethod(classes); |
| 837 return new StaticStubMethod(name, holder, code); | 837 return new StaticStubMethod(name, holder, code); |
| 838 }); | 838 }); |
| 839 } | 839 } |
| 840 | 840 |
| 841 List<Field> _buildFields(Element holder, | 841 List<Field> _buildFields(Element holder, |
| 842 {bool visitStatics, bool isHolderInterceptedClass: false}) { | 842 {bool visitStatics, bool isHolderInterceptedClass: false}) { |
| 843 List<Field> fields = <Field>[]; | 843 List<Field> fields = <Field>[]; |
| 844 new FieldVisitor(_compiler, namer, closedWorld) | 844 new FieldVisitor(_compiler, namer, closedWorld) |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 Constant constant = new Constant(name, holder, constantValue); | 970 Constant constant = new Constant(name, holder, constantValue); |
| 971 _constants[constantValue] = constant; | 971 _constants[constantValue] = constant; |
| 972 } | 972 } |
| 973 } | 973 } |
| 974 | 974 |
| 975 Holder _registerStaticStateHolder() { | 975 Holder _registerStaticStateHolder() { |
| 976 return _registry.registerHolder(namer.staticStateHolder, | 976 return _registry.registerHolder(namer.staticStateHolder, |
| 977 isStaticStateHolder: true); | 977 isStaticStateHolder: true); |
| 978 } | 978 } |
| 979 } | 979 } |
| OLD | NEW |