Fixed several rare bugs in copying functionality; added DeserializationSettings for heap and stack space
This MR contains several bugfixes and enhancements that could not be isolated:
Bugfixes:
- Copying with arguments now uses
jmp_ap
instructions in the interpreter, which is less error-prone. The inefficient case (add_empty_node
) does not occur because the node is first fully filled in the host. - In
interpret
,heap_free
is now correctly computed also whenLINK_CLEAN_RUNTIME
is set, to avoid unnecessary garbage collections. -
printD
now supports function descriptors (used in_match_error
). - In
jsr_eval_host_node
, the correct old node is now overwritten with the result also when a garbage collection occurs while evaluating/copying the host node.
Enhancements:
- Added
DeserializationSettings
to customize heap and stack size - Check that the interpreter A-stack is not corrupted when copying between host and interpreter