equal
deleted
inserted
replaced
18 |
18 |
19 handlerPCFor:exception at:pc in:aMethod |
19 handlerPCFor:exception at:pc in:aMethod |
20 "if there is a handler for exceptionClass, with given pc, |
20 "if there is a handler for exceptionClass, with given pc, |
21 return the handler-PC; otherwise, return nil." |
21 return the handler-PC; otherwise, return nil." |
22 |
22 |
23 |cls ref| |
23 |cls| |
24 |
24 |
25 (pc between:startPC and:endPC) ifTrue:[ |
25 (pc between:startPC and:endPC) ifTrue:[ |
26 catchType == 0 ifTrue:[^ handlerPC]. |
26 (catchType == 0) ifTrue:[^ handlerPC]. |
27 cls := aMethod javaClass. |
27 cls := aMethod javaClass. |
28 ref := cls constantPool at:catchType. |
28 (catchType isKindOf:JavaClass) ifFalse:[ |
29 (ref isKindOf:JavaClass) ifFalse:[ |
|
30 self halt. |
29 self halt. |
31 ^ nil |
30 ^ nil |
32 ]. |
31 ]. |
33 (exception class isKindOf:ref) ifTrue:[ |
32 (exception class isKindOf:catchType) ifTrue:[ |
34 ^ handlerPC |
33 ^ handlerPC |
35 ]. |
34 ]. |
36 ^ nil |
35 ^ nil |
37 ]. |
36 ]. |
38 ^ nil |
37 ^ nil |
48 ! ! |
47 ! ! |
49 |
48 |
50 !JavaExceptionTableEntry class methodsFor:'documentation'! |
49 !JavaExceptionTableEntry class methodsFor:'documentation'! |
51 |
50 |
52 version |
51 version |
53 ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.4 1996/07/01 13:41:48 cg Exp $' |
52 ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaExceptionTableEntry.st,v 1.5 1996/07/02 16:38:48 cg Exp $' |
54 ! ! |
53 ! ! |