X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fbyte-comp.lisp;h=196ae9bd2cb3f2468b409f5b40b5bae306d4cceb;hb=993d5b779638756473181dda8d928d33038d4cc3;hp=eb718e5a0b8532b079eaafe8f74f812cfcf01a00;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/compiler/byte-comp.lisp b/src/compiler/byte-comp.lisp index eb718e5..196ae9b 100644 --- a/src/compiler/byte-comp.lisp +++ b/src/compiler/byte-comp.lisp @@ -13,7 +13,9 @@ (in-package "SB!C") ;;;; the fasl file format that we use -(defconstant byte-fasl-file-version 1) +(defconstant byte-fasl-file-version 2) +;;; 1 = before about sbcl-0.6.9.8 +;;; 2 = merged package SB-CONDITIONS into SB-KERNEL around sbcl-0.6.9.8 ;;; ### remaining work: ;;; @@ -853,29 +855,31 @@ (defvar *byte-component-info*) -(eval-when (#+sb-xc :compile-toplevel :load-toplevel :execute) - (defconstant byte-push-local #b00000000) - (defconstant byte-push-arg #b00010000) - (defconstant byte-push-constant #b00100000) - (defconstant byte-push-system-constant #b00110000) - (defconstant byte-push-int #b01000000) - (defconstant byte-push-neg-int #b01010000) - (defconstant byte-pop-local #b01100000) - (defconstant byte-pop-n #b01110000) - (defconstant byte-call #b10000000) - (defconstant byte-tail-call #b10010000) - (defconstant byte-multiple-call #b10100000) - (defconstant byte-named #b00001000) - (defconstant byte-local-call #b10110000) - (defconstant byte-local-tail-call #b10111000) - (defconstant byte-local-multiple-call #b11000000) - (defconstant byte-return #b11001000) - (defconstant byte-branch-always #b11010000) - (defconstant byte-branch-if-true #b11010010) - (defconstant byte-branch-if-false #b11010100) - (defconstant byte-branch-if-eq #b11010110) - (defconstant byte-xop #b11011000) - (defconstant byte-inline-function #b11100000)) +;;; FIXME: These might as well be generated with DEFENUM, right? +;;; It would also be nice to give them less ambiguous names, perhaps +;;; with a "BYTEOP-" prefix instead of "BYTE-". +(defconstant byte-push-local #b00000000) +(defconstant byte-push-arg #b00010000) +(defconstant byte-push-constant #b00100000) +(defconstant byte-push-system-constant #b00110000) +(defconstant byte-push-int #b01000000) +(defconstant byte-push-neg-int #b01010000) +(defconstant byte-pop-local #b01100000) +(defconstant byte-pop-n #b01110000) +(defconstant byte-call #b10000000) +(defconstant byte-tail-call #b10010000) +(defconstant byte-multiple-call #b10100000) +(defconstant byte-named #b00001000) +(defconstant byte-local-call #b10110000) +(defconstant byte-local-tail-call #b10111000) +(defconstant byte-local-multiple-call #b11000000) +(defconstant byte-return #b11001000) +(defconstant byte-branch-always #b11010000) +(defconstant byte-branch-if-true #b11010010) +(defconstant byte-branch-if-false #b11010100) +(defconstant byte-branch-if-eq #b11010110) +(defconstant byte-xop #b11011000) +(defconstant byte-inline-function #b11100000) (defun output-push-int (segment int) (declare (type sb!assem:segment segment) @@ -1219,7 +1223,11 @@ (t (etypecase leaf (constant - (output-push-constant-leaf segment leaf)) + (cond ((legal-immediate-constant-p leaf) + (output-push-constant-leaf segment leaf)) + (t + (output-push-constant segment (leaf-name leaf)) + (output-do-inline-function segment 'symbol-value)))) (clambda (let* ((refered-env (lambda-environment leaf)) (closure (environment-closure refered-env)))