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

Side by Side Diff: pkg/compiler/lib/src/js_backend/resolution_listener.dart

Issue 2894893002: Add ElementCodegenWorldBuilder (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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) 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.resolution_listener; 5 library js_backend.backend.resolution_listener;
6 6
7 import '../common/names.dart' show Identifiers, Uris; 7 import '../common/names.dart' show Identifiers, Uris;
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 '../deferred_load.dart'; 10 import '../deferred_load.dart';
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 _backendUsage.processBackendImpact(_impacts.isolateSupport); 146 _backendUsage.processBackendImpact(_impacts.isolateSupport);
147 _impacts.isolateSupportForResolution 147 _impacts.isolateSupportForResolution
148 .registerImpact(impactBuilder, _elementEnvironment); 148 .registerImpact(impactBuilder, _elementEnvironment);
149 _backendUsage.processBackendImpact(_impacts.isolateSupportForResolution); 149 _backendUsage.processBackendImpact(_impacts.isolateSupportForResolution);
150 return impactBuilder; 150 return impactBuilder;
151 } 151 }
152 152
153 /// Computes the [WorldImpact] of calling [mainMethod] as the entry point. 153 /// Computes the [WorldImpact] of calling [mainMethod] as the entry point.
154 WorldImpact _computeMainImpact(FunctionEntity mainMethod) { 154 WorldImpact _computeMainImpact(FunctionEntity mainMethod) {
155 WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl(); 155 WorldImpactBuilderImpl mainImpact = new WorldImpactBuilderImpl();
156 ParameterStructure parameterStructure = mainMethod.parameterStructure; 156 CallStructure callStructure = mainMethod.parameterStructure.callStructure;
157 CallStructure callStructure = new CallStructure(
158 parameterStructure.positionalParameters +
159 parameterStructure.namedParameters.length,
160 parameterStructure.namedParameters);
161 if (callStructure.argumentCount > 0) { 157 if (callStructure.argumentCount > 0) {
162 _impacts.mainWithArguments 158 _impacts.mainWithArguments
163 .registerImpact(mainImpact, _elementEnvironment); 159 .registerImpact(mainImpact, _elementEnvironment);
164 _backendUsage.processBackendImpact(_impacts.mainWithArguments); 160 _backendUsage.processBackendImpact(_impacts.mainWithArguments);
165 mainImpact.registerStaticUse( 161 mainImpact.registerStaticUse(
166 new StaticUse.staticInvoke(mainMethod, callStructure)); 162 new StaticUse.staticInvoke(mainMethod, callStructure));
167 // If the main method takes arguments, this compilation could be the 163 // If the main method takes arguments, this compilation could be the
168 // target of Isolate.spawnUri. Strictly speaking, that can happen also if 164 // target of Isolate.spawnUri. Strictly speaking, that can happen also if
169 // main takes no arguments, but in this case the spawned isolate can't 165 // main takes no arguments, but in this case the spawned isolate can't
170 // communicate with the spawning isolate. 166 // communicate with the spawning isolate.
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 499 }
504 _registerBackendImpact( 500 _registerBackendImpact(
505 impactBuilder, new BackendImpact(globalUses: staticUses)); 501 impactBuilder, new BackendImpact(globalUses: staticUses));
506 } 502 }
507 503
508 @override 504 @override
509 void logSummary(void log(String message)) { 505 void logSummary(void log(String message)) {
510 _nativeEnqueuer.logSummary(log); 506 _nativeEnqueuer.logSummary(log);
511 } 507 }
512 } 508 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/js_emitter/program_builder/collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698