| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 compiler.src.inferrer.closure_tracer; | 5 library compiler.src.inferrer.closure_tracer; |
| 6 | 6 |
| 7 import '../common/names.dart' show Names; | 7 import '../common/names.dart' show Names; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../js_backend/backend_helpers.dart'; | 9 import '../js_backend/backend_helpers.dart'; |
| 10 import '../types/types.dart' show TypeMask; | 10 import '../types/types.dart' show TypeMask; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 void _registerCallForLaterAnalysis(CallSiteTypeInformation info) { | 48 void _registerCallForLaterAnalysis(CallSiteTypeInformation info) { |
| 49 _callsToAnalyze.add(info); | 49 _callsToAnalyze.add(info); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void _analyzeCall(CallSiteTypeInformation info) { | 52 void _analyzeCall(CallSiteTypeInformation info) { |
| 53 Selector selector = info.selector; | 53 Selector selector = info.selector; |
| 54 TypeMask mask = info.mask; | 54 TypeMask mask = info.mask; |
| 55 tracedElements.forEach((FunctionElement functionElement) { | 55 tracedElements.forEach((FunctionElement functionElement) { |
| 56 if (!selector.callStructure.signatureApplies(functionElement.type)) { | 56 if (!selector.callStructure |
| 57 .signatureApplies(functionElement.parameterStructure)) { |
| 57 return; | 58 return; |
| 58 } | 59 } |
| 59 inferrer.updateParameterAssignments( | 60 inferrer.updateParameterAssignments( |
| 60 info, functionElement, info.arguments, selector, mask, | 61 info, functionElement, info.arguments, selector, mask, |
| 61 remove: false, addToQueue: false); | 62 remove: false, addToQueue: false); |
| 62 }); | 63 }); |
| 63 } | 64 } |
| 64 | 65 |
| 65 @override | 66 @override |
| 66 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { | 67 visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 @override | 135 @override |
| 135 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { | 136 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { |
| 136 super.visitStaticCallSiteTypeInformation(info); | 137 super.visitStaticCallSiteTypeInformation(info); |
| 137 if (info.calledElement == tracedElements.first && | 138 if (info.calledElement == tracedElements.first && |
| 138 info.selector != null && | 139 info.selector != null && |
| 139 info.selector.isGetter) { | 140 info.selector.isGetter) { |
| 140 addNewEscapeInformation(info); | 141 addNewEscapeInformation(info); |
| 141 } | 142 } |
| 142 } | 143 } |
| 143 } | 144 } |
| OLD | NEW |