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 2979813002: Use entities in the TypeSystem interface. (Closed)
Patch Set: Created 3 years, 5 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 14 matching lines...) Expand all
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 (MethodElement element in tracedElements) {
34 MethodElement implementation = element.implementation; 34 MethodElement implementation = element.implementation;
35 implementation.functionSignature.forEachParameter((Element parameter) { 35 implementation.functionSignature
36 .forEachParameter((FormalElement _parameter) {
37 ParameterElement parameter = _parameter;
36 ElementTypeInformation info = 38 ElementTypeInformation info =
37 inferrer.types.getInferredTypeOfParameter(parameter); 39 inferrer.types.getInferredTypeOfParameter(parameter);
38 info.disableInferenceForClosures = false; 40 info.disableInferenceForClosures = false;
39 }); 41 });
40 } 42 }
41 } 43 }
42 44
43 void _tagAsFunctionApplyTarget([String reason]) { 45 void _tagAsFunctionApplyTarget([String reason]) {
44 tracedType.mightBePassedToFunctionApply = true; 46 tracedType.mightBePassedToFunctionApply = true;
45 if (debug.VERBOSE) { 47 if (debug.VERBOSE) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 @override 139 @override
138 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) { 140 visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
139 super.visitStaticCallSiteTypeInformation(info); 141 super.visitStaticCallSiteTypeInformation(info);
140 if (info.calledElement == tracedElements.first && 142 if (info.calledElement == tracedElements.first &&
141 info.selector != null && 143 info.selector != null &&
142 info.selector.isGetter) { 144 info.selector.isGetter) {
143 addNewEscapeInformation(info); 145 addNewEscapeInformation(info);
144 } 146 }
145 } 147 }
146 } 148 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.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