Chromium Code Reviews| Index: lib/compiler/implementation/apiimpl.dart |
| diff --git a/lib/compiler/implementation/apiimpl.dart b/lib/compiler/implementation/apiimpl.dart |
| index 30e498925241261a4494475595f90dde6ada870c..e2598605a37b76814a286ad7138ad9928e8a8cd0 100644 |
| --- a/lib/compiler/implementation/apiimpl.dart |
| +++ b/lib/compiler/implementation/apiimpl.dart |
| @@ -31,8 +31,16 @@ class Compiler extends leg.Compiler { |
| enableUserAssertions: hasOption(options, '--enable-checked-mode'), |
| enableMinification: hasOption(options, '--minify'), |
| emitJavaScript: !hasOption(options, '--output-type=dart'), |
| - forceCutDeclarationTypes: |
| - hasOption(options, '--force-cut-declaration-types')); |
| + strips: getStrips(options)); |
| + |
| + static List<String> getStrips(List<String> options) { |
|
ahe
2012/10/01 10:19:22
I don't like this method, but I don't like the has
Roman
2012/10/03 12:24:26
I don't like it too. I agree, Map of args would ce
|
| + for (String option in options) { |
| + if (option.startsWith('--force-strip=')) { |
| + return option.substring('--force-strip='.length).split(','); |
| + } |
| + } |
| + return []; |
| + } |
| static bool hasOption(List<String> options, String option) { |
| return options.indexOf(option) >= 0; |