Changeset 12877
- Timestamp:
- 08/08/10 13:16:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generic-class-file/abcl/src/org/armedbear/lisp/jvm-instructions.lisp
r12876 r12877 734 734 (declare (type vector code)) 735 735 (dotimes (i code-length) 736 (declare (type (unsigned-byte 16) i))737 736 (let* ((instruction (aref code i)) 738 737 (opcode (instruction-opcode instruction))) … … 763 762 (declare (type fixnum max-stack)) 764 763 (dotimes (i code-length) 765 (declare (type (unsigned-byte 16) i))766 764 (let* ((instruction (aref code i)) 767 765 (instruction-depth (instruction-depth instruction))) … … 772 770 773 771 (defun delete-unused-labels (code handler-labels) 772 (declare (optimize speed)) 774 773 (let ((code (coerce code 'vector)) 775 774 (changed nil) … … 777 776 ;; Mark the labels that are actually branched to. 778 777 (dotimes (i (length code)) 779 (declare (type (unsigned-byte 16) i))780 778 (let ((instruction (aref code i))) 781 779 (when (branch-p (instruction-opcode instruction)) … … 787 785 ;; Remove labels that are not used as branch targets. 788 786 (dotimes (i (length code)) 789 (declare (type (unsigned-byte 16) i))790 787 (let ((instruction (aref code i))) 791 788 (when (= (instruction-opcode instruction) 202) ; LABEL … … 800 797 (defun delete-unreachable-code (code) 801 798 ;; Look for unreachable code after GOTO. 799 (declare (optimize speed)) 802 800 (let* ((code (coerce code 'vector)) 803 801 (changed nil) … … 826 824 (pending-labels '())) 827 825 (dotimes (i (length code)) 828 (declare (type (unsigned-byte 16) i))829 826 (let ((instruction (aref code i))) 830 827 (cond ((label-p instruction) … … 839 836 840 837 (defun optimize-jumps (code) 838 (declare (optimize speed)) 841 839 (let* ((code (coerce code 'vector)) 842 840 (ht (label-target-instructions code)) 843 841 (changed nil)) 844 842 (dotimes (i (length code)) 845 (declare (type (unsigned-byte 16) i))846 843 (let* ((instruction (aref code i)) 847 844 (opcode (and instruction (instruction-opcode instruction)))) … … 867 864 (changed nil)) 868 865 (dotimes (i (1- (length code))) 869 (declare (type (unsigned-byte 16) i))870 866 (let* ((this-instruction (aref code i)) 871 867 (this-opcode (and this-instruction
Note: See TracChangeset
for help on using the changeset viewer.