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

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

Issue 2857373002: Handle more constants in Constantifier (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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 Future; 7 import 'dart:async' show Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'backend_strategy.dart'; 10 import 'backend_strategy.dart';
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 : this.options = options, 186 : this.options = options,
187 this.userOutputProvider = outputProvider == null 187 this.userOutputProvider = outputProvider == null
188 ? const NullCompilerOutput() 188 ? const NullCompilerOutput()
189 : outputProvider { 189 : outputProvider {
190 if (makeReporter != null) { 190 if (makeReporter != null) {
191 _reporter = makeReporter(this, options); 191 _reporter = makeReporter(this, options);
192 } else { 192 } else {
193 _reporter = new CompilerDiagnosticReporter(this, options); 193 _reporter = new CompilerDiagnosticReporter(this, options);
194 } 194 }
195 frontEndStrategy = options.loadFromDill 195 frontEndStrategy = options.loadFromDill
196 ? new KernelFrontEndStrategy(reporter) 196 ? new KernelFrontEndStrategy(reporter, environment)
197 : new ResolutionFrontEndStrategy(this); 197 : new ResolutionFrontEndStrategy(this);
198 backendStrategy = options.loadFromDill 198 backendStrategy = options.loadFromDill
199 ? new KernelBackendStrategy() 199 ? new KernelBackendStrategy()
200 : new ElementBackendStrategy(this); 200 : new ElementBackendStrategy(this);
201 _resolution = createResolution(); 201 _resolution = createResolution();
202 _elementEnvironment = frontEndStrategy.elementEnvironment; 202 _elementEnvironment = frontEndStrategy.elementEnvironment;
203 _commonElements = new CommonElements(_elementEnvironment); 203 _commonElements = new CommonElements(_elementEnvironment);
204 types = new Types(_resolution); 204 types = new Types(_resolution);
205 205
206 if (options.verbose) { 206 if (options.verbose) {
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 _ElementScanner(this.scanner); 1685 _ElementScanner(this.scanner);
1686 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 1686 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
1687 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 1687 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
1688 } 1688 }
1689 1689
1690 class _EmptyEnvironment implements Environment { 1690 class _EmptyEnvironment implements Environment {
1691 const _EmptyEnvironment(); 1691 const _EmptyEnvironment();
1692 1692
1693 String valueOf(String key) => null; 1693 String valueOf(String key) => null;
1694 } 1694 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/constants/constructors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698