Changeset 12093


Ignore:
Timestamp:
08/11/09 11:41:01 (12 years ago)
Author:
ehuelsmann
Message:

Introduce a structure-class hierarchy for nodes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r12092 r12093  
    368368  (compiland *current-compiland*))
    369369
     370;; control-transferring blocks: TAGBODY, CATCH, to do: BLOCK
     371
     372(defstruct (control-transferring-node (:include node))
     373  ;; If non-nil, the TAGBODY contains local blocks which "contaminate" the
     374  ;; environment, with GO forms in them which target tags in this TAGBODY
     375  ;; Non-nil if and only if the block doesn't modify the environment
     376  needs-environment-restoration
     377  )
     378
     379(defstruct (tagbody-node (:conc-name tagbody-)
     380                         (:include control-transferring-node))
     381  ;; True if a tag in this tagbody is the target of a non-local GO.
     382  non-local-go-p
     383  tags)
     384
     385(defstruct (catch-node (:conc-name catch-)
     386                       (:include control-transferring-node))
     387  ;; fixme? tag gotten from the catch-form
     388  )
     389
     390;; block-node belongs here; it's down below for historical raisins
     391
     392;; binding blocks: LET, LET*, FLET, LABELS, M-V-B, PROGV, LOCALLY
     393
     394(defstruct (binding-node (:include node))
     395  ;; If non-nil, register containing saved dynamic environment for this block.
     396  environment-register
     397  ;; Not used for LOCALLY, FLET, LABELS
     398  vars
     399  free-specials)
     400
     401(defstruct (let/let*-node (:conc-name let-)
     402                          (:include binding-node)))
     403
     404(defstruct (flet-node (:conc-name flet-)
     405                      (:include binding-node)))
     406
     407(defstruct (labels-node (:conc-name labels-)
     408                        (:include binding-node)))
     409
     410(defstruct (m-v-b-node (:conc-name m-v-b-)
     411                       (:include binding-node)))
     412
     413(defstruct (progv-node (:conc-name progv-)
     414                       (:include binding-node)))
     415
     416(defstruct (locally-node (:conc-name locally-)
     417                         (:include binding-node)))
     418
     419;; blocks requiring non-local exits: UNWIND-PROTECT, SYS:SYNCHRONIZED-ON
     420
     421(defstruct (protected-node (:include node)))
     422
     423(defstruct (unwind-protect-node (:conc-name unwind-protect-)
     424                                (:include protected-node)))
     425
     426(defstruct (synchronized-node (:conc-name synchronized-)
     427                              (:include protected-node)))
     428
     429
    370430;; Used to wrap TAGBODYs, UNWIND-PROTECTs and LET/LET*/M-V-B forms as well as
    371431;; BLOCKs per se.
    372432(defstruct (block-node (:conc-name block-)
    373                        (:include node)
     433                       (:include control-transferring-node)
    374434                       (:constructor %make-block-node (name)))
    375435  (exit (gensym))
     
    382442  ;; True if a tag in this tagbody is the target of a non-local GO.
    383443  non-local-go-p
    384   ;; If non-nil, the TAGBODY contains local blocks which "contaminate" the
    385   ;; environment, with GO forms in them which target tags in this TAGBODY
    386   ;; Non-nil if and only if the block doesn't modify the environment
    387   needs-environment-restoration
    388444  ;; If non-nil, register containing saved dynamic environment for this block.
    389445  environment-register
Note: See TracChangeset for help on using the changeset viewer.