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

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

Issue 1808133002: Revert "Use JS backend in serialization_analysis_test" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 Registry; 27 Registry;
28 import 'common/resolution.dart' show 28 import 'common/resolution.dart' show
29 Parsing, 29 Parsing,
30 Resolution, 30 Resolution,
31 ResolutionWorkItem, 31 ResolutionWorkItem,
32 ResolutionImpact; 32 ResolutionImpact;
33 import 'common/tasks.dart' show 33 import 'common/tasks.dart' show
34 CompilerTask, 34 CompilerTask,
35 GenericTask; 35 GenericTask;
36 import 'common/work.dart' show 36 import 'common/work.dart' show
37 ItemCompilationContext,
38 WorkItem; 37 WorkItem;
39 import 'compile_time_constants.dart'; 38 import 'compile_time_constants.dart';
40 import 'constants/values.dart'; 39 import 'constants/values.dart';
41 import 'core_types.dart' show 40 import 'core_types.dart' show
42 CoreClasses, 41 CoreClasses,
43 CoreTypes; 42 CoreTypes;
44 import 'dart_backend/dart_backend.dart' as dart_backend; 43 import 'dart_backend/dart_backend.dart' as dart_backend;
45 import 'dart_types.dart' show 44 import 'dart_types.dart' show
46 DartType, 45 DartType,
47 DynamicType, 46 DynamicType,
(...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2134 }
2136 WorldImpact worldImpact = 2135 WorldImpact worldImpact =
2137 compiler.backend.impactTransformer.transformResolutionImpact( 2136 compiler.backend.impactTransformer.transformResolutionImpact(
2138 resolutionImpact); 2137 resolutionImpact);
2139 return worldImpact; 2138 return worldImpact;
2140 }); 2139 });
2141 } 2140 }
2142 2141
2143 @override 2142 @override
2144 void uncacheWorldImpact(Element element) { 2143 void uncacheWorldImpact(Element element) {
2145 if (compiler.serialization.isDeserialized(element)) return;
2146 assert(invariant(element, _worldImpactCache[element] != null, 2144 assert(invariant(element, _worldImpactCache[element] != null,
2147 message: "WorldImpact not computed for $element.")); 2145 message: "WorldImpact not computed for $element."));
2148 _worldImpactCache[element] = const WorldImpact(); 2146 _worldImpactCache[element] = const WorldImpact();
2149 } 2147 }
2150 2148
2151 @override 2149 @override
2152 void emptyCache() { 2150 void emptyCache() {
2153 for (Element element in _worldImpactCache.keys) { 2151 for (Element element in _worldImpactCache.keys) {
2154 _worldImpactCache[element] = const WorldImpact(); 2152 _worldImpactCache[element] = const WorldImpact();
2155 } 2153 }
2156 } 2154 }
2157 2155
2158 @override 2156 @override
2159 bool hasBeenResolved(Element element) { 2157 bool hasBeenResolved(Element element) {
2160 return _worldImpactCache.containsKey(element); 2158 return _worldImpactCache.containsKey(element);
2161 } 2159 }
2162
2163 @override
2164 ResolutionWorkItem createWorkItem(
2165 Element element, ItemCompilationContext compilationContext) {
2166 if (compiler.serialization.isDeserialized(element)) {
2167 return compiler.serialization.createResolutionWorkItem(
2168 element, compilationContext);
2169 } else {
2170 return new ResolutionWorkItem(element, compilationContext);
2171 }
2172 }
2173 } 2160 }
2174 2161
2175 // TODO(johnniwinther): Move [ParserTask], [PatchParserTask], [DietParserTask] 2162 // TODO(johnniwinther): Move [ParserTask], [PatchParserTask], [DietParserTask]
2176 // and [ScannerTask] here. 2163 // and [ScannerTask] here.
2177 class _CompilerParsing implements Parsing { 2164 class _CompilerParsing implements Parsing {
2178 final Compiler compiler; 2165 final Compiler compiler;
2179 2166
2180 _CompilerParsing(this.compiler); 2167 _CompilerParsing(this.compiler);
2181 2168
2182 @override 2169 @override
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 if (_otherDependencies == null) { 2203 if (_otherDependencies == null) {
2217 _otherDependencies = new Setlet<Element>(); 2204 _otherDependencies = new Setlet<Element>();
2218 } 2205 }
2219 _otherDependencies.add(element.implementation); 2206 _otherDependencies.add(element.implementation);
2220 } 2207 }
2221 2208
2222 Iterable<Element> get otherDependencies { 2209 Iterable<Element> get otherDependencies {
2223 return _otherDependencies != null ? _otherDependencies : const <Element>[]; 2210 return _otherDependencies != null ? _otherDependencies : const <Element>[];
2224 } 2211 }
2225 } 2212 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/resolution.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698