mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 12:33:39 -08:00
cosmetic: indentation fixes and some comments
This commit is contained in:
parent
d27f1494e1
commit
25a72ff80a
7 changed files with 36 additions and 32 deletions
|
|
@ -114,7 +114,7 @@ ecl_rem_setf_definition(cl_object sym)
|
|||
int type;
|
||||
@
|
||||
if (Null(cl_functionp(def)))
|
||||
FEinvalid_function(def);
|
||||
FEinvalid_function(def);
|
||||
pack = ecl_symbol_package(sym);
|
||||
if (pack != ECL_NIL
|
||||
&& pack->pack.locked
|
||||
|
|
|
|||
|
|
@ -515,7 +515,9 @@ guess_compiler_environment(cl_env_ptr env, cl_object interpreter_env)
|
|||
else
|
||||
c_register_var(env, record0, FALSE, TRUE);
|
||||
} else if (record1 == ecl_make_fixnum(0)) {
|
||||
c_register_tags(env, ECL_NIL);
|
||||
/* We have lost the information, which tag corresponds to
|
||||
the lex-env record. If we are compiling a closure over a
|
||||
tag, we will get an error later on. */
|
||||
} else {
|
||||
c_register_block(env, record1);
|
||||
}
|
||||
|
|
@ -938,11 +940,11 @@ c_call(cl_env_ptr env, cl_object args, int flags) {
|
|||
flags = FLAG_VALUES;
|
||||
} else if (ECL_SYMBOLP(name) &&
|
||||
((flags & FLAG_GLOBAL) || Null(c_tag_ref(env, name, @':function'))))
|
||||
{
|
||||
asm_op2(env, OP_CALLG, nargs);
|
||||
asm_c(env, name);
|
||||
flags = FLAG_VALUES;
|
||||
} else {
|
||||
{
|
||||
asm_op2(env, OP_CALLG, nargs);
|
||||
asm_c(env, name);
|
||||
flags = FLAG_VALUES;
|
||||
} else {
|
||||
/* Fixme!! We can optimize the case of global functions! */
|
||||
asm_function(env, name, (flags & FLAG_GLOBAL) | FLAG_REG0);
|
||||
asm_op2(env, OP_CALL, nargs);
|
||||
|
|
@ -2464,7 +2466,8 @@ compile_with_load_time_forms(cl_env_ptr env, cl_object form, int flags)
|
|||
*/
|
||||
if (c_env->load_time_forms != ECL_NIL) {
|
||||
cl_index *bytecodes = save_bytecodes(env, handle, current_pc(env));
|
||||
/* Make sure the forms are compiled in the right order */
|
||||
/* reverse the load time forms list to make sure the forms are
|
||||
* compiled in the right order */
|
||||
cl_object p, forms_list = cl_nreverse(c_env->load_time_forms);
|
||||
c_env->load_time_forms = ECL_NIL;
|
||||
p = forms_list;
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ disassemble(cl_object bytecodes, cl_opcode *vector) {
|
|||
Returns from the block whose record in the lexical environment
|
||||
occuppies the n-th position.
|
||||
*/
|
||||
case OP_RETURN: string = "RETFROM";
|
||||
case OP_RETURN: string = "RETFROM\t";
|
||||
GET_OPARG(n, vector);
|
||||
goto OPARG;
|
||||
|
||||
|
|
|
|||
|
|
@ -251,6 +251,7 @@
|
|||
;; explicitely the bytecodes compiler with an environment, no
|
||||
;; stepping, compiler-env-p = t and execute = nil, so that the
|
||||
;; form does not get executed.
|
||||
;; FIXME: Why is execute t then?
|
||||
(si::eval-with-env method-lambda env nil t t)))
|
||||
(values call-next-method-p
|
||||
next-method-p-p
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@
|
|||
(cmp-env-register-function fun new-env)
|
||||
(push (cons fun (cdr def)) defs)))
|
||||
|
||||
;; Now we compile the functions, either in an empty environment
|
||||
;; in which there are no new functions
|
||||
;; Now we compile the functions, either in the current environment
|
||||
;; or in an empty environment in which there are no new functions
|
||||
(let ((*cmp-env* (cmp-env-copy (if (eq origin 'FLET) *cmp-env* new-env))))
|
||||
(dolist (def (nreverse defs))
|
||||
(let ((fun (first def)))
|
||||
|
|
|
|||
|
|
@ -348,37 +348,37 @@ environment can be used to bytecompile the functions in MACROLET
|
|||
or SYMBOL-MACRO forms, and also to evaluate other forms."
|
||||
(declare (si::c-local))
|
||||
(flet ((local-var-error-function (name)
|
||||
#'(lambda (whole env)
|
||||
(declare (ignore whole env))
|
||||
(error
|
||||
"In a MACROLET function you tried to access a local variable, ~A,
|
||||
#'(lambda (whole env)
|
||||
(declare (ignore whole env))
|
||||
(error
|
||||
"In a MACROLET function you tried to access a local variable, ~A,
|
||||
from the function in which it appears." name)))
|
||||
(local-fun-error-function (name)
|
||||
#'(lambda (whole env)
|
||||
(declare (ignore whole env))
|
||||
(error
|
||||
"In a MACROLET function you tried to access a local function, ~A,
|
||||
#'(lambda (whole env)
|
||||
(declare (ignore whole env))
|
||||
(error
|
||||
"In a MACROLET function you tried to access a local function, ~A,
|
||||
from the function in which it appears." name))))
|
||||
(cons (do ((env (car old-env) (cdr env))
|
||||
(variables '()))
|
||||
((endp env) (nreverse variables))
|
||||
(let ((i (car env)))
|
||||
(if (consp i)
|
||||
(let ((name (first i)))
|
||||
(if (not (keywordp name))
|
||||
(push (if (second i)
|
||||
i
|
||||
(list name 'si::symbol-macro (local-var-error-function name)))
|
||||
variables))))))
|
||||
(let ((name (first i)))
|
||||
(if (not (keywordp name))
|
||||
(push (if (second i)
|
||||
i
|
||||
(list name 'si::symbol-macro (local-var-error-function name)))
|
||||
variables))))))
|
||||
(do ((env (cdr old-env) (cdr env))
|
||||
(macros '()))
|
||||
((endp env) (nreverse macros))
|
||||
(let ((i (car env)))
|
||||
(if (consp i)
|
||||
(push (if (eq (second i) 'SI::MACRO)
|
||||
i
|
||||
(list (first i) 'SI:MACRO (local-fun-error-function (first i))))
|
||||
macros)))))))
|
||||
(push (if (eq (second i) 'SI::MACRO)
|
||||
i
|
||||
(list (first i) 'SI:MACRO (local-fun-error-function (first i))))
|
||||
macros)))))))
|
||||
|
||||
(defun macrolet-functions (definitions old-env)
|
||||
(declare (si::c-local))
|
||||
|
|
|
|||
|
|
@ -1334,20 +1334,20 @@ Use special code 0 to cancel this operation.")
|
|||
Use the following functions to directly access ECL stacks.
|
||||
|
||||
Invocation History Stack:
|
||||
(sys:IHS-TOP) Returns the index of the TOP of the IHS.
|
||||
(SYS:IHS-TOP) Returns the index of the TOP of the IHS.
|
||||
(SYS:IHS-FUN i) Returns the function of the i-th entity in IHS.
|
||||
(SYS:IHS-ENV i)
|
||||
(SYS:IHS-PREV i)
|
||||
(SYS:IHS-NEXT i)
|
||||
|
||||
Frame (catch, block) Stack:
|
||||
(sys:FRS-TOP) Returns the index of the TOP of the FRS.
|
||||
(SYS:FRS-TOP) Returns the index of the TOP of the FRS.
|
||||
(SYS:FRS-BDS i) Returns the BDS index of the i-th entity in FRS.
|
||||
(SYS:FRS-IHS i) Returns the IHS index of the i-th entity in FRS.
|
||||
(SYS:FRS-TAG i)
|
||||
|
||||
Binding Stack:
|
||||
(sys:BDS-TOP) Returns the index of the TOP of the BDS.
|
||||
(SYS:BDS-TOP) Returns the index of the TOP of the BDS.
|
||||
(SYS:BDS-VAR i) Returns the symbol of the i-th entity in BDS.
|
||||
(SYS:BDS-VAL i) Returns the value of the i-th entity in BDS.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue