Changeset 15038


Ignore:
Timestamp:
Oct 24, 2011, 11:07:24 AM (8 years ago)
Author:
gb
Message:

Add VAR-LOCAL-BITS slot to VAR istruct; tracks local (per function,
if inherited) var attributes. Define some bits which can be set
in this slot (not all of which are implemented yet.)

Add $fbittailcallsself afunc bit.

Move DEFNX1 macro elsewhere.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/nxenv.lisp

    r14983 r15038  
    4545  var-root-nsetqs                       ; setq count of root var
    4646  var-initform                          ; initial value acode or NIL.
     47  var-local-bits
    4748)
    4849
     50(defconstant $vlocalbitiveacrosscall 0) ;
     51(defconstant $vlocalbitargument 1)
     52(defconstant $vlocalbitregisterarg 2)   ;
    4953(defconstant $vbittemporary 16)    ; a compiler temporary
    5054(defconstant $vbitreg 17)          ; really wants to live in a register.
     
    398402  `(nx1-default-operator))
    399403
    400 (defmacro defnx1 (name sym arglist &body forms)
    401   (let ((fn `(nfunction ,name ,(parse-macro name arglist forms)))
    402         (theprogn ())
    403         (ysym (gensym)))
    404     `(let ((,ysym ,fn))
    405        ,(if (symbolp sym)
    406           `(progn
    407              (setf (gethash ',sym *nx1-alphatizers*) ,ysym)
    408              ;(proclaim '(inline ,sym))
    409              (pushnew ',sym *nx1-compiler-special-forms*))
    410           (dolist (x sym `(progn ,@(nreverse theprogn)))
    411             (if (consp x)
    412               (setq x (%car x))
    413               (push `(pushnew ',x *nx1-compiler-special-forms*) theprogn))
    414             ;(push `(proclaim '(inline ,x)) theprogn)
    415             (push `(setf (gethash ',x *nx1-alphatizers*) ,ysym) theprogn)))
    416        (record-source-file ',name 'function)
    417        ,ysym)))
     404
    418405
    419406(defmacro next-nx-num-ops ()
     
    445432(defconstant $fbitnonnullenv 9)
    446433(defconstant $fbitccoverage 10)
     434(defconstant $fbittailcallsself 11)
    447435
    448436(defconstant $eaclosedbit 24)
     
    476464  `(%temp-list ,operator ,@args))
    477465
    478 (defmacro make-acode* (operator &rest args)
    479   `(%temp-cons ,operator (mapcar #'nx1-form ,@args)))
    480466
    481467; More Bootstrapping Shit.
     
    518504(eval-when (:compile-toplevel :load-toplevel :execute)
    519505
    520 (declaim (inline
    521           nx-decl-set-fbit
    522           nx-adjust-setq-count
    523           nx-init-var
    524           ))
     506
    525507
    526508(defun nx-init-var (state node)
     
    576558    (when catchp
    577559      (nx-set-var-bits var (%ilogior2 bits (%ilsl $vbitnoreg 1))))
    578     (setf (var-refs var) new)
     560    (setf (var-refs var) new)   
    579561    new))
    580562
Note: See TracChangeset for help on using the changeset viewer.