diff --git a/src/c/stacks.d b/src/c/stacks.d index 055c22401..623467307 100644 --- a/src/c/stacks.d +++ b/src/c/stacks.d @@ -941,7 +941,7 @@ si_ihs_fun(cl_object arg) } cl_object -si_ihs_env(cl_object arg) +si_ihs_lex(cl_object arg) { cl_env_ptr env = ecl_process_env(); ecl_return1(env, get_ihs_ptr(ecl_to_size(arg))->lex_env); @@ -954,6 +954,14 @@ si_ihs_lcl(cl_object arg) ecl_return1(env, get_ihs_ptr(ecl_to_size(arg))->lcl_env); } +/* DEPRECATED backward compatibility with SWANK/SLYNK. --jd 2025-11-17 */ +cl_object +si_ihs_env(cl_object arg) +{ + cl_env_ptr env = ecl_process_env(); + ecl_return1(env, get_ihs_ptr(ecl_to_size(arg))->lcl_env); +} + /* -- General purpose stack implementation ----------------------------------- */ /* Stacks are based on actually adjustable simple vectors. */ diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index 89c1f97f2..8a1e5bb0d 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -1215,6 +1215,7 @@ cl_symbols[] = { {SYS_ "HASH-TABLE-ITERATOR" ECL_FUN("si_hash_table_iterator", si_hash_table_iterator, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "IHS-BDS" ECL_FUN("si_ihs_bds", si_ihs_bds, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "IHS-ENV" ECL_FUN("si_ihs_env", si_ihs_env, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, +{SYS_ "IHS-LEX" ECL_FUN("si_ihs_lex", si_ihs_lex, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "IHS-LCL" ECL_FUN("si_ihs_lcl", si_ihs_lcl, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "IHS-FUN" ECL_FUN("si_ihs_fun", si_ihs_fun, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, {SYS_ "IHS-NEXT" ECL_FUN("si_ihs_next", si_ihs_next, 1) ECL_VAR(SI_ORDINARY, OBJNULL)}, diff --git a/src/cmp/proclamations.lsp b/src/cmp/proclamations.lsp index 382d831d6..c8b7e08e0 100644 --- a/src/cmp/proclamations.lsp +++ b/src/cmp/proclamations.lsp @@ -299,6 +299,7 @@ (proclamation si:ihs-top () si::index) (proclamation si:ihs-fun (si::index) (or null function-designator)) (proclamation si:ihs-env (si::index) (or null vector)) +(proclamation si:ihs-lex (si::index) (or null vector)) (proclamation si:ihs-lcl (si::index) (or null vector si::frame)) (proclamation si:frs-top () si::index) (proclamation si:frs-bds (si::index) si::index) diff --git a/src/h/external.h b/src/h/external.h index 08d228af1..ffe69e090 100755 --- a/src/h/external.h +++ b/src/h/external.h @@ -1649,6 +1649,7 @@ extern ECL_API __m128d ecl_unbox_double_sse_pack(cl_object value); extern ECL_API cl_object si_ihs_top(void); extern ECL_API cl_object si_ihs_fun(cl_object arg); extern ECL_API cl_object si_ihs_env(cl_object arg); +extern ECL_API cl_object si_ihs_lex(cl_object arg); extern ECL_API cl_object si_ihs_lcl(cl_object arg); extern ECL_API cl_object si_ihs_bds(cl_object arg); extern ECL_API cl_object si_ihs_next(cl_object arg); diff --git a/src/lsp/top.lsp b/src/lsp/top.lsp index a5e56e03c..9c0021cfa 100644 --- a/src/lsp/top.lsp +++ b/src/lsp/top.lsp @@ -1213,7 +1213,7 @@ Use special code 0 to cancel this operation.") (set-break-env)) (defun set-break-env () - (setq *break-lexenv* (ihs-env *ihs-current*)) + (setq *break-lexenv* (ihs-lex *ihs-current*)) (setq *break-locals* (ihs-lcl *ihs-current*))) (defun ihs-search (string unrestricted &optional (start (si::ihs-top))) @@ -1310,7 +1310,8 @@ 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-FUN i) Returns the function of the i-th entity in IHS. -(SYS:IHS-ENV i) +(SYS:IHS-LEX i) Returns the lexical environment of the i-th entry in IHS. +(SYS:IHS-LCL i) Returns the local environment of the i-th entry in IHS. (SYS:IHS-PREV i) (SYS:IHS-NEXT i)