In case that someone wants to store the definition when compiling the file, we
need to make sure that the compiler does not error if it has unreadable objects.
This commit replaces capturing whole LEX with an explicit vector of closed
variables. We introduce a set of additional opcodes that deal with closed
entities. Locals are referred as lcl and closed variables as lex.
This commit causes an intentional regression in the bytecodes compiler - we
don't carry over macros and symbol macros, so we can't recompile bytecompiled
function with the native compiler if they reference them.
That will be fixed in a more organized manner after flat closures are in place.
- split c_tag_ref into three functions c_{tag,blk,fun}_ref, clean c_var_ref
small differences between functions made the former harder to read
also update comments about the compiler environment
functions are refactored to have a similar shape and return the
same (internal) structure that denotes the object scope and purpose
- don't push special variables as locations in the environment
that was (an irrelevant) bug, because special variables are not in the en
- rename asm_c to asm_arg_data
This name better resembles the purpose of the operator
When we were compiling bytecodes with LABELS, the function SET-CLOSURE-ENV
exhibited infinite recursion by adding the record as FLET. C.f test "cmp.0100".
The function ecl_fdefinition checks also for lamdbas and whatnot, while all we
need is a lookup in the global namespace for the function name.
This commit also changes how we store SETF function definition -- instead of
maintaining them in a global environment, it is stored along with the symbol.
That saves us from taking a global lock repeatedly.
Previously we've registered the finalizer when a symbol was dynamically bound
for the first time; this commit changes that to remove a dependency on GC when
binding special variables.
Constant arguments for the dimensions were not handled correctly. The
valid-array-index function was lost in a refactor some time ago.
Moreover, we need to check all of the conditions on the
dimensions (limits on rank, dimension and total size) using an AND
statement instead of checking only the first condition using OR.
Simply call mkdir and ignore EEXIST errors to prevent race conditions
when two processes try to create a directory at the same time. Also
avoids a redundant syscall since by not calling si::file-kind, so this
should be slightly faster.
After this commit DESCRIBE prints two additional pieces of information below the
docstring. To avoid duplication, corresponding arg piece in doc/help.lsp has
been removed. Fixes#711.
We've made an implicit cast from bclosure to bytecodes, so instead of a name
we've printed bytecodes itself.
Except from thsi fix we also write the closure address to make it possible to
distinguish two different closures over the same function.
If we call stat in order to find out if a filename points to a
directory or an ordinary file, the emscripten stdlib may need to do a
network request to find out the size of the file even though we don't
care about that. This happens for files created with
FS.createLazyFile() by emscripten. By using readlink/opendir when
possible we avoid that.
Having *PRINT-LENGTH* at 3 is not satisfactory, especially in the early handler
where there are no other means to introspect errors. Change it to 8.
Before:
;;; Message:
|TYPE-ERROR|
;;; Arguments:
(:|EXPECTED-TYPE| |FUNCTION| :|DATUM| ...)
After:
;;; Message:
|TYPE-ERROR|
;;; Arguments:
(:|EXPECTED-TYPE| |FUNCTION| :|DATUM| (|QUOTE| |WHILE|))