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

Side by Side Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 2045223002: Compute and cache element NativeBehavior during resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Temporarily skip compilation subtest Created 4 years, 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart2js.resolution.registry; 5 library dart2js.resolution.registry;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' show Backend, ForeignResolver; 8 import '../common/backend_api.dart'
9 show Backend, ForeignResolver, NativeRegistry;
9 import '../common/resolution.dart' 10 import '../common/resolution.dart'
10 show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact; 11 show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact;
11 import '../common/registry.dart' show Registry; 12 import '../common/registry.dart' show Registry;
12 import '../compiler.dart' show Compiler; 13 import '../compiler.dart' show Compiler;
13 import '../constants/expressions.dart'; 14 import '../constants/expressions.dart';
14 import '../dart_types.dart'; 15 import '../dart_types.dart';
15 import '../diagnostics/source_span.dart'; 16 import '../diagnostics/source_span.dart';
16 import '../enqueue.dart' show ResolutionEnqueuer; 17 import '../enqueue.dart' show ResolutionEnqueuer;
17 import '../elements/elements.dart'; 18 import '../elements/elements.dart';
18 import '../tree/tree.dart'; 19 import '../tree/tree.dart';
19 import '../util/util.dart' show Setlet; 20 import '../util/util.dart' show Setlet;
20 import '../universe/call_structure.dart' show CallStructure; 21 import '../universe/call_structure.dart' show CallStructure;
21 import '../universe/selector.dart' show Selector; 22 import '../universe/selector.dart' show Selector;
22 import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse; 23 import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
23 import '../universe/world_impact.dart' show WorldImpact, WorldImpactBuilder; 24 import '../universe/world_impact.dart' show WorldImpact, WorldImpactBuilder;
24 import '../util/enumset.dart' show EnumSet; 25 import '../util/enumset.dart' show EnumSet;
25 26
26 import 'send_structure.dart'; 27 import 'send_structure.dart';
27 28
28 import 'members.dart' show ResolverVisitor; 29 import 'members.dart' show ResolverVisitor;
29 import 'tree_elements.dart' show TreeElementMapping; 30 import 'tree_elements.dart' show TreeElementMapping;
30 31
31 class _ResolutionWorldImpact extends ResolutionImpact with WorldImpactBuilder { 32 class _ResolutionWorldImpact extends ResolutionImpact
33 with WorldImpactBuilder
34 implements NativeRegistry {
32 final String name; 35 final String name;
33 EnumSet<Feature> _features; 36 EnumSet<Feature> _features;
34 Setlet<MapLiteralUse> _mapLiterals; 37 Setlet<MapLiteralUse> _mapLiterals;
35 Setlet<ListLiteralUse> _listLiterals; 38 Setlet<ListLiteralUse> _listLiterals;
36 Setlet<String> _constSymbolNames; 39 Setlet<String> _constSymbolNames;
37 Setlet<ConstantExpression> _constantLiterals; 40 Setlet<ConstantExpression> _constantLiterals;
38 Setlet<dynamic> _nativeData; 41 Setlet<dynamic> _nativeData;
39 42
40 _ResolutionWorldImpact(this.name); 43 _ResolutionWorldImpact(this.name);
41 44
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 @override 434 @override
432 void registerInstantiatedType(InterfaceType type) { 435 void registerInstantiatedType(InterfaceType type) {
433 registry.registerInstantiation(type); 436 registry.registerInstantiation(type);
434 } 437 }
435 438
436 @override 439 @override
437 DartType resolveTypeFromString(Node node, String typeName) { 440 DartType resolveTypeFromString(Node node, String typeName) {
438 return visitor.resolveTypeFromString(node, typeName); 441 return visitor.resolveTypeFromString(node, typeName);
439 } 442 }
440 } 443 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698