new path
This commit is contained in:
@@ -211,9 +211,9 @@ void script_startup(cell_rt *prt)
|
||||
JS_SetPropertyStr(js, hidden_env, "init", JS_NULL);
|
||||
}
|
||||
|
||||
// Set args and use_mcode to null/false for actor spawn (not CLI mode)
|
||||
// Set args to null for actor spawn (not CLI mode)
|
||||
JS_SetPropertyStr(js, hidden_env, "args", JS_NULL);
|
||||
JS_SetPropertyStr(js, hidden_env, "use_mcode", JS_NewBool(js, 0));
|
||||
/* use_mcode no longer needed — new bootstrap always uses mcode pipeline */
|
||||
|
||||
if (core_path)
|
||||
JS_SetPropertyStr(js, hidden_env, "core_path", JS_NewString(js, core_path));
|
||||
@@ -290,7 +290,7 @@ static void print_usage(const char *prog)
|
||||
printf("Options:\n");
|
||||
printf(" --core <path> Set core path directly (overrides CELL_CORE)\n");
|
||||
printf(" --shop <path> Set shop path (overrides CELL_SHOP)\n");
|
||||
printf(" --mcode <script> [args] Run through mcode compilation pipeline\n");
|
||||
printf(" --emit-qbe Emit QBE IL (for native compilation)\n");
|
||||
printf(" --test [heap_size] Run C test suite\n");
|
||||
printf(" -h, --help Show this help message\n");
|
||||
printf("\nEnvironment:\n");
|
||||
@@ -322,7 +322,6 @@ int cell_init(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Default: run script through bootstrap pipeline */
|
||||
int use_mcode = 0;
|
||||
int emit_qbe = 0;
|
||||
int arg_start = 1;
|
||||
const char *shop_override = NULL;
|
||||
@@ -331,10 +330,9 @@ int cell_init(int argc, char **argv)
|
||||
// Parse flags (order-independent)
|
||||
while (arg_start < argc && argv[arg_start][0] == '-') {
|
||||
if (strcmp(argv[arg_start], "--mcode") == 0) {
|
||||
use_mcode = 1;
|
||||
/* --mcode is now always on; accept and ignore for compat */
|
||||
arg_start++;
|
||||
} else if (strcmp(argv[arg_start], "--emit-qbe") == 0) {
|
||||
use_mcode = 1; // QBE requires mcode pipeline
|
||||
emit_qbe = 1;
|
||||
arg_start++;
|
||||
} else if (strcmp(argv[arg_start], "--shop") == 0) {
|
||||
@@ -420,7 +418,7 @@ int cell_init(int argc, char **argv)
|
||||
JS_SetPropertyStr(ctx, hidden_env, "core_path", JS_NewString(ctx, core_path));
|
||||
JS_SetPropertyStr(ctx, hidden_env, "shop_path",
|
||||
shop_path ? JS_NewString(ctx, shop_path) : JS_NULL);
|
||||
JS_SetPropertyStr(ctx, hidden_env, "use_mcode", JS_NewBool(ctx, use_mcode));
|
||||
/* use_mcode no longer needed — new bootstrap always uses mcode pipeline */
|
||||
JS_SetPropertyStr(ctx, hidden_env, "emit_qbe", JS_NewBool(ctx, emit_qbe));
|
||||
JS_SetPropertyStr(ctx, hidden_env, "actorsym", JS_DupValue(ctx, cli_rt->actor_sym_ref.val));
|
||||
JS_SetPropertyStr(ctx, hidden_env, "json", js_json_use(ctx));
|
||||
|
||||
Reference in New Issue
Block a user