[armedbear-cvs] r11838 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Thu May 7 18:01:09 UTC 2009
Author: ehuelsmann
Date: Thu May 7 14:01:06 2009
New Revision: 11838
Log:
Remove code handling JSR/RET instructions.
Modified:
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
trunk/abcl/src/org/armedbear/lisp/opcodes.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp (original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Thu May 7 14:01:06 2009
@@ -1125,8 +1125,6 @@
165 ; if_acmpeq
166 ; if_acmpne
167 ; goto
- 168 ; jsr
- 169 ; ret
176 ; areturn
177 ; return
190 ; arraylength
@@ -1322,18 +1320,13 @@
i instruction-depth (+ depth instruction-stack)))
(return-from walk-code))
(let ((opcode (instruction-opcode instruction)))
- (unless (eql opcode 168) ; JSR
- (setf depth (+ depth instruction-stack)))
+ (setf depth (+ depth instruction-stack))
(setf (instruction-depth instruction) depth)
- (if (eql opcode 168) ; JSR
- (let ((label (car (instruction-args instruction))))
- (declare (type symbol label))
- (walk-code code (symbol-value label) (1+ depth)))
- (when (branch-opcode-p opcode)
- (let ((label (car (instruction-args instruction))))
- (declare (type symbol label))
- (walk-code code (symbol-value label) depth))))
- (when (member opcode '(167 169 176 191)) ; GOTO RET ARETURN ATHROW
+ (when (branch-opcode-p opcode)
+ (let ((label (car (instruction-args instruction))))
+ (declare (type symbol label))
+ (walk-code code (symbol-value label) depth)))
+ (when (member opcode '(167 176 191)) ; GOTO ARETURN ATHROW
;; Current path ends.
(return-from walk-code))))))
Modified: trunk/abcl/src/org/armedbear/lisp/opcodes.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/opcodes.lisp (original)
+++ trunk/abcl/src/org/armedbear/lisp/opcodes.lisp Thu May 7 14:01:06 2009
@@ -220,8 +220,8 @@
(define-opcode if_acmpeq 165 3 -2)
(define-opcode if_acmpne 166 3 -2)
(define-opcode goto 167 3 0)
-(define-opcode jsr 168 3 1)
-(define-opcode ret 169 2 0)
+;;(define-opcode jsr 168 3 1) Don't use these 2 opcodes: deprecated
+;;(define-opcode ret 169 2 0) their use results in JVM verifier errors
(define-opcode tableswitch 170 0 nil)
(define-opcode lookupswitch 171 0 nil)
(define-opcode ireturn 172 1 nil)
More information about the armedbear-cvs
mailing list