mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
fix rtl program arity functions
* libguile/programs.c (parse_arity): Lookup rtl-program-minimum-arity from (system vm debug). * module/system/vm/debug.scm (find-first-arity): Fix the linear search. Whoops!
This commit is contained in:
parent
f82f62944a
commit
081cf91029
2 changed files with 4 additions and 4 deletions
|
@ -482,7 +482,7 @@ scm_i_rtl_program_minimum_arity (SCM program, int *req, int *opt, int *rest)
|
||||||
|
|
||||||
if (scm_is_false (rtl_program_minimum_arity) && scm_module_system_booted_p)
|
if (scm_is_false (rtl_program_minimum_arity) && scm_module_system_booted_p)
|
||||||
rtl_program_minimum_arity =
|
rtl_program_minimum_arity =
|
||||||
scm_c_private_variable ("system vm debug",
|
scm_c_private_variable ("system vm program",
|
||||||
"rtl-program-minimum-arity");
|
"rtl-program-minimum-arity");
|
||||||
|
|
||||||
l = scm_call_1 (scm_variable_ref (rtl_program_minimum_arity), program);
|
l = scm_call_1 (scm_variable_ref (rtl_program_minimum_arity), program);
|
||||||
|
|
|
@ -292,10 +292,10 @@ section of the ELF image. Returns an ELF symbol, or @code{#f}."
|
||||||
(let lp ((pos headers-start))
|
(let lp ((pos headers-start))
|
||||||
(cond
|
(cond
|
||||||
((>= pos headers-end) #f)
|
((>= pos headers-end) #f)
|
||||||
((< text-offset (arity-low-pc* bv pos))
|
((< text-offset (* (arity-low-pc* bv pos) 4))
|
||||||
(lp (+ pos arity-header-len)))
|
|
||||||
((< (arity-high-pc* bv pos) text-offset)
|
|
||||||
#f)
|
#f)
|
||||||
|
((<= (* (arity-high-pc* bv pos) 4) text-offset)
|
||||||
|
(lp (+ pos arity-header-len)))
|
||||||
(else
|
(else
|
||||||
(make-arity context base pos))))))
|
(make-arity context base pos))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue