0.9.2.26: refactoring internals of foreign linkage
[sbcl.git] / src / compiler / generic / core.lisp
index 890263e..f5b58ef 100644 (file)
                         (error "undefined assembler routine: ~S" name)))
                    (:foreign
                     (aver (stringp name))
-                    ;; FOREIGN-SYMBOL-ADDRESS-AS-INTEGER signals an error
+                    ;; FOREIGN-SYMBOL-ADDRESS signals an error
                     ;; if the symbol isn't found.
-                    (foreign-symbol-address-as-integer name))
+                    (foreign-symbol-address name))
                    #!+linkage-table
                    (:foreign-dataref
                     (aver (stringp name))
-                    (foreign-symbol-address-as-integer name t))
+                    (foreign-symbol-address name t))
                    #!+(or x86 x86-64)
                    (:code-object
                     (aver (null name))
               (error "Unresolved forward reference."))))
 
 ;;; Backpatch all the DEBUG-INFOs dumped so far with the specified
-;;; SOURCE-INFO list. We also check that there are no outstanding forward
-;;; references to functions.
-(defun fix-core-source-info (info object &optional source-info)
-  (declare (type source-info info) (type core-object object))
+;;; SOURCE-INFO list. We also check that there are no outstanding
+;;; forward references to functions.
+(defun fix-core-source-info (info object &optional function)
+  (declare (type core-object object)
+          (type (or null function) function))
   (aver (zerop (hash-table-count (core-object-patch-table object))))
-  (let ((res (debug-source-for-info info)))
-    (dolist (sinfo res)
-      (setf (debug-source-info sinfo) source-info))
+  (let ((source (debug-source-for-info info)))
+    (setf (debug-source-function source) function)
     (dolist (info (core-object-debug-info object))
-      (setf (compiled-debug-info-source info) res))
-    (setf (core-object-debug-info object) ()))
+      (setf (debug-info-source info) source)))
+  (setf (core-object-debug-info object) nil)
   (values))