| OLD | NEW |
| 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 /** General options used by the compiler. */ | 5 /** General options used by the compiler. */ |
| 6 FrogOptions options; | 6 FrogOptions options; |
| 7 | 7 |
| 8 /** Extracts options from command-line arguments. */ | 8 /** Extracts options from command-line arguments. */ |
| 9 void parseOptions(String homedir, List<String> args, FileSystem files) { | 9 void parseOptions(String homedir, List<String> args, FileSystem files) { |
| 10 assert(options == null); | 10 assert(options == null); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 bool throwOnWarnings = false; | 44 bool throwOnWarnings = false; |
| 45 bool throwOnFatal = false; | 45 bool throwOnFatal = false; |
| 46 bool showInfo = false; | 46 bool showInfo = false; |
| 47 bool showWarnings = true; | 47 bool showWarnings = true; |
| 48 bool useColors = true; | 48 bool useColors = true; |
| 49 | 49 |
| 50 // Not currently settable via command line. | 50 // Not currently settable via command line. |
| 51 // Intended for use by compiler implementer during debugging. | 51 // Intended for use by compiler implementer during debugging. |
| 52 // TODO(jmesserly): what are the right values for these? | 52 // TODO(jmesserly): what are the right values for these? |
| 53 int maxInferenceIterations = 4; | 53 int maxInferenceIterations = 4; |
| 54 int maxInferenceCalls = 10; |
| 54 | 55 |
| 55 /** | 56 /** |
| 56 * Options to be used later for passing to the generated code. These are all | 57 * Options to be used later for passing to the generated code. These are all |
| 57 * the arguments after the first dart script, if any. | 58 * the arguments after the first dart script, if any. |
| 58 */ | 59 */ |
| 59 List<String> childArgs; | 60 List<String> childArgs; |
| 60 | 61 |
| 61 FrogOptions(String homedir, List<String> args, FileSystem files) { | 62 FrogOptions(String homedir, List<String> args, FileSystem files) { |
| 62 if (config == 'dev') { | 63 if (config == 'dev') { |
| 63 libDir = joinPaths(homedir, '/lib'); // Default value for --libdir. | 64 libDir = joinPaths(homedir, '/lib'); // Default value for --libdir. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Try locally | 174 // Try locally |
| 174 var temp = 'frog/lib'; | 175 var temp = 'frog/lib'; |
| 175 if (files.fileExists(temp)) { | 176 if (files.fileExists(temp)) { |
| 176 libDir = temp; | 177 libDir = temp; |
| 177 } else { | 178 } else { |
| 178 libDir = 'lib'; | 179 libDir = 'lib'; |
| 179 } | 180 } |
| 180 } | 181 } |
| 181 } | 182 } |
| 182 } | 183 } |
| OLD | NEW |