X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffop.lisp;h=6f8cb3b42e731489dc7e64d7f7a89954349bf517;hb=b8f63d9b4e978bec3bfc1f4fc471e5ed946781fd;hp=95227373edd024f3d73110ace677c8e1ebc269d8;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/fop.lisp b/src/code/fop.lisp index 9522737..6f8cb3b 100644 --- a/src/code/fop.lisp +++ b/src/code/fop.lisp @@ -2,9 +2,6 @@ (in-package "SB!IMPL") -(file-comment - "$Header$") - ;;; Define NAME as a fasl operation, with op-code FOP-CODE. PUSHP ;;; describes what the body does to the fop stack: ;;; :NOPE @@ -75,9 +72,10 @@ (macrolet ((clone-arg () '(read-arg 1))) (define-fop (,small-name ,small-code ,pushp) ,@forms)))) -;;; a helper function for reading string values from FASL files: sort of like -;;; READ-SEQUENCE specialized for files of (UNSIGNED-BYTE 8), with an automatic -;;; conversion from (UNSIGNED-BYTE 8) into CHARACTER for each element read +;;; a helper function for reading string values from FASL files: sort +;;; of like READ-SEQUENCE specialized for files of (UNSIGNED-BYTE 8), +;;; with an automatic conversion from (UNSIGNED-BYTE 8) into CHARACTER +;;; for each element read (declaim (ftype (function (stream simple-string &optional index) (values)) read-string-as-bytes)) (defun read-string-as-bytes (stream string &optional (length (length string))) (dotimes (i length) @@ -102,11 +100,12 @@ #!+sb-show (defvar *show-fop-nop4-p* nil) -;;; CMU CL had a single no-op fop, FOP-NOP, with fop code 0. Since 0 occurs -;;; disproportionately often in fasl files for other reasons, FOP-NOP is less -;;; than ideal for writing human-readable patterns into fasl files for -;;; debugging purposes. There's no shortage of unused fop codes, so we add this -;;; second NOP, which reads 4 arbitrary bytes and discards them. +;;; CMU CL had a single no-op fop, FOP-NOP, with fop code 0. Since 0 +;;; occurs disproportionately often in fasl files for other reasons, +;;; FOP-NOP is less than ideal for writing human-readable patterns +;;; into fasl files for debugging purposes. There's no shortage of +;;; unused fop codes, so we add this second NOP, which reads 4 +;;; arbitrary bytes and discards them. (define-fop (fop-nop4 137 :nope) (let ((arg (read-arg 4))) (declare (ignorable arg)) @@ -209,13 +208,15 @@ ,n-size ,n-package))))))))) - ;; Note: CMU CL had FOP-SYMBOL-SAVE and FOP-SMALL-SYMBOL-SAVE, but since they - ;; made the behavior of the fasloader depend on the *PACKAGE* variable, not - ;; only were they a pain to support (because they required various hacks to - ;; handle *PACKAGE*-manipulation forms) they were basically broken by design, - ;; because ANSI gives the user so much flexibility in manipulating *PACKAGE* - ;; at load-time that no reasonable hacks could possibly make things work - ;; right. The ones used in CMU CL certainly didn't, as shown by e.g. + ;; Note: CMU CL had FOP-SYMBOL-SAVE and FOP-SMALL-SYMBOL-SAVE, but + ;; since they made the behavior of the fasloader depend on the + ;; *PACKAGE* variable, not only were they a pain to support (because + ;; they required various hacks to handle *PACKAGE*-manipulation + ;; forms) they were basically broken by design, because ANSI gives + ;; the user so much flexibility in manipulating *PACKAGE* at + ;; load-time that no reasonable hacks could possibly make things + ;; work right. The ones used in CMU CL certainly didn't, as shown by + ;; e.g. ;; (IN-PACKAGE :CL-USER) ;; (DEFVAR CL::*FOO* 'FOO-VALUE) ;; (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) @@ -605,9 +606,9 @@ (sb!vm:sanctify-for-execution component) component)) -;;; This a no-op except in cold load. (In ordinary warm load, everything -;;; involved with function definition can be handled nicely by ordinary -;;; toplevel code.) +;;; This a no-op except in cold load. (In ordinary warm load, +;;; everything involved with function definition can be handled nicely +;;; by ordinary toplevel code.) (define-fop (fop-fset 74 nil) (pop-stack) (pop-stack))