| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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_helpers.impact; | 5 library dart2js.js_helpers.impact; |
| 6 | 6 |
| 7 import '../common/names.dart' show | 7 import '../common/names.dart' show |
| 8 Identifiers; | 8 Identifiers; |
| 9 import '../compiler.dart' show | 9 import '../compiler.dart' show |
| 10 Compiler; | 10 Compiler; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 needsInt( | 132 needsInt( |
| 133 'Needed to encode the invocation kind of super.noSuchMethod.'), | 133 'Needed to encode the invocation kind of super.noSuchMethod.'), |
| 134 needsList( | 134 needsList( |
| 135 'Needed to encode the arguments of super.noSuchMethod.'), | 135 'Needed to encode the arguments of super.noSuchMethod.'), |
| 136 needsString( | 136 needsString( |
| 137 'Needed to encode the name of super.noSuchMethod.')]); | 137 'Needed to encode the name of super.noSuchMethod.')]); |
| 138 | 138 |
| 139 BackendImpact get constantMapLiteral { | 139 BackendImpact get constantMapLiteral { |
| 140 | 140 |
| 141 ClassElement find(String name) { | 141 ClassElement find(String name) { |
| 142 return helpers.find(backend.jsHelperLibrary, name); | 142 return helpers.find(helpers.jsHelperLibrary, name); |
| 143 } | 143 } |
| 144 | 144 |
| 145 return new BackendImpact( | 145 return new BackendImpact( |
| 146 instantiatedClasses: [ | 146 instantiatedClasses: [ |
| 147 find(JavaScriptMapConstant.DART_CLASS), | 147 find(JavaScriptMapConstant.DART_CLASS), |
| 148 find(JavaScriptMapConstant.DART_PROTO_CLASS), | 148 find(JavaScriptMapConstant.DART_PROTO_CLASS), |
| 149 find(JavaScriptMapConstant.DART_STRING_CLASS), | 149 find(JavaScriptMapConstant.DART_STRING_CLASS), |
| 150 find(JavaScriptMapConstant.DART_GENERAL_CLASS)]); | 150 find(JavaScriptMapConstant.DART_GENERAL_CLASS)]); |
| 151 } | 151 } |
| 152 | 152 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 helpers.streamIteratorConstructor]); | 199 helpers.streamIteratorConstructor]); |
| 200 | 200 |
| 201 BackendImpact get stringInterpolation => new BackendImpact( | 201 BackendImpact get stringInterpolation => new BackendImpact( |
| 202 staticUses: [ | 202 staticUses: [ |
| 203 helpers.stringInterpolationHelper]); | 203 helpers.stringInterpolationHelper]); |
| 204 | 204 |
| 205 BackendImpact get catchStatement => new BackendImpact( | 205 BackendImpact get catchStatement => new BackendImpact( |
| 206 staticUses: [ | 206 staticUses: [ |
| 207 helpers.exceptionUnwrapper], | 207 helpers.exceptionUnwrapper], |
| 208 instantiatedClasses: [ | 208 instantiatedClasses: [ |
| 209 backend.jsPlainJavaScriptObjectClass, | 209 helpers.jsPlainJavaScriptObjectClass, |
| 210 backend.jsUnknownJavaScriptObjectClass]); | 210 helpers.jsUnknownJavaScriptObjectClass]); |
| 211 | 211 |
| 212 BackendImpact get throwExpression => new BackendImpact( | 212 BackendImpact get throwExpression => new BackendImpact( |
| 213 // We don't know ahead of time whether we will need the throw in a | 213 // We don't know ahead of time whether we will need the throw in a |
| 214 // statement context or an expression context, so we register both | 214 // statement context or an expression context, so we register both |
| 215 // here, even though we may not need the throwExpression helper. | 215 // here, even though we may not need the throwExpression helper. |
| 216 staticUses: [ | 216 staticUses: [ |
| 217 helpers.wrapExceptionHelper, | 217 helpers.wrapExceptionHelper, |
| 218 helpers.throwExpressionHelper]); | 218 helpers.throwExpressionHelper]); |
| 219 | 219 |
| 220 BackendImpact get lazyField => new BackendImpact( | 220 BackendImpact get lazyField => new BackendImpact( |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 staticUses: [ | 294 staticUses: [ |
| 295 // We will neeed to add the "$is" and "$as" properties on the | 295 // We will neeed to add the "$is" and "$as" properties on the |
| 296 // JavaScript object prototype, so we make sure | 296 // JavaScript object prototype, so we make sure |
| 297 // [:defineProperty:] is compiled. | 297 // [:defineProperty:] is compiled. |
| 298 helpers.defineProperty]); | 298 helpers.defineProperty]); |
| 299 | 299 |
| 300 BackendImpact get closure => new BackendImpact( | 300 BackendImpact get closure => new BackendImpact( |
| 301 instantiatedClasses: [ | 301 instantiatedClasses: [ |
| 302 coreClasses.functionClass]); | 302 coreClasses.functionClass]); |
| 303 } | 303 } |
| OLD | NEW |