]> gitweb.factorcode.org Git - factor.git/commitdiff
command-line.startup: document more command line flags. we already have -nosignals...
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 4 Mar 2016 00:53:24 +0000 (16:53 -0800)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 4 Mar 2016 01:16:39 +0000 (17:16 -0800)
basis/command-line/command-line-docs.factor
basis/command-line/startup/startup.factor
vm/factor.cpp

index 66263afebfef280e384cbb129bf111b227662cab..d730930ab1715a3fae92ff39b11b0f481dc99cab 100644 (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." ;
 
index 7881160ebaee4c9d23679a0276a4075823a35795..945c9cd9555d7e32bed300dfca5a39650e7b56e4 100644 (file)
@@ -5,17 +5,28 @@ 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
-    -i=<image>       load Factor image file <image> (default " write vm-path file-stem write " .image)
-    -run=<vocab>     run the MAIN: entry point of <vocab>
-        -run=listener    run terminal listener
-        -run=ui.tools    run Factor development UI
-    -e=<code>        evaluate <code>
-    -no-user-init    suppress loading of .factor-rc
+    -help               print this message and exit
+    -i=<image>          load Factor image file <image> (default " write vm-path file-stem write ".image)
+    -run=<vocab>        run the MAIN: entry point of <vocab>
+        -run=listener   run terminal listener
+        -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
index 73c4282ad49723615a2bdea6a4ad7402b47724dd..7c8810d4147656446db17f669c94050653044564 100644 (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;
   }