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

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

Issue 2888413004: Add KernelCodegenWorkItem stub (Closed)
Patch Set: Add comment 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.codegen_listener; 5 library js_backend.backend.codegen_listener;
6 6
7 import '../common/names.dart' show Identifiers; 7 import '../common/names.dart' show Identifiers;
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 '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 @override 238 @override
239 WorldImpact registerUsedConstant(ConstantValue constant) { 239 WorldImpact registerUsedConstant(ConstantValue constant) {
240 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); 240 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
241 _computeImpactForCompileTimeConstant(constant, impactBuilder); 241 _computeImpactForCompileTimeConstant(constant, impactBuilder);
242 return impactBuilder; 242 return impactBuilder;
243 } 243 }
244 244
245 @override 245 @override
246 WorldImpact registerUsedElement(MemberElement member) { 246 WorldImpact registerUsedElement(MemberEntity member) {
247 WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl(); 247 WorldImpactBuilderImpl worldImpact = new WorldImpactBuilderImpl();
248 _customElementsAnalysis.registerStaticUse(member); 248 _customElementsAnalysis.registerStaticUse(member);
249 249
250 if (member.isFunction && member.isInstanceMember) { 250 if (member.isFunction && member.isInstanceMember) {
251 MethodElement method = member; 251 ClassEntity cls = member.enclosingClass;
252 ClassElement cls = method.enclosingClass; 252 if (member.name == Identifiers.call &&
253 if (method.name == Identifiers.call && 253 _elementEnvironment.isGenericClass(cls) &&
254 !cls.typeVariables.isEmpty && 254 _rtiNeed.methodNeedsRti(member)) {
255 _rtiNeed.methodNeedsRti(method)) {
256 worldImpact.addImpact(_registerComputeSignature()); 255 worldImpact.addImpact(_registerComputeSignature());
257 } 256 }
258 } 257 }
259 258
260 return worldImpact; 259 return worldImpact;
261 } 260 }
262 261
263 WorldImpact _processClass(ClassElement cls) { 262 WorldImpact _processClass(ClassElement cls) {
264 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl(); 263 WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
265 if (!cls.typeVariables.isEmpty) { 264 if (!cls.typeVariables.isEmpty) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 WorldImpact registerInstantiatedClass(ClassEntity cls) { 338 WorldImpact registerInstantiatedClass(ClassEntity cls) {
340 return _processClass(cls); 339 return _processClass(cls);
341 } 340 }
342 341
343 @override 342 @override
344 void logSummary(void log(String message)) { 343 void logSummary(void log(String message)) {
345 _lookupMapAnalysis.logSummary(log); 344 _lookupMapAnalysis.logSummary(log);
346 _nativeEnqueuer.logSummary(log); 345 _nativeEnqueuer.logSummary(log);
347 } 346 }
348 } 347 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698