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

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

Issue 3009633002: Add tests for list and async marker (Closed)
Patch Set: Created 3 years, 3 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
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 '../elements/entities.dart'; 9 import '../elements/entities.dart';
10 import '../js_backend/backend.dart' show JavaScriptBackend; 10 import '../js_backend/backend.dart' show JavaScriptBackend;
(...skipping 12 matching lines...) Expand all
23 ClosureTracerVisitor(this.tracedElements, ApplyableTypeInformation tracedType, 23 ClosureTracerVisitor(this.tracedElements, ApplyableTypeInformation tracedType,
24 InferrerEngine inferrer) 24 InferrerEngine inferrer)
25 : super(tracedType, inferrer); 25 : super(tracedType, inferrer);
26 26
27 ApplyableTypeInformation get tracedType => super.tracedType; 27 ApplyableTypeInformation get tracedType => super.tracedType;
28 28
29 void run() { 29 void run() {
30 analyze(); 30 analyze();
31 if (!continueAnalyzing) return; 31 if (!continueAnalyzing) return;
32 _callsToAnalyze.forEach(_analyzeCall); 32 _callsToAnalyze.forEach(_analyzeCall);
33 for (MethodElement element in tracedElements) { 33 for (FunctionEntity element in tracedElements) {
34 MethodElement implementation = element.implementation; 34 inferrer.types.strategy.forEachParameter(element, (Local parameter) {
35 implementation.functionSignature
36 .forEachParameter((FormalElement _parameter) {
37 ParameterElement parameter = _parameter;
38 ElementTypeInformation info = 35 ElementTypeInformation info =
39 inferrer.types.getInferredTypeOfParameter(parameter); 36 inferrer.types.getInferredTypeOfParameter(parameter);
40 info.disableInferenceForClosures = false; 37 info.disableInferenceForClosures = false;
41 }); 38 });
42 } 39 }
43 } 40 }
44 41
45 void _tagAsFunctionApplyTarget([String reason]) { 42 void _tagAsFunctionApplyTarget([String reason]) {
46 tracedType.mightBePassedToFunctionApply = true; 43 tracedType.mightBePassedToFunctionApply = true;
47 if (debug.VERBOSE) { 44 if (debug.VERBOSE) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 @override 136 @override
140 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { 137 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
141 super.visitStaticCallSiteTypeInformation(info); 138 super.visitStaticCallSiteTypeInformation(info);
142 if (info.calledElement == tracedElements.first && 139 if (info.calledElement == tracedElements.first &&
143 info.selector != null && 140 info.selector != null &&
144 info.selector.isGetter) { 141 info.selector.isGetter) {
145 addNewEscapeInformation(info); 142 addNewEscapeInformation(info);
146 } 143 }
147 } 144 }
148 } 145 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/inferrer/inferrer_engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698