Changeset 12101


Ignore:
Timestamp:
08/13/09 20:51:43 (12 years ago)
Author:
ehuelsmann
Message:

Convert CATCH and SYNCHRONIZED-ON block-nodes to
CATCH-NODEs and SYNCHRONIZED-NODEs respectively.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r12100 r12101  
    295295  (let* ((tag (p1 (cadr form)))
    296296         (body (cddr form))
    297          (block (make-block-node '(CATCH)))
     297         (block (make-catch-node))
    298298         ;; our subform processors need to know
    299299         ;; they're enclosed in a CATCH block
     
    312312    (push tag result)
    313313    (push 'CATCH result)
    314     (setf (block-form block) result)
     314    (setf (catch-form block) result)
    315315    block))
    316316
     
    318318  (let* ((synchronized-object (p1 (cadr form)))
    319319         (body (cddr form))
    320          (block (make-block-node '(THREADS:SYNCHRONIZED-ON)))
     320         (block (make-synchronized-node))
    321321         (*blocks* (cons block *blocks*))
    322322         result)
     
    326326        (when (memq op '(GO RETURN-FROM THROW))
    327327          (return))))
    328     (setf (block-form block)
     328    (setf (synchronized-form block)
    329329          (list* 'threads:synchronized-on synchronized-object
    330330                 (nreverse result)))
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12100 r12101  
    76827682(defknown p2-threads-synchronized-on (t t) t)
    76837683(defun p2-threads-synchronized-on (block target)
    7684   (let* ((form (block-form block))
     7684  (let* ((form (synchronized-form block))
    76857685         (*register* *register*)
    76867686         (object-register (allocate-register))
     
    76957695    (emit 'monitorenter)
    76967696    (label BEGIN-PROTECTED-RANGE)
    7697     (compile-progn-body (cddr form) target)
     7697    (let ((*blocks* (cons block *blocks*)))
     7698      (compile-progn-body (cddr form) target))
    76987699    (emit 'goto EXIT)
    76997700    (label END-PROTECTED-RANGE)
     
    77137714(defknown p2-catch-node (t t) t)
    77147715(defun p2-catch-node (block target)
    7715   (let ((form (block-form block)))
     7716  (let ((form (catch-form block)))
    77167717    (when (= (length form) 2) ; (catch 'foo)
    77177718      (when target
     
    79487949           ((progv-node-p form)
    79497950            (p2-progv-node form target representation))
     7951           ((synchronized-node-p form)
     7952            (p2-threads-synchronized-on form target)
     7953            (fix-boxing representation nil))
    79507954))
    79517955        ((constantp form)
  • trunk/abcl/src/org/armedbear/lisp/jvm.lisp

    r12100 r12101  
    482482  (or (unwind-protect-node-p object)
    483483      (catch-node-p object)
     484      (synchronized-node-p object)
    484485      (and (block-node-p object)
    485486           (equal (block-name object) '(THREADS:SYNCHRONIZED-ON)))))
Note: See TracChangeset for help on using the changeset viewer.