mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 12:03:40 -08:00
FUNCTION-LAMBDA-EXPRESSION now returns a fourth value, the definition of a bytecodes object.
This commit is contained in:
parent
43043075ac
commit
4c4b79d9ce
2 changed files with 11 additions and 8 deletions
|
|
@ -123,7 +123,7 @@ cl_object
|
|||
cl_function_lambda_expression(cl_object fun)
|
||||
{
|
||||
cl_env_ptr the_env = ecl_process_env();
|
||||
cl_object output, name = Cnil, lex = Cnil;
|
||||
cl_object output, name = Cnil, lex = Cnil, definition = Cnil;
|
||||
|
||||
switch(type_of(fun)) {
|
||||
case t_bclosure:
|
||||
|
|
@ -133,7 +133,7 @@ cl_function_lambda_expression(cl_object fun)
|
|||
name = fun->bytecodes.name;
|
||||
output = fun->bytecodes.definition;
|
||||
if (!CONSP(output))
|
||||
output = Cnil;
|
||||
{ definition = output; output = Cnil; }
|
||||
else if (name == Cnil)
|
||||
output = cl_cons(@'lambda', output);
|
||||
else if (name != @'si::bytecodes')
|
||||
|
|
@ -162,7 +162,7 @@ cl_function_lambda_expression(cl_object fun)
|
|||
default:
|
||||
FEinvalid_function(fun);
|
||||
}
|
||||
@(return output lex name)
|
||||
@(return output lex name definition)
|
||||
}
|
||||
|
||||
cl_object
|
||||
|
|
|
|||
|
|
@ -796,7 +796,7 @@ under certain conditions; see file 'Copyright' for details.")
|
|||
(format t "~:[~;Local functions: ~:*~{~s~^, ~}.~%~]" functions)
|
||||
(format t "~:[~;Block names: ~:*~{~s~^, ~}.~%~]" blocks)
|
||||
|
||||
;; This format is the what was in the orignal code.
|
||||
;; This format is what was in the orignal code.
|
||||
;; It simply does not work when no-values is t.
|
||||
;; If you care to debug this kind of conundrum then have fun!
|
||||
;;(format t "Local variables: ~:[~:[none~;~:*~{~a~1*~:@{, ~a~1*~}~}~]~;~
|
||||
|
|
@ -829,7 +829,7 @@ under certain conditions; see file 'Copyright' for details.")
|
|||
(string-equal s1 s2)
|
||||
nil)))))
|
||||
(when val-pair
|
||||
(format t "~&In tpl-inspect-command: val-pair = ~S~%" val-pair)
|
||||
;;(format t "~&In tpl-inspect-command: val-pair = ~S~%" val-pair)
|
||||
(let ((val (cdr val-pair)))
|
||||
(inspect val)))))
|
||||
|
||||
|
|
@ -875,8 +875,9 @@ under certain conditions; see file 'Copyright' for details.")
|
|||
;;(format t "~:[~; >~] ~S" b (ihs-fname i)) ;; JCB
|
||||
(format t " > ~S" func-name)
|
||||
(when (eq func-name 'si::bytecodes)
|
||||
(format t " [Evaluation of: ~S]"
|
||||
(function-lambda-expression (ihs-fun i))))
|
||||
(multiple-value-bind (lform lex name def)
|
||||
(function-lambda-expression (ihs-fun i))
|
||||
(format t " [Evaluation of: ~S]" (if lform lform def))))
|
||||
(terpri)
|
||||
)))
|
||||
(progn
|
||||
|
|
@ -902,7 +903,9 @@ under certain conditions; see file 'Copyright' for details.")
|
|||
;;(format t "~:[~; >~] ~S" b (ihs-fname i)) ;; JCB
|
||||
(format t " > ~S" (ihs-fname i))
|
||||
(when (eq func-name 'si::bytecodes)
|
||||
(format t " [Evaluation of: ~S]" (function-lambda-expression (ihs-fun i))))
|
||||
(multiple-value-bind (lform lex name def)
|
||||
(function-lambda-expression (ihs-fun i))
|
||||
(format t " [Evaluation of: ~S]" (if lform lform def))))
|
||||
(terpri)
|
||||
))))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue