diff --git a/src/c/compiler.d b/src/c/compiler.d index 472cfc4a5..799a181eb 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -3018,6 +3018,14 @@ ecl_make_lambda(cl_env_ptr env, cl_object name, cl_object lambda) { compile_form(env, @list*(3, @'block', si_function_block_name(name), body), FLAG_VALUES); } else { + while (!Null(decl)) { + cl_object l = ECL_CONS_CAR(decl); + if (ECL_CONSP(l) && ECL_CONS_CAR(l) == @'si::function-block-name') { + name = ECL_CONS_CAR(ECL_CONS_CDR(l)); + break; + } + decl = ECL_CONS_CDR(decl); + } compile_body(env, body, FLAG_VALUES); } diff --git a/src/clos/method.lsp b/src/clos/method.lsp index c43932bf9..9a724ac64 100644 --- a/src/clos/method.lsp +++ b/src/clos/method.lsp @@ -150,6 +150,7 @@ do (push `(,name ,name) copied-variables) and nconc `((type ,type ,name) (si::no-check-type ,name)))) + (list (list 'si::function-block-name name)) (cdar declarations))) (block `(block ,(si::function-block-name name) ,@real-body)) (method-lambda diff --git a/src/cmp/cmpenv-declare.lsp b/src/cmp/cmpenv-declare.lsp index 95dd6c093..2feb67958 100644 --- a/src/cmp/cmpenv-declare.lsp +++ b/src/cmp/cmpenv-declare.lsp @@ -98,6 +98,7 @@ and a possible documentation string (only accepted when DOC-P is true)." SI::C-GLOBAL DYNAMIC-EXTENT IGNORABLE VALUES SI::NO-CHECK-TYPE POLICY-DEBUG-IHS-FRAME :READ-ONLY) (push decl others)) + (SI:FUNCTION-BLOCK-NAME) (otherwise (if (or (alien-declaration-p decl-name) (policy-declaration-name-p decl-name)) @@ -147,7 +148,7 @@ special variable declarations, as these have been extracted before." (cmp-env-extend-declaration 'alien (rest decl) env)) ((SI::C-LOCAL SI::C-GLOBAL SI::NO-CHECK-TYPE :READ-ONLY) env) - ((DYNAMIC-EXTENT IGNORABLE) + ((DYNAMIC-EXTENT IGNORABLE SI:FUNCTION-BLOCK-NAME) ;; FIXME! SOME ARE IGNORED! env) (otherwise