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

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

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 EventSink, 8 EventSink,
9 Future; 9 Future;
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 LibraryLoader, 79 LibraryLoader,
80 LibraryLoaderTask, 80 LibraryLoaderTask,
81 LoadedLibraries; 81 LoadedLibraries;
82 import 'mirrors_used.dart' show 82 import 'mirrors_used.dart' show
83 MirrorUsageAnalyzerTask; 83 MirrorUsageAnalyzerTask;
84 import 'null_compiler_output.dart' show 84 import 'null_compiler_output.dart' show
85 NullCompilerOutput, 85 NullCompilerOutput,
86 NullSink; 86 NullSink;
87 import 'parser/diet_parser_task.dart' show 87 import 'parser/diet_parser_task.dart' show
88 DietParserTask; 88 DietParserTask;
89 import 'parser/element_listener.dart' show
90 ScannerOptions;
89 import 'parser/parser_task.dart' show 91 import 'parser/parser_task.dart' show
90 ParserTask; 92 ParserTask;
91 import 'patch_parser.dart' show 93 import 'patch_parser.dart' show
92 PatchParserTask; 94 PatchParserTask;
93 import 'resolution/registry.dart' show 95 import 'resolution/registry.dart' show
94 ResolutionRegistry; 96 ResolutionRegistry;
95 import 'resolution/resolution.dart' show 97 import 'resolution/resolution.dart' show
96 ResolverTask; 98 ResolverTask;
97 import 'resolution/tree_elements.dart' show 99 import 'resolution/tree_elements.dart' show
98 TreeElementMapping; 100 TreeElementMapping;
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 measure(f()) => compiler.parser.measure(f); 2023 measure(f()) => compiler.parser.measure(f);
2022 2024
2023 @override 2025 @override
2024 void parsePatchClass(ClassElement cls) { 2026 void parsePatchClass(ClassElement cls) {
2025 compiler.patchParser.measure(() { 2027 compiler.patchParser.measure(() {
2026 if (cls.isPatch) { 2028 if (cls.isPatch) {
2027 compiler.patchParser.parsePatchClassNode(cls); 2029 compiler.patchParser.parsePatchClassNode(cls);
2028 } 2030 }
2029 }); 2031 });
2030 } 2032 }
2033
2034 ScannerOptions getScannerOptionsFor(Element element) {
2035 return new ScannerOptions(
2036 canUseNative: compiler.backend.canLibraryUseNative(element.library));
2037 }
2031 } 2038 }
2032 2039
2033 class GlobalDependencyRegistry extends CodegenRegistry { 2040 class GlobalDependencyRegistry extends CodegenRegistry {
2034 Setlet<Element> _otherDependencies; 2041 Setlet<Element> _otherDependencies;
2035 2042
2036 GlobalDependencyRegistry(Compiler compiler) 2043 GlobalDependencyRegistry(Compiler compiler)
2037 : super(compiler, new TreeElementMapping(null)); 2044 : super(compiler, new TreeElementMapping(null));
2038 2045
2039 void registerDependency(Element element) { 2046 void registerDependency(Element element) {
2040 if (element == null) return; 2047 if (element == null) return;
2041 if (_otherDependencies == null) { 2048 if (_otherDependencies == null) {
2042 _otherDependencies = new Setlet<Element>(); 2049 _otherDependencies = new Setlet<Element>();
2043 } 2050 }
2044 _otherDependencies.add(element.implementation); 2051 _otherDependencies.add(element.implementation);
2045 } 2052 }
2046 2053
2047 Iterable<Element> get otherDependencies { 2054 Iterable<Element> get otherDependencies {
2048 return _otherDependencies != null ? _otherDependencies : const <Element>[]; 2055 return _otherDependencies != null ? _otherDependencies : const <Element>[];
2049 } 2056 }
2050 } 2057 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698