0.8.13.49
[sbcl.git] / src / code / load.lisp
index 02a0293..c4f1131 100644 (file)
 #!+sb-show
 (defvar *show-fops-p* nil)
 
+;; buffer for loading symbols
+(defvar *fasl-symbol-buffer*)
+(declaim (simple-string *fasl-symbol-buffer*))
+
+;;; 
 ;;; a helper function for LOAD-AS-FASL
 ;;;
 ;;; Return true if we successfully load a group from the stream, or
        (loop
          (let ((byte (read-byte stream)))
 
-           ;; stale code from before rewrite of *FOP-STACK* as
-           ;; adjustable vector (probably worth rewriting when next
-           ;; anyone needs to debug FASL stuff)
-           #|
            ;; Do some debugging output.
            #!+sb-show
            (when *show-fops-p*
-             (let ((ptr *fop-stack-pointer*)
-                   (stack *fop-stack*))
-               (fresh-line *trace-output*)
-               ;; The FOP operations are stack based, so it's sorta
-               ;; logical to display the operand before the operator.
-               ;; ("reverse Polish notation")
-               (unless (= ptr (length stack))
-                 (write-char #\space *trace-output*)
-                 (prin1 (svref stack ptr) *trace-output*)
-                 (terpri *trace-output*))
-               ;; Display the operator.
-               (format *trace-output*
-                       "~&~S (#X~X at ~D) (~S)~%"
-                       (svref *fop-names* byte)
-                       byte
-                       (1- (file-position stream))
-                       (svref *fop-funs* byte))))
-            |#
+              (let* ((stack *fop-stack*)
+                     (ptr (1- (fill-pointer *fop-stack*))))
+                (fresh-line *trace-output*)
+                ;; The FOP operations are stack based, so it's sorta
+                ;; logical to display the operand before the operator.
+                ;; ("reverse Polish notation")
+                (unless (= ptr -1)
+                  (write-char #\space *trace-output*)
+                  (prin1 (aref stack ptr) *trace-output*)
+                  (terpri *trace-output*))
+                ;; Display the operator.
+                (format *trace-output*
+                        "~&~S (#X~X at ~D) (~S)~%"
+                        (aref *fop-names* byte)
+                        byte
+                        (1- (file-position stream))
+                        (svref *fop-funs* byte))))
 
            ;; Actually execute the fop.
            (funcall (the function (svref *fop-funs* byte)))))))))
   (maybe-announce-load stream verbose)
   (sb!thread:with-recursive-lock (sb!c::*big-compiler-lock*)
     (let* ((*fasl-input-stream* stream)
+           (*fasl-symbol-buffer* (make-string 100))
           (*current-fop-table* (or (pop *free-fop-tables*) (make-array 1000)))
           (*current-fop-table-size* (length *current-fop-table*))
           (*fop-stack* (make-array 100 :fill-pointer 0 :adjustable t)))
 ;;; code for foreign symbol lookup should be here.
 (defun find-foreign-symbol-in-table (name table)
   (let ((prefixes
-         #!+(or osf1 sunos linux freebsd darwin) #("" "ldso_stub__")
+         #!+(or osf1 sunos linux freebsd netbsd darwin) #("" "ldso_stub__")
         #!+openbsd #("")))
     (declare (notinline some)) ; to suppress bug 117 bogowarning
     (some (lambda (prefix)