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

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

Issue 2810633003: Add kernel/closed_world2_test (Closed)
Patch Set: Add TODOs. Created 3 years, 8 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 ResolutionImpact; 11 import '../common/resolution.dart' show ResolutionImpact;
12 import '../constants/expressions.dart'; 12 import '../constants/expressions.dart';
13 import '../common_elements.dart' show ElementEnvironment; 13 import '../common_elements.dart' show ElementEnvironment;
14 import '../elements/elements.dart' show AsyncMarker; 14 import '../elements/elements.dart' show AsyncMarker;
15 import '../elements/entities.dart'; 15 import '../elements/entities.dart';
16 import '../elements/resolution_types.dart' show Types; 16 import '../elements/resolution_types.dart' show Types;
17 import '../elements/types.dart'; 17 import '../elements/types.dart';
18 import '../enqueue.dart' show ResolutionEnqueuer;
19 import '../native/enqueue.dart'; 18 import '../native/enqueue.dart';
20 import '../native/native.dart' as native; 19 import '../native/native.dart' as native;
21 import '../options.dart'; 20 import '../options.dart';
22 import '../universe/feature.dart'; 21 import '../universe/feature.dart';
23 import '../universe/use.dart' 22 import '../universe/use.dart'
24 show StaticUse, StaticUseKind, TypeUse, TypeUseKind; 23 show StaticUse, StaticUseKind, TypeUse, TypeUseKind;
25 import '../universe/world_impact.dart' show TransformedWorldImpact, WorldImpact; 24 import '../universe/world_impact.dart' show TransformedWorldImpact, WorldImpact;
26 import '../util/util.dart'; 25 import '../util/util.dart';
27 import 'backend.dart'; 26 import 'backend.dart';
28 import 'backend_helpers.dart'; 27 import 'backend_helpers.dart';
(...skipping 25 matching lines...) Expand all
54 this._commonElements, 53 this._commonElements,
55 this._impacts, 54 this._impacts,
56 this._nativeBasicData, 55 this._nativeBasicData,
57 this._nativeResolutionEnqueuer, 56 this._nativeResolutionEnqueuer,
58 this._backendUsageBuider, 57 this._backendUsageBuider,
59 this._mirrorsDataBuilder, 58 this._mirrorsDataBuilder,
60 this._customElementsResolutionAnalysis, 59 this._customElementsResolutionAnalysis,
61 this._rtiNeedBuilder); 60 this._rtiNeedBuilder);
62 61
63 @override 62 @override
64 WorldImpact transformResolutionImpact( 63 WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) {
65 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) {
66 TransformedWorldImpact transformed = 64 TransformedWorldImpact transformed =
67 new TransformedWorldImpact(worldImpact); 65 new TransformedWorldImpact(worldImpact);
68 66
69 void registerImpact(BackendImpact impact) { 67 void registerImpact(BackendImpact impact) {
70 impact.registerImpact(transformed, _elementEnvironment); 68 impact.registerImpact(transformed, _elementEnvironment);
71 _backendUsageBuider.processBackendImpact(impact); 69 _backendUsageBuider.processBackendImpact(impact);
72 } 70 }
73 71
74 for (Feature feature in worldImpact.features) { 72 for (Feature feature in worldImpact.features) {
75 switch (feature) { 73 switch (feature) {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 _impacts.asyncStarBody 467 _impacts.asyncStarBody
470 .registerImpact(transformed, _elementEnvironment); 468 .registerImpact(transformed, _elementEnvironment);
471 break; 469 break;
472 } 470 }
473 } 471 }
474 472
475 // TODO(johnniwinther): Remove eager registration. 473 // TODO(johnniwinther): Remove eager registration.
476 return transformed; 474 return transformed;
477 } 475 }
478 } 476 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698