This funciton parses an integer and returns OBJNULL when it exceeds the size of
a fixnum.
It is used in format.d - a file that is not compiled currently. It should be
also used in cl_name_char.
[wip] because:
- is it really needed?
- I've commented unicode access for digitp
Previously we've wrongly estimated that the vector with opcodes has the same
length as the number of words, but:
CALLW takes an argument denoting the index of the function on data stack
PUSHQ takes an argument denoting the index of the literal on data stack
Moreover rename some dictionary entries for more descriptive names and add a new
word .V that prints values stored in the environment.
In the first sketch they operated on stack frames, but this approach was flawed
because a) leaving things on the stack above frame prevented it from growing
leading to an internal error, b) closing the frame wiped all values deposited on
the stack that were above the frame base.
This commit takes a correction over things corrected (and rebased) in
refactor-stacks branch.
consturctors nucl_stack_to_foo remove elements from the stack and leave the
parsed element on the stack.
Move specials at the beginning.
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.