1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

static-patch! replaces link-procedure!

* libguile/vm-engine.c (static-patch!): Replace link-procedure! with
  this more versatile primitive.
* module/system/vm/assembler.scm (intern-constant): Emit static-patch!
  for static procedures and for strings.
* module/system/vm/disassembler.scm (code-annotation): Remove annotation
  for link-procedure!.  There can be no annotation for static-patch!, as
  neither operand is guaranteed to be a SCM value.
This commit is contained in:
Andy Wingo 2013-10-31 09:44:59 +01:00
parent 11eff82685
commit 2ab2a10d50
3 changed files with 18 additions and 24 deletions

View file

@ -254,13 +254,6 @@ address of that offset."
(list "~A" (builtin-index->name idx)))
(((or 'static-ref 'static-set!) _ target)
(list "~@Y" (dereference-scm target)))
(('link-procedure! src target)
(let* ((addr (u32-offset->addr (+ offset target) context))
(pdi (find-program-debug-info addr context)))
(list "~A at 0x~X"
(or (and pdi (program-debug-info-name pdi))
"(anonymous procedure)")
addr)))
(('resolve-module dst name public)
(list "~a" (if (zero? public) "private" "public")))
(('toplevel-box _ var-offset mod-offset sym-offset bound?)