OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 package com.google.dart.compiler; | 5 package com.google.dart.compiler; |
6 | 6 |
7 import com.google.dart.compiler.CommandLineOptions.CompilerOptions; | 7 import com.google.dart.compiler.CommandLineOptions.CompilerOptions; |
8 import com.google.dart.compiler.backend.doc.DartDocumentationGenerator; | 8 import com.google.dart.compiler.backend.doc.DartDocumentationGenerator; |
9 import com.google.dart.compiler.backend.isolate.DartIsolateStubGenerator; | 9 import com.google.dart.compiler.backend.isolate.DartIsolateStubGenerator; |
10 import com.google.dart.compiler.backend.js.ClosureJsBackend; | 10 import com.google.dart.compiler.backend.js.ClosureJsBackend; |
11 import com.google.dart.compiler.backend.js.JavascriptBackend; | 11 import com.google.dart.compiler.backend.js.JavascriptBackend; |
12 import com.google.dart.compiler.metrics.CompilerMetrics; | 12 import com.google.dart.compiler.metrics.CompilerMetrics; |
| 13 import com.google.dart.compiler.resolver.CompileTimeConstantAnalyzer; |
13 import com.google.dart.compiler.resolver.Resolver; | 14 import com.google.dart.compiler.resolver.Resolver; |
14 import com.google.dart.compiler.type.TypeAnalyzer; | 15 import com.google.dart.compiler.type.TypeAnalyzer; |
15 | 16 |
16 import java.io.File; | 17 import java.io.File; |
17 import java.io.FileNotFoundException; | 18 import java.io.FileNotFoundException; |
18 import java.net.URI; | 19 import java.net.URI; |
19 import java.net.URISyntaxException; | 20 import java.net.URISyntaxException; |
20 import java.util.ArrayList; | 21 import java.util.ArrayList; |
21 import java.util.Arrays; | 22 import java.util.Arrays; |
22 import java.util.List; | 23 import java.util.List; |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 this.backends = Arrays.asList(backends); | 114 this.backends = Arrays.asList(backends); |
114 this.compilerOptions = compilerOptions; | 115 this.compilerOptions = compilerOptions; |
115 this.compilerMetrics = compilerOptions.showMetrics() ? | 116 this.compilerMetrics = compilerOptions.showMetrics() ? |
116 new CompilerMetrics() : null; | 117 new CompilerMetrics() : null; |
117 this.systemLibraryManager = libraryManager; | 118 this.systemLibraryManager = libraryManager; |
118 } | 119 } |
119 | 120 |
120 @Override | 121 @Override |
121 public List<DartCompilationPhase> getPhases() { | 122 public List<DartCompilationPhase> getPhases() { |
122 List<DartCompilationPhase> phases = new ArrayList<DartCompilationPhase>(); | 123 List<DartCompilationPhase> phases = new ArrayList<DartCompilationPhase>(); |
| 124 phases.add(new CompileTimeConstantAnalyzer.Phase()); |
123 phases.add(new Resolver.Phase()); | 125 phases.add(new Resolver.Phase()); |
124 phases.add(new TypeAnalyzer()); | 126 phases.add(new TypeAnalyzer()); |
125 return phases; | 127 return phases; |
126 } | 128 } |
127 | 129 |
128 @Override | 130 @Override |
129 public List<Backend> getBackends() { | 131 public List<Backend> getBackends() { |
130 return backends; | 132 return backends; |
131 } | 133 } |
132 | 134 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 return null; | 221 return null; |
220 } | 222 } |
221 return new UrlLibrarySource(systemUri, this.systemLibraryManager); | 223 return new UrlLibrarySource(systemUri, this.systemLibraryManager); |
222 } | 224 } |
223 | 225 |
224 @Override | 226 @Override |
225 public CompilerOptions getCompilerOptions() { | 227 public CompilerOptions getCompilerOptions() { |
226 return compilerOptions; | 228 return compilerOptions; |
227 } | 229 } |
228 } | 230 } |
OLD | NEW |