MSVC does not allow for specifying /std:c99 so we need c11. We don't rely on the
default standard because it does not allow for static struct initializers.
CALLW calls a word from the data stack. The word differs from normal functions
in that it takes no arguments (so the call does not modify the data stack).
To allow words using the stack across calls (like in "real" forth) don't unwind
the stack on exit if there are no locals.
ecl_alloc_object, ecl_free_object
ecl_alloc, ecl_alloc_manual, ecl_alloc_atomic, ecl_dealloc
Moreover move all top-level ops to memory.d so they are not reliant on mem_gc.
The stubbed allocator uses manual memory managament for all ops.
[wip] because we should adjust ecl_make_stack too
This table contains symbols that are essential to the core runtime: ECL_T,
ECL_UNBOUND, ECL_SIGNAL_HANDLERS, ECL_RESTART_CLUSTERs, ECL_INTERRUPTS_ENABLED,
ECL_ALLOW_OTHER_KEYS and ECL_UNBOUND.
The table is initialized with constexpr, so it is possible to use its elements
in static elements. We also add ecl_def_function to ecl-inl to allow
appropriating C functions into Lisp world at top level.
Previously we've opencoded calls to these functions, although they may be nicely
abstracted with static inline functions. This change improves code readibility
and portability.
We also remove conditionalization for garbage collector inclusion in autotools.
When we propose an alternative gc, then we may decide to put them back, or to
add necessary ifdef statements directly in files.
Moreover untangle c-stack from the gc code and assign the stack base with a
rough guess only when it is not initialized yet (GC will always fill it).
Finally remove a kludge from ecl_adopt_cpu and disable colleciton until the cpu
is fully initialized.
I've also renamed *HANDLER-CLUSTERS* to a more appropriate *SIGNAL-HANDLERS*.
Currently this symbol is imported to the SYSTEM package, although this may be
revised in the future to cater to multiple global environments. Alternatively
the SYSTEM package may be common to all runtimes.
Instead of storing lists in *HANDLER-CLUSTERS*, we define functions that are
called unconditionally on the handler. HANDLER-BIND defines that function to be
a typecase that is dispatched based on the conditiont type, as specified by CL.
This change will aid further refactor.