Changeset 11828 for trunk/abcl/src/org
- Timestamp:
- 05/03/09 21:43:08 (15 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
r11825 r11828 337 337 (*blocks* (cons block *blocks*)) 338 338 (*visible-tags* *visible-tags*) 339 (local-tags '()) 339 340 (body (cdr form))) 340 341 ;; Make all the tags visible before processing the body forms. … … 342 343 (when (or (symbolp subform) (integerp subform)) 343 344 (let* ((tag (make-tag :name subform :label (gensym) :block block))) 345 (push tag local-tags) 344 346 (push tag *visible-tags*)))) 345 347 (let ((new-body '()) … … 348 350 (cond ((or (symbolp subform) (integerp subform)) 349 351 (push subform new-body) 352 (push (find subform local-tags :key #'tag-name :test #'eql) 353 (block-tags block)) 350 354 (setf live t)) 351 355 ((not live) … … 368 372 (unless tag 369 373 (error "p1-go: tag not found: ~S" name)) 374 (setf (tag-used tag) t) 370 375 (let ((tag-block (tag-block tag))) 371 376 (cond ((eq (tag-compiland tag) *current-compiland*) -
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11827 r11828 4431 4431 (form (block-form block)) 4432 4432 (body (cdr form)) 4433 (local-tags ())4434 4433 (BEGIN-BLOCK (gensym)) 4435 4434 (END-BLOCK (gensym)) … … 4441 4440 (block-environment-register block) environment-register)) 4442 4441 ;; Scan for tags. 4443 (dolist (subform body) 4444 (when (or (symbolp subform) (integerp subform)) 4445 (let* ((tag (make-tag :name subform :label (gensym) :block block))) 4446 (push tag local-tags) 4447 (push tag *visible-tags*)))) 4442 (dolist (tag (block-tags block)) 4443 (push tag *visible-tags*)) 4448 4444 4449 4445 (when environment-register … … 4466 4462 ((null rest)) 4467 4463 (cond ((or (symbolp subform) (integerp subform)) 4468 (let ((tag (find-tag subform))) 4464 (let ((tag (find subform (block-tags block) :key #'tag-name 4465 :test #'eql))) 4469 4466 (unless tag 4470 4467 (error "COMPILE-TAGBODY: tag not found: ~S~%" subform)) 4471 (label (tag-label tag)))) 4468 (when (tag-used tag) 4469 (label (tag-label tag))))) 4472 4470 (t 4473 4471 (compile-form subform nil nil) … … 4493 4491 (emit 'getfield +lisp-go-class+ "tag" +lisp-object+) ; Stack depth is still 1. 4494 4492 (astore tag-register) 4495 (dolist (tag local-tags) 4493 ;; Don't actually generate comparisons for tags 4494 ;; to which there is no GO instruction 4495 (dolist (tag (remove-if-not #'tag-used (block-tags block))) 4496 4496 (let ((NEXT (gensym))) 4497 4497 (aload tag-register) -
trunk/abcl/src/org/armedbear/lisp/jvm.lisp
r11826 r11828 371 371 vars 372 372 free-specials 373 ;; Only used in TAGBODY 374 tags 373 375 ) 374 376 … … 432 434 ;; The associated TAGBODY 433 435 block 434 (compiland *current-compiland*)) 436 (compiland *current-compiland*) 437 used) 435 438 436 439 (defknown find-tag (t) t)
Note: See TracChangeset
for help on using the changeset viewer.