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

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

Issue 2781483002: Mostly use Entity in InterceptorData (Closed)
Patch Set: Created 3 years, 9 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.impact_transformer; 5 library js_backend.backend.impact_transformer;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common_elements.dart'; 8 import '../common_elements.dart';
9 import '../common/backend_api.dart' show ImpactTransformer; 9 import '../common/backend_api.dart' show ImpactTransformer;
10 import '../common/codegen.dart' show CodegenImpact; 10 import '../common/codegen.dart' show CodegenImpact;
11 import '../common/resolution.dart' show Resolution, ResolutionImpact; 11 import '../common/resolution.dart' show Resolution, ResolutionImpact;
12 import '../constants/expressions.dart'; 12 import '../constants/expressions.dart';
13 import '../constants/values.dart';
14 import '../common_elements.dart' show ElementEnvironment; 13 import '../common_elements.dart' show ElementEnvironment;
15 import '../elements/elements.dart'; 14 import '../elements/elements.dart';
15 import '../elements/entities.dart';
16 import '../elements/resolution_types.dart'; 16 import '../elements/resolution_types.dart';
17 import '../enqueue.dart' show ResolutionEnqueuer; 17 import '../enqueue.dart' show ResolutionEnqueuer;
18 import '../native/enqueue.dart'; 18 import '../native/enqueue.dart';
19 import '../native/native.dart' as native; 19 import '../native/native.dart' as native;
20 import '../options.dart'; 20 import '../options.dart';
21 import '../universe/feature.dart'; 21 import '../universe/feature.dart';
22 import '../universe/use.dart' 22 import '../universe/use.dart'
23 show ConstantUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind; 23 show StaticUse, StaticUseKind, TypeUse, TypeUseKind;
24 import '../universe/world_impact.dart' show TransformedWorldImpact, WorldImpact; 24 import '../universe/world_impact.dart' show TransformedWorldImpact, WorldImpact;
25 import '../util/util.dart'; 25 import '../util/util.dart';
26 import 'backend.dart'; 26 import 'backend.dart';
27 import 'backend_helpers.dart'; 27 import 'backend_helpers.dart';
28 import 'backend_impact.dart'; 28 import 'backend_impact.dart';
29 import 'backend_usage.dart'; 29 import 'backend_usage.dart';
30 import 'checked_mode_helpers.dart'; 30 import 'checked_mode_helpers.dart';
31 import 'custom_elements_analysis.dart'; 31 import 'custom_elements_analysis.dart';
32 import 'interceptor_data.dart'; 32 import 'interceptor_data.dart';
33 import 'lookup_map_analysis.dart'; 33 import 'lookup_map_analysis.dart';
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 } 435 }
436 break; 436 break;
437 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: 437 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
438 case StaticUseKind.CONSTRUCTOR_INVOKE: 438 case StaticUseKind.CONSTRUCTOR_INVOKE:
439 _lookupMapAnalysis.registerInstantiatedType(staticUse.type); 439 _lookupMapAnalysis.registerInstantiatedType(staticUse.type);
440 break; 440 break;
441 default: 441 default:
442 } 442 }
443 } 443 }
444 444
445 for (Set<ClassElement> classes in impact.specializedGetInterceptors) { 445 for (Set<ClassEntity> classes in impact.specializedGetInterceptors) {
446 _oneShotInterceptorData.registerSpecializedGetInterceptor( 446 _oneShotInterceptorData.registerSpecializedGetInterceptor(
447 classes, _namer); 447 classes, _namer);
448 } 448 }
449 449
450 if (impact.usesInterceptor) { 450 if (impact.usesInterceptor) {
451 if (_nativeCodegenEnqueuer.hasInstantiatedNativeClasses) { 451 if (_nativeCodegenEnqueuer.hasInstantiatedNativeClasses) {
452 _impacts.interceptorUse 452 _impacts.interceptorUse
453 .registerImpact(transformed, _elementEnvironment); 453 .registerImpact(transformed, _elementEnvironment);
454 // TODO(johnniwinther): Avoid these workarounds. 454 // TODO(johnniwinther): Avoid these workarounds.
455 _backendUsage.needToInitializeIsolateAffinityTag = true; 455 _backendUsage.needToInitializeIsolateAffinityTag = true;
(...skipping 14 matching lines...) Expand all
470 _impacts.asyncStarBody 470 _impacts.asyncStarBody
471 .registerImpact(transformed, _elementEnvironment); 471 .registerImpact(transformed, _elementEnvironment);
472 break; 472 break;
473 } 473 }
474 } 474 }
475 475
476 // TODO(johnniwinther): Remove eager registration. 476 // TODO(johnniwinther): Remove eager registration.
477 return transformed; 477 return transformed;
478 } 478 }
479 } 479 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/interceptor_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698