| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 js_backend.backend.codegen_listener; | 5 library js_backend.backend.codegen_listener; |
| 6 | 6 |
| 7 import '../common/names.dart' show Identifiers; | 7 import '../common/names.dart' show Identifiers; |
| 8 import '../common_elements.dart' show CommonElements, ElementEnvironment; | 8 import '../common_elements.dart' show CommonElements, ElementEnvironment; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 } | 236 } |
| 237 | 237 |
| 238 @override | 238 @override |
| 239 WorldImpact registerUsedConstant(ConstantValue constant) { | 239 WorldImpact registerUsedConstant(ConstantValue constant) { |
| 240 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); | 240 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); |
| 241 _computeImpactForCompileTimeConstant(constant, impactBuilder); | 241 _computeImpactForCompileTimeConstant(constant, impactBuilder); |
| 242 return impactBuilder; | 242 return impactBuilder; |
| 243 } | 243 } |
| 244 | 244 |
| 245 @override | 245 @override |
| 246 WorldImpact registerUsedElement(MemberElement member) { | 246 WorldImpact registerUsedElement(MemberEntity member) { |
| 247 WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl(); | 247 WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl(); |
| 248 _customElementsAnalysis.registerStaticUse(member); | 248 _customElementsAnalysis.registerStaticUse(member); |
| 249 | 249 |
| 250 if (member.isFunction && member.isInstanceMember) { | 250 if (member.isFunction && member.isInstanceMember) { |
| 251 MethodElement method = member; | 251 ClassEntity cls = member.enclosingClass; |
| 252 ClassElement cls = method.enclosingClass; | 252 if (member.name == Identifiers.call && |
| 253 if (method.name == Identifiers.call && | 253 _elementEnvironment.isGenericClass(cls) && |
| 254 !cls.typeVariables.isEmpty && | 254 _rtiNeed.methodNeedsRti(member)) { |
| 255 _rtiNeed.methodNeedsRti(method)) { | |
| 256 worldImpact.addImpact(_registerComputeSignature()); | 255 worldImpact.addImpact(_registerComputeSignature()); |
| 257 } | 256 } |
| 258 } | 257 } |
| 259 | 258 |
| 260 return worldImpact; | 259 return worldImpact; |
| 261 } | 260 } |
| 262 | 261 |
| 263 WorldImpact _processClass(ClassElement cls) { | 262 WorldImpact _processClass(ClassElement cls) { |
| 264 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); | 263 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); |
| 265 if (!cls.typeVariables.isEmpty) { | 264 if (!cls.typeVariables.isEmpty) { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 WorldImpact registerInstantiatedClass(ClassEntity cls) { | 338 WorldImpact registerInstantiatedClass(ClassEntity cls) { |
| 340 return _processClass(cls); | 339 return _processClass(cls); |
| 341 } | 340 } |
| 342 | 341 |
| 343 @override | 342 @override |
| 344 void logSummary(void log(String message)) { | 343 void logSummary(void log(String message)) { |
| 345 _lookupMapAnalysis.logSummary(log); | 344 _lookupMapAnalysis.logSummary(log); |
| 346 _nativeEnqueuer.logSummary(log); | 345 _nativeEnqueuer.logSummary(log); |
| 347 } | 346 } |
| 348 } | 347 } |
| OLD | NEW |