Changeset 12872


Ignore:
Timestamp:
08/07/10 12:30:05 (13 years ago)
Author:
ehuelsmann
Message:

In OPTIMIZE-3, do not consider LABELs a 'next instruction',
skip them instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/generic-class-file/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r12871 r12872  
    929929             (this-opcode (and this-instruction
    930930                               (instruction-opcode this-instruction)))
    931              (next-instruction (aref code (1+ i)))
     931             (labels-skipped-p nil)
     932             (next-instruction (do ((j (1+ i) (1+ j)))
     933                                   ((or (>= j (length code))
     934                                        (/= 202 ; LABEL
     935                                            (instruction-opcode (aref code j))))
     936                                    (when (< j (length code))
     937                                      (aref code j)))
     938                                 (setf labels-skipped-p t)))
    932939             (next-opcode (and next-instruction
    933940                               (instruction-opcode next-instruction))))
     
    938945             (setf changed t)))
    939946          (178 ; GETSTATIC
    940            (when (eql next-opcode 87) ; POP
     947           (when (and (eql next-opcode 87) ; POP
     948                      (not labels-skipped-p))
    941949             (setf (aref code i) nil)
    942950             (setf (aref code (1+ i)) nil)
     
    947955                          (car (instruction-args next-instruction))))
    948956             (setf (aref code i) nil)
    949              ;;(setf (aref code (1+ i)) nil)
    950957             (setf changed t))))))
    951958    (when changed
Note: See TracChangeset for help on using the changeset viewer.