X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fvop.lisp;h=ae18a61183fca96fff76fe8afd8872c3924384b6;hb=8e4ec430504f0f563280be26034af590dff50d34;hp=4b0366072bd02cdba01255e6fc859f11676779bb;hpb=cb83aa22932bf4b9bc74ac6f0fcd91db1702ad33;p=sbcl.git diff --git a/src/compiler/vop.lisp b/src/compiler/vop.lisp index 4b03660..ae18a61 100644 --- a/src/compiler/vop.lisp +++ b/src/compiler/vop.lisp @@ -167,6 +167,11 @@ ;; the assembler label that points to the beginning of the code for ;; this block, or NIL when we haven't assigned a label yet (%label nil) + ;; the assembler label that points to the trampoline for this block, + ;; or NIL if unassigned yet. Only meaningful for local call targets. + (%trampoline-label nil) + ;; T if the preceding block assumes it can drop thru to %label + (dropped-thru-to nil) ;; list of LOCATION-INFO structures describing all the interesting ;; (to the debugger) locations in this block (locations nil :type list)) @@ -239,10 +244,6 @@ ;; SC and OFFSET are already filled in. ;; ;; CONSTANT-TNs are non-packed TNs that represent constants. - ;; :CONSTANT TNs may eventually be converted to :CACHED-CONSTANT - ;; normal TNs. - ;; - ;; FIXME: What is :CACHED-CONSTANT? (normal-tns nil :type (or tn null)) (restricted-tns nil :type (or tn null)) (wired-tns nil :type (or tn null)) @@ -328,8 +329,8 @@ ;; a function type specifier representing the arguments and results ;; of this function (type 'function :type (or list (member function))) - ;; xref information for the XEP - (xref nil :type (or null simple-vector))) + ;; docstring and/or xref information for the XEP + (info nil :type (or null simple-vector string (cons string simple-vector)))) ;;; An IR2-PHYSENV is used to annotate non-LET LAMBDAs with their ;;; passing locations. It is stored in the PHYSENV-INFO. @@ -434,7 +435,7 @@ ;; ;; :STRANGE ;; A segment of a "strange loop" in a non-reducible flow graph. - (kind (required-argument) :type (member :outer :natural :strange)) + (kind (missing-arg) :type (member :outer :natural :strange)) ;; The first and last blocks in the loop. There may be more than one tail, ;; since there may be multiple back branches to the same head. (head nil :type (or cblock null)) @@ -450,7 +451,9 @@ (depth 0 :type fixnum) ;; The head of the list of blocks directly within this loop. We must recurse ;; on INFERIORS to find all the blocks. - (blocks nil :type (or null cblock))) + (blocks nil :type (or null cblock)) + ;; Backend saves the first emitted block of each loop here. + (info nil)) (defprinter (cloop :conc-name loop-) kind @@ -561,8 +564,12 @@ ;; conditional that yields its result as a control transfer. The ;; emit function takes two info arguments: the target label and a ;; boolean flag indicating whether to negate the sense of the test. + ;; + ;; If RESULT-TYPES is a cons whose car is :CONDITIONAL, then this is + ;; a flag-setting VOP. The rest is a list of condition descriptors to + ;; be interpreted by the BRANCH-IF VOP (see $ARCH/pred.lisp). (arg-types nil :type list) - (result-types nil :type (or list (member :conditional))) + (result-types nil :type (or list (member :conditional) (cons (eql :conditional)))) ;; the primitive type restriction applied to each extra argument or ;; result following the fixed operands. If NIL, no extra ;; args/results are allowed. Otherwise, either * or a (:OR ...) list @@ -588,20 +595,7 @@ ;; the number of trailing arguments to VOP or %PRIMITIVE that we ;; bundle into a list and pass into the emit function. This provides ;; a way to pass uninterpreted stuff directly to the code generator. - (info-arg-count 0 :type index) - ;; a function that emits the VOPs for this template. Arguments: - ;; 1] Node for source context. - ;; 2] IR2-BLOCK that we place the VOP in. - ;; 3] This structure. - ;; 4] Head of argument TN-REF list. - ;; 5] Head of result TN-REF list. - ;; 6] If INFO-ARG-COUNT is non-zero, then a list of the magic - ;; arguments. - ;; - ;; Two values are returned: the first and last VOP emitted. This vop - ;; sequence must be linked into the VOP Next/Prev chain for the - ;; block. At least one VOP is always emitted. - (emit-function (missing-arg) :type function)) + (info-arg-count 0 :type index)) (defprinter (template) name arg-types @@ -688,7 +682,7 @@ ;; counts as one, and all the more args/results together count as 1. (num-args 0 :type index) (num-results 0 :type index) - ;; a vector of the temporaries the vop needs. See EMIT-GENERIC-VOP + ;; a vector of the temporaries the vop needs. See EMIT-VOP ;; in vmdef for information on how the temps are encoded. (temps nil :type (or null (specializable-vector (unsigned-byte 16)))) ;; the order all the refs for this vop should be put in. Each @@ -758,6 +752,12 @@ ;;; A FINITE-SB holds information needed by the packing algorithm for ;;; finite SBs. (def!struct (finite-sb (:include sb)) + ;; the minimum number of location by which to grow this SB + ;; if it is :unbounded + (size-increment 1 :type index) + ;; current-size must always be a multiple of this. It is assumed + ;; to be a power of two. + (size-alignment 1 :type index) ;; the number of locations currently allocated in this SB (current-size 0 :type index) ;; the last location packed in, used by pack to scatter TNs to @@ -848,6 +848,7 @@ ;; true if this SC or one of its alternates in in the NUMBER-STACK SB. (number-stack-p nil :type boolean) ;; alignment restriction. The offset must be an even multiple of this. + ;; this must be a power of two. (alignment 1 :type (and index (integer 1))) ;; a list of locations that we avoid packing in during normal ;; register allocation to ensure that these locations will be free @@ -887,7 +888,7 @@ ;; :SAVE-ONCE ;; A TN used for saving a :NORMAL TN across function calls. The ;; lifetime information slots are unitialized: get the original - ;; TN our of the SAVE-TN slot and use it for conflicts. SAVE-ONCE + ;; TN out of the SAVE-TN slot and use it for conflicts. SAVE-ONCE ;; is like :SAVE, except that it is only save once at the single ;; writer of the original TN. ;; @@ -982,7 +983,7 @@ ;;; The GLOBAL-CONFLICTS structure represents the conflicts for global ;;; TNs. Each global TN has a list of these structures, one for each -;;; block that it is live in. In addition to repsenting the result of +;;; block that it is live in. In addition to representing the result of ;;; lifetime analysis, the global conflicts structure is used during ;;; lifetime analysis to represent the set of TNs live at the start of ;;; the IR2 block.