| 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 ClosureTask, ClosureFieldElement; | 7 import '../../closure.dart' show ClosureTask, 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 '../../constants/values.dart' | 10 import '../../constants/values.dart' |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 286 } |
| 287 | 287 |
| 288 js.Expression _buildTypeToInterceptorMap() { | 288 js.Expression _buildTypeToInterceptorMap() { |
| 289 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( | 289 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( |
| 290 _options, | 290 _options, |
| 291 _commonElements, | 291 _commonElements, |
| 292 _task, | 292 _task, |
| 293 _nativeCodegenEnqueuer, | 293 _nativeCodegenEnqueuer, |
| 294 _constantHandler, | 294 _constantHandler, |
| 295 _namer, | 295 _namer, |
| 296 _nativeData, | |
| 297 _interceptorData, | 296 _interceptorData, |
| 298 _oneShotInterceptorData, | 297 _oneShotInterceptorData, |
| 299 _customElementsCodegenAnalysis, | 298 _customElementsCodegenAnalysis, |
| 300 _worldBuilder, | 299 _worldBuilder, |
| 301 _closedWorld); | 300 _closedWorld); |
| 302 return stubGenerator.generateTypeToInterceptorMap(); | 301 return stubGenerator.generateTypeToInterceptorMap(); |
| 303 } | 302 } |
| 304 | 303 |
| 305 MainFragment _buildMainFragment(LibrariesMap librariesMap) { | 304 MainFragment _buildMainFragment(LibrariesMap librariesMap) { |
| 306 // Construct the main output from the libraries and the registered holders. | 305 // Construct the main output from the libraries and the registered holders. |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 } | 929 } |
| 931 | 930 |
| 932 Iterable<StaticStubMethod> _generateGetInterceptorMethods() { | 931 Iterable<StaticStubMethod> _generateGetInterceptorMethods() { |
| 933 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( | 932 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( |
| 934 _options, | 933 _options, |
| 935 _commonElements, | 934 _commonElements, |
| 936 _task, | 935 _task, |
| 937 _nativeCodegenEnqueuer, | 936 _nativeCodegenEnqueuer, |
| 938 _constantHandler, | 937 _constantHandler, |
| 939 _namer, | 938 _namer, |
| 940 _nativeData, | |
| 941 _interceptorData, | 939 _interceptorData, |
| 942 _oneShotInterceptorData, | 940 _oneShotInterceptorData, |
| 943 _customElementsCodegenAnalysis, | 941 _customElementsCodegenAnalysis, |
| 944 _worldBuilder, | 942 _worldBuilder, |
| 945 _closedWorld); | 943 _closedWorld); |
| 946 | 944 |
| 947 String holderName = | 945 String holderName = |
| 948 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); | 946 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); |
| 949 // TODO(floitsch): we shouldn't update the registry in the middle of | 947 // TODO(floitsch): we shouldn't update the registry in the middle of |
| 950 // generating the interceptor methods. | 948 // generating the interceptor methods. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 } | 1008 } |
| 1011 | 1009 |
| 1012 Iterable<StaticStubMethod> _generateOneShotInterceptors() { | 1010 Iterable<StaticStubMethod> _generateOneShotInterceptors() { |
| 1013 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( | 1011 InterceptorStubGenerator stubGenerator = new InterceptorStubGenerator( |
| 1014 _options, | 1012 _options, |
| 1015 _commonElements, | 1013 _commonElements, |
| 1016 _task, | 1014 _task, |
| 1017 _nativeCodegenEnqueuer, | 1015 _nativeCodegenEnqueuer, |
| 1018 _constantHandler, | 1016 _constantHandler, |
| 1019 _namer, | 1017 _namer, |
| 1020 _nativeData, | |
| 1021 _interceptorData, | 1018 _interceptorData, |
| 1022 _oneShotInterceptorData, | 1019 _oneShotInterceptorData, |
| 1023 _customElementsCodegenAnalysis, | 1020 _customElementsCodegenAnalysis, |
| 1024 _worldBuilder, | 1021 _worldBuilder, |
| 1025 _closedWorld); | 1022 _closedWorld); |
| 1026 | 1023 |
| 1027 String holderName = | 1024 String holderName = |
| 1028 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); | 1025 _namer.globalObjectForLibrary(_commonElements.interceptorsLibrary); |
| 1029 // TODO(floitsch): we shouldn't update the registry in the middle of | 1026 // TODO(floitsch): we shouldn't update the registry in the middle of |
| 1030 // generating the interceptor methods. | 1027 // generating the interceptor methods. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 Constant constant = new Constant(name, holder, constantValue); | 1099 Constant constant = new Constant(name, holder, constantValue); |
| 1103 _constants[constantValue] = constant; | 1100 _constants[constantValue] = constant; |
| 1104 } | 1101 } |
| 1105 } | 1102 } |
| 1106 | 1103 |
| 1107 Holder _registerStaticStateHolder() { | 1104 Holder _registerStaticStateHolder() { |
| 1108 return _registry.registerHolder(_namer.staticStateHolder, | 1105 return _registry.registerHolder(_namer.staticStateHolder, |
| 1109 isStaticStateHolder: true); | 1106 isStaticStateHolder: true); |
| 1110 } | 1107 } |
| 1111 } | 1108 } |
| OLD | NEW |