OLD | NEW |
1 // Copyright (c) 2011, 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 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.metrics.CompilerMetrics; | 8 import com.google.dart.compiler.metrics.CompilerMetrics; |
9 | 9 |
10 import java.io.File; | 10 import java.io.File; |
11 import java.util.List; | 11 import java.util.List; |
12 | 12 |
13 /** | 13 /** |
14 * A configuration for the Dart compiler specifying which phases | 14 * A configuration for the Dart compiler specifying which phases will be execute
d. |
15 * and backends will be executed. | |
16 */ | 15 */ |
17 public interface CompilerConfiguration { | 16 public interface CompilerConfiguration { |
18 | 17 |
19 enum ErrorFormat { | 18 enum ErrorFormat { |
20 NORMAL, // Library/File, line, message | 19 NORMAL, // Library/File, line, message |
21 MACHINE, // All information including severity, subsystem, etc | 20 MACHINE, // All information including severity, subsystem, etc |
22 } | 21 } |
23 | 22 |
24 List<DartCompilationPhase> getPhases(); | 23 List<DartCompilationPhase> getPhases(); |
25 | 24 |
26 List<Backend> getBackends(); | |
27 | |
28 /** | |
29 * Indicates whether developer-mode runtime checks are needed. | |
30 * @return true if developer-mode checks should be inserted, false if not | |
31 */ | |
32 boolean developerModeChecks(); | |
33 | |
34 /** | 25 /** |
35 * Returns the {@link CompilerMetrics} instance or <code>null</code> if metric
s should not be | 26 * Returns the {@link CompilerMetrics} instance or <code>null</code> if metric
s should not be |
36 * recorded. | 27 * recorded. |
37 * | 28 * |
38 * @return the metrics instance, <code>null</code> if metrics should not be re
corded | 29 * @return the metrics instance, <code>null</code> if metrics should not be re
corded |
39 */ | 30 */ |
40 CompilerMetrics getCompilerMetrics(); | 31 CompilerMetrics getCompilerMetrics(); |
41 | 32 |
42 /** | 33 /** |
43 * Returns a comma-separated string list of options for displaying jvm metrics
. | 34 * Returns a comma-separated string list of options for displaying jvm metrics
. |
(...skipping 11 matching lines...) Expand all Loading... |
55 */ | 46 */ |
56 boolean resolveDespiteParseErrors(); | 47 boolean resolveDespiteParseErrors(); |
57 | 48 |
58 /** | 49 /** |
59 * Temporary flag to turn on incremental compilation. This will be removed onc
e we're certain | 50 * Temporary flag to turn on incremental compilation. This will be removed onc
e we're certain |
60 * incremental compilation is correct. | 51 * incremental compilation is correct. |
61 */ | 52 */ |
62 boolean incremental(); | 53 boolean incremental(); |
63 | 54 |
64 /** | 55 /** |
65 * The first backend that runs outputs to this filename if set. | |
66 */ | |
67 File getOutputFilename(); | |
68 | |
69 /** | |
70 * The work directory where incremental build output is stored between invocat
ions. | 56 * The work directory where incremental build output is stored between invocat
ions. |
71 */ | 57 */ |
72 File getOutputDirectory(); | 58 File getOutputDirectory(); |
73 | 59 |
74 /** | 60 /** |
75 * Returns <code>true</code> if the compiler should not produce output. | |
76 */ | |
77 boolean checkOnly(); | |
78 | |
79 /** | |
80 * Returns <code>true</code> if the compiler should expect an entry point to b
e defined. | |
81 */ | |
82 boolean expectEntryPoint(); | |
83 | |
84 /** | |
85 * Returns the error formatting the compiler should print with | 61 * Returns the error formatting the compiler should print with |
86 */ | 62 */ |
87 ErrorFormat printErrorFormat(); | 63 ErrorFormat printErrorFormat(); |
88 | 64 |
89 /** | 65 /** |
90 * Return the system library corresponding to the specified "dart:<libname>" s
pec. | 66 * Return the system library corresponding to the specified "dart:<libname>" s
pec. |
91 */ | 67 */ |
92 LibrarySource getSystemLibraryFor(String importSpec); | 68 LibrarySource getSystemLibraryFor(String importSpec); |
93 | 69 |
94 /** | 70 /** |
95 * Return {@link CompilerOptions} instance. | 71 * Return {@link CompilerOptions} instance. |
96 * @return command line options passed to the compiler. | 72 * @return command line options passed to the compiler. |
97 */ | 73 */ |
98 CompilerOptions getCompilerOptions(); | 74 CompilerOptions getCompilerOptions(); |
99 } | 75 } |
OLD | NEW |