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

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

Issue 2558763003: Move hasRuntimeTypeSupport, hasIsolateSupport, and hasFunctionApplySupport to JavaScriptBackend. (Closed)
Patch Set: Updated cf. comment Created 4 years 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/names.dart ('k') | pkg/compiler/lib/src/enqueue.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 EventSink, Future; 7 import 'dart:async' show EventSink, Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'cache_strategy.dart' show CacheStrategy; 10 import 'cache_strategy.dart' show CacheStrategy;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 /// The constant environment for the frontend interpretation of compile-time 174 /// The constant environment for the frontend interpretation of compile-time
175 /// constants. 175 /// constants.
176 ConstantEnvironment constants; 176 ConstantEnvironment constants;
177 177
178 EnqueueTask enqueuer; 178 EnqueueTask enqueuer;
179 DeferredLoadTask deferredLoadTask; 179 DeferredLoadTask deferredLoadTask;
180 MirrorUsageAnalyzerTask mirrorUsageAnalyzerTask; 180 MirrorUsageAnalyzerTask mirrorUsageAnalyzerTask;
181 DumpInfoTask dumpInfoTask; 181 DumpInfoTask dumpInfoTask;
182 182
183 bool get hasFunctionApplySupport => resolverWorld.hasFunctionApplySupport;
184 bool get hasIsolateSupport => resolverWorld.hasIsolateSupport;
185
186 bool get hasCrashed => _reporter.hasCrashed; 183 bool get hasCrashed => _reporter.hasCrashed;
187 184
188 Stopwatch progress; 185 Stopwatch progress;
189 186
190 bool get shouldPrintProgress { 187 bool get shouldPrintProgress {
191 return options.verbose && progress.elapsedMilliseconds > 500; 188 return options.verbose && progress.elapsedMilliseconds > 500;
192 } 189 }
193 190
194 static const int PHASE_SCANNING = 0; 191 static const int PHASE_SCANNING = 0;
195 static const int PHASE_RESOLVING = 1; 192 static const int PHASE_RESOLVING = 1;
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 reporter.log('Inferring types...'); 734 reporter.log('Inferring types...');
738 globalInference.runGlobalTypeInference(mainFunction); 735 globalInference.runGlobalTypeInference(mainFunction);
739 736
740 if (stopAfterTypeInference) return; 737 if (stopAfterTypeInference) return;
741 738
742 backend.onTypeInferenceComplete(); 739 backend.onTypeInferenceComplete();
743 740
744 reporter.log('Compiling...'); 741 reporter.log('Compiling...');
745 phase = PHASE_COMPILING; 742 phase = PHASE_COMPILING;
746 743
747 backend.onCodegenStart(); 744 enqueuer.codegen.applyImpact(backend.onCodegenStart());
748 if (hasIsolateSupport) {
749 enqueuer.codegen
750 .applyImpact(backend.enableIsolateSupport(forResolution: false));
751 }
752 if (compileAll) { 745 if (compileAll) {
753 libraryLoader.libraries.forEach((LibraryElement library) { 746 libraryLoader.libraries.forEach((LibraryElement library) {
754 enqueuer.codegen.applyImpact(computeImpactForLibrary(library)); 747 enqueuer.codegen.applyImpact(computeImpactForLibrary(library));
755 }); 748 });
756 } 749 }
757 processQueue(enqueuer.codegen, mainFunction, 750 processQueue(enqueuer.codegen, mainFunction,
758 onProgress: showCodegenProgress); 751 onProgress: showCodegenProgress);
759 enqueuer.codegen.logSummary(reporter.log); 752 enqueuer.codegen.logSummary(reporter.log);
760 753
761 int programSize = backend.assembleProgram(); 754 int programSize = backend.assembleProgram();
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 _ElementScanner(this.scanner); 2241 _ElementScanner(this.scanner);
2249 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2242 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2250 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2243 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2251 } 2244 }
2252 2245
2253 class _EmptyEnvironment implements Environment { 2246 class _EmptyEnvironment implements Environment {
2254 const _EmptyEnvironment(); 2247 const _EmptyEnvironment();
2255 2248
2256 String valueOf(String key) => null; 2249 String valueOf(String key) => null;
2257 } 2250 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/names.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698