CLI: Support "-X" advanced options, simplify some boolean options

This commit is contained in:
Alexander Udalov
2014-07-30 11:10:26 -07:00
parent 991c33d236
commit 160cde09d6
30 changed files with 93 additions and 303 deletions
@@ -41,6 +41,9 @@ public abstract class CommonCompilerArguments {
@ValueDescription(SUPPRESS_WARNINGS)
public String suppress;
@Argument(value = "X", description = "Print a synopsis of advanced options")
public boolean extraHelp;
public List<String> freeArgs = new SmartList<String>();
public boolean suppressAllWarnings() {
@@ -48,12 +48,6 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@Argument(value = "noJdkAnnotations", description = "Don't include JDK external annotations into classpath")
public boolean noJdkAnnotations;
@Argument(value = "notNullAssertions", description = "Generate not-null assertion after each invocation of method returning not-null")
public boolean notNullAssertions;
@Argument(value = "notNullParamAssertions", description = "Generate not-null assertions on parameters of methods accessible from Java")
public boolean notNullParamAssertions;
@Argument(value = "module", description = "Path to the module file to compile")
@ValueDescription("<path>")
public String module;
@@ -65,13 +59,19 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@ValueDescription("<path>")
public String kotlinHome;
@Argument(value = "inline", description = "Inlining mode (default is on)")
@ValueDescription("{on,off}")
public String inline;
// Advanced options
@Argument(value = "optimize", description = "Optimization mode (default is on)")
@ValueDescription("{on,off}")
public String optimize;
@Argument(value = "Xno-call-assertions", description = "Don't generate not-null assertion after each invocation of method returning not-null")
public boolean noCallAssertions;
@Argument(value = "Xno-param-assertions", description = "Don't generate not-null assertions on parameters of methods accessible from Java")
public boolean noParamAssertions;
@Argument(value = "Xno-inline", description = "Disable method inlining")
public boolean noInline;
@Argument(value = "Xno-optimize", description = "Disable optimizations")
public boolean noOptimize;
@Override
@NotNull