Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: pkg/compiler/lib/src/inferrer/closure_tracer.dart

Issue 2809603002: Introduce ParameterStructure (Closed)
Patch Set: Fix. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.dart ('k') | pkg/compiler/lib/src/kernel/elements.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.dart ('k') | pkg/compiler/lib/src/kernel/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698