7 NAMESTACK_ENV, /* used by library only */
8 CATCHSTACK_ENV, /* used by library only, per-callback */
10 CURRENT_CALLBACK_ENV = 2, /* used by library only, per-callback */
11 WALKER_HOOK_ENV, /* non-local exit hook, used by library only */
12 CALLCC_1_ENV, /* used to pass the value in callcc1 */
14 BREAK_ENV = 5, /* quotation called by throw primitive */
15 ERROR_ENV, /* a marker consed onto kernel errors */
17 CELL_SIZE_ENV = 7, /* sizeof(cell) */
18 CPU_ENV, /* CPU architecture */
19 OS_ENV, /* operating system name */
21 ARGS_ENV = 10, /* command line arguments */
22 STDIN_ENV, /* stdin FILE* handle */
23 STDOUT_ENV, /* stdout FILE* handle */
25 IMAGE_ENV = 13, /* image path name */
26 EXECUTABLE_ENV, /* runtime executable path name */
28 EMBEDDED_ENV = 15, /* are we embedded in another app? */
29 EVAL_CALLBACK_ENV, /* used when Factor is embedded in a C app */
30 YIELD_CALLBACK_ENV, /* used when Factor is embedded in a C app */
31 SLEEP_CALLBACK_ENV, /* used when Factor is embedded in a C app */
33 COCOA_EXCEPTION_ENV = 19, /* Cocoa exception handler quotation */
35 BOOT_ENV = 20, /* boot quotation */
36 GLOBAL_ENV, /* global namespace */
38 /* Quotation compilation in quotations.c */
61 /* Polymorphic inline cache generation in inline_cache.c */
73 /* Megamorphic cache generation in dispatch.c */
78 UNDEFINED_ENV = 60, /* default quotation for undefined words */
80 STDERR_ENV = 61, /* stderr FILE* handle */
82 STAGE2_ENV = 62, /* have we bootstrapped? */
84 CURRENT_THREAD_ENV = 63,
90 STACK_TRACES_ENV = 67,
93 #define FIRST_SAVE_ENV BOOT_ENV
94 #define LAST_SAVE_ENV STAGE2_ENV
96 inline static bool save_env_p(cell i)
98 return (i >= FIRST_SAVE_ENV && i <= LAST_SAVE_ENV) || i == STACK_TRACES_ENV;
101 /* Canonical T object. It's just a word */
110 PRIMITIVE(load_locals);
115 /* TAGGED user environment data; see getenv/setenv prims */
116 VM_C_API factor::cell userenv[USER_ENV];