command-line.startup: document more command line flags. we already have -nosignals, but it was hidden in the source code. Fix spacing for default image. Closes #1514.

db4
Doug Coleman 2016-03-03 16:53:24 -08:00
parent 2af988eca2
commit 5813e8384e
3 changed files with 23 additions and 12 deletions

View File

@ -57,7 +57,7 @@ ARTICLE: "runtime-cli-args" "Command line switches for the VM"
{ { $snippet "-tenured=" { $emphasis "n" } } "Size of oldest generation (2), megabytes" }
{ { $snippet "-codeheap=" { $emphasis "n" } } "Code heap size, megabytes" }
{ { $snippet "-callbacks=" { $emphasis "n" } } "Callback heap size, megabytes" }
{ { $snippet "-pic=" { $emphasis "n" } } "Maximum inline cache size. Setting of 0 disables inline caching, > 1 enables polymorphic inline caching" }
{ { $snippet "-pic=" { $emphasis "n" } } "Maximum inline cache size. Setting of 0 disables inline caching, >= 1 enables polymorphic inline caching" }
}
"If an " { $snippet "-i=" } " switch is not present, the default image file is used, which is usually a file named " { $snippet "factor.image" } " in the same directory as the Factor executable." ;

View File

@ -5,8 +5,7 @@ sequences system vocabs.loader ;
IN: command-line.startup
: cli-usage ( -- )
"
Usage: " write vm-path file-name write " [Factor arguments] [script] [script arguments]
"Usage: " write vm-path file-name write " [Factor arguments] [script] [script arguments]
Common arguments:
-help print this message and exit
@ -16,6 +15,18 @@ Common arguments:
-run=ui.tools run Factor development UI
-e=<code> evaluate <code>
-no-user-init suppress loading of .factor-rc
-datastack=<int> datastack size in kb
-retainstack=<int> retainstack size in kb
-callstack=<int> callstack size in kb
-young=<int> young gc size in MB
-aging=<int> aging gc size in MB
-tenured=<int> tenured gc size in MB
-codeheap=<int> codeheap size in MB
-callbacks=<int> callback size size in kb
-pic=<int> max pic size
-fep enter fep mode immediately
-nosignals turn off OS signal handling
-console open console if present
Enter
\"command-line\" help

View File

@ -79,12 +79,12 @@ void factor_vm::init_parameters_from_args(vm_parameters* p, int argc,
else if (factor_arg(arg, STRING_LITERAL("-callbacks=%d"),
&p->callback_size))
;
else if (STRNCMP(arg, STRING_LITERAL("-i="), 3) == 0)
p->image_path = arg + 3;
else if (STRCMP(arg, STRING_LITERAL("-fep")) == 0)
p->fep = true;
else if (STRCMP(arg, STRING_LITERAL("-nosignals")) == 0)
p->signals = false;
else if (STRNCMP(arg, STRING_LITERAL("-i="), 3) == 0)
p->image_path = arg + 3;
else if (STRCMP(arg, STRING_LITERAL("-console")) == 0)
p->console = true;
}