Add -pic= command line argument
parent
e940f6fd8b
commit
3985b18026
|
@ -1,5 +1,4 @@
|
||||||
USING: help.markup help.syntax parser vocabs.loader strings
|
USING: help.markup help.syntax parser vocabs.loader strings ;
|
||||||
command-line.private ;
|
|
||||||
IN: command-line
|
IN: command-line
|
||||||
|
|
||||||
HELP: run-bootstrap-init
|
HELP: run-bootstrap-init
|
||||||
|
@ -53,6 +52,7 @@ ARTICLE: "runtime-cli-args" "Command line switches for the VM"
|
||||||
{ { $snippet "-aging=" { $emphasis "n" } } "Size of aging generation (1), megabytes" }
|
{ { $snippet "-aging=" { $emphasis "n" } } "Size of aging generation (1), megabytes" }
|
||||||
{ { $snippet "-tenured=" { $emphasis "n" } } "Size of oldest generation (2), megabytes" }
|
{ { $snippet "-tenured=" { $emphasis "n" } } "Size of oldest generation (2), megabytes" }
|
||||||
{ { $snippet "-codeheap=" { $emphasis "n" } } "Code heap size, megabytes" }
|
{ { $snippet "-codeheap=" { $emphasis "n" } } "Code heap size, megabytes" }
|
||||||
|
{ { $snippet "-pic=" { $emphasis "n" } } "Maximum inline cache size. Setting of 0 disables inline caching, > 1 enables polymorphic inline caching" }
|
||||||
{ { $snippet "-securegc" } "If specified, unused portions of the data heap will be zeroed out after every garbage collection" }
|
{ { $snippet "-securegc" } "If specified, unused portions of the data heap will be zeroed out after every garbage collection" }
|
||||||
}
|
}
|
||||||
"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 runtime executable (on Windows and Mac OS X) or the current directory (on Unix)." ;
|
"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 runtime executable (on Windows and Mac OS X) or the current directory (on Unix)." ;
|
||||||
|
|
|
@ -66,6 +66,7 @@ void init_parameters_from_args(F_PARAMETERS *p, int argc, F_CHAR **argv)
|
||||||
else if(factor_arg(argv[i],STRING_LITERAL("-aging=%d"),&p->aging_size));
|
else if(factor_arg(argv[i],STRING_LITERAL("-aging=%d"),&p->aging_size));
|
||||||
else if(factor_arg(argv[i],STRING_LITERAL("-tenured=%d"),&p->tenured_size));
|
else if(factor_arg(argv[i],STRING_LITERAL("-tenured=%d"),&p->tenured_size));
|
||||||
else if(factor_arg(argv[i],STRING_LITERAL("-codeheap=%d"),&p->code_size));
|
else if(factor_arg(argv[i],STRING_LITERAL("-codeheap=%d"),&p->code_size));
|
||||||
|
else if(factor_arg(argv[i],STRING_LITERAL("-pic=%d"),&p->max_pic_size));
|
||||||
else if(STRCMP(argv[i],STRING_LITERAL("-securegc")) == 0) p->secure_gc = true;
|
else if(STRCMP(argv[i],STRING_LITERAL("-securegc")) == 0) p->secure_gc = true;
|
||||||
else if(STRCMP(argv[i],STRING_LITERAL("-fep")) == 0) p->fep = true;
|
else if(STRCMP(argv[i],STRING_LITERAL("-fep")) == 0) p->fep = true;
|
||||||
else if(STRNCMP(argv[i],STRING_LITERAL("-i="),3) == 0) p->image_path = argv[i] + 3;
|
else if(STRNCMP(argv[i],STRING_LITERAL("-i="),3) == 0) p->image_path = argv[i] + 3;
|
||||||
|
@ -99,6 +100,8 @@ void init_factor(F_PARAMETERS *p)
|
||||||
p->tenured_size <<= 20;
|
p->tenured_size <<= 20;
|
||||||
p->code_size <<= 20;
|
p->code_size <<= 20;
|
||||||
|
|
||||||
|
p->max_pic_size = 3;
|
||||||
|
|
||||||
/* Disable GC during init as a sanity check */
|
/* Disable GC during init as a sanity check */
|
||||||
gc_off = true;
|
gc_off = true;
|
||||||
|
|
||||||
|
@ -118,6 +121,7 @@ void init_factor(F_PARAMETERS *p)
|
||||||
init_stacks(p->ds_size,p->rs_size);
|
init_stacks(p->ds_size,p->rs_size);
|
||||||
load_image(p);
|
load_image(p);
|
||||||
init_c_io();
|
init_c_io();
|
||||||
|
init_inline_caching(p->max_pic_size);
|
||||||
|
|
||||||
#ifndef FACTOR_DEBUG
|
#ifndef FACTOR_DEBUG
|
||||||
init_signals();
|
init_signals();
|
||||||
|
|
|
@ -35,6 +35,7 @@ typedef struct {
|
||||||
bool fep;
|
bool fep;
|
||||||
bool console;
|
bool console;
|
||||||
bool stack_traces;
|
bool stack_traces;
|
||||||
|
CELL max_pic_size;
|
||||||
} F_PARAMETERS;
|
} F_PARAMETERS;
|
||||||
|
|
||||||
void load_image(F_PARAMETERS *p);
|
void load_image(F_PARAMETERS *p);
|
||||||
|
|
Loading…
Reference in New Issue