| 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 21 matching lines...) Expand all Loading... |
| 32 bool enableAsserts = false; | 32 bool enableAsserts = false; |
| 33 bool enableTypeChecks = false; | 33 bool enableTypeChecks = false; |
| 34 bool warningsAsErrors = false; | 34 bool warningsAsErrors = false; |
| 35 bool verifyImplements = false; // TODO(jimhug): Implement | 35 bool verifyImplements = false; // TODO(jimhug): Implement |
| 36 bool compileAll = false; | 36 bool compileAll = false; |
| 37 bool forceDynamic = false; | 37 bool forceDynamic = false; |
| 38 bool dietParse = false; | 38 bool dietParse = false; |
| 39 bool compileOnly = false; | 39 bool compileOnly = false; |
| 40 bool inferTypes = false; | 40 bool inferTypes = false; |
| 41 | 41 |
| 42 // Specifies non-compliant behavior where array bounds checks are |
| 43 // not implemented in generated code. |
| 44 bool disableBoundsChecks = false; |
| 45 |
| 42 // Message support | 46 // Message support |
| 43 bool throwOnErrors = false; | 47 bool throwOnErrors = false; |
| 44 bool throwOnWarnings = false; | 48 bool throwOnWarnings = false; |
| 45 bool throwOnFatal = false; | 49 bool throwOnFatal = false; |
| 46 bool showInfo = false; | 50 bool showInfo = false; |
| 47 bool showWarnings = true; | 51 bool showWarnings = true; |
| 48 bool useColors = true; | 52 bool useColors = true; |
| 49 | 53 |
| 50 // Not currently settable via command line. | 54 // Not currently settable via command line. |
| 51 // Intended for use by compiler implementer during debugging. | 55 // Intended for use by compiler implementer during debugging. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 break; | 147 break; |
| 144 | 148 |
| 145 case '--no_colors': | 149 case '--no_colors': |
| 146 useColors = false; | 150 useColors = false; |
| 147 break; | 151 break; |
| 148 | 152 |
| 149 case '--Xinfer_types': | 153 case '--Xinfer_types': |
| 150 inferTypes = true; | 154 inferTypes = true; |
| 151 break; | 155 break; |
| 152 | 156 |
| 157 case '--checked': |
| 158 enableTypeChecks = true; |
| 159 enableAsserts = true; |
| 160 break; |
| 161 |
| 162 case '--unchecked': |
| 163 disableBoundsChecks = true; |
| 164 break; |
| 165 |
| 153 default: | 166 default: |
| 154 if (arg.endsWith('.dart')) { | 167 if (arg.endsWith('.dart')) { |
| 155 dartScript = arg; | 168 dartScript = arg; |
| 156 childArgs = args.getRange(i + 1, args.length - i - 1); | 169 childArgs = args.getRange(i + 1, args.length - i - 1); |
| 157 break loop; | 170 break loop; |
| 158 } else if (arg.startsWith('--out=')) { | 171 } else if (arg.startsWith('--out=')) { |
| 159 outfile = arg.substring('--out='.length); | 172 outfile = arg.substring('--out='.length); |
| 160 } else if (arg.startsWith('--libdir=')) { | 173 } else if (arg.startsWith('--libdir=')) { |
| 161 libDir = arg.substring('--libdir='.length); | 174 libDir = arg.substring('--libdir='.length); |
| 162 passedLibDir = true; | 175 passedLibDir = true; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 173 // Try locally | 186 // Try locally |
| 174 var temp = 'frog/lib'; | 187 var temp = 'frog/lib'; |
| 175 if (files.fileExists(temp)) { | 188 if (files.fileExists(temp)) { |
| 176 libDir = temp; | 189 libDir = temp; |
| 177 } else { | 190 } else { |
| 178 libDir = 'lib'; | 191 libDir = 'lib'; |
| 179 } | 192 } |
| 180 } | 193 } |
| 181 } | 194 } |
| 182 } | 195 } |
| OLD | NEW |