0.8.21.21: fix & share EXTERN-ALIEN-NAME logic (fixes bug #373)
[sbcl.git] / src / compiler / ppc / vm.lisp
index c52ddfe..1a7c61b 100644 (file)
       (non-descriptor-stack (format nil "NS~D" offset))
       (constant (format nil "Const~D" offset))
       (immediate-constant "Immed"))))
-\f
-;;; The loader uses this to convert alien names to the form they
-;;; occur in the symbol table.
-
-(defun extern-alien-name (name)
-  (declare (type string name))
-  ;; Darwin is non-ELF, and needs a _ prefix. The other (ELF) ports
-  ;; currently don't need any prefix.
-  (flet ((maybe-prefix (name)
-            #!+darwin (concatenate 'simple-base-string "_" name)
-            #!-darwin name))
-    (typecase name
-      (simple-base-string (maybe-prefix name))
-      (base-string (coerce (maybe-prefix name) 'simple-base-string))
-      (t
-       (handler-case (coerce (maybe-prefix name) 'simple-base-string)
-        (type-error ()
-          (error "invalid external alien name: ~S" name)))))))
+