--- a/JavaMethod.st Wed Dec 23 19:28:03 1998 +0000
+++ b/JavaMethod.st Tue Dec 29 16:50:12 1998 +0000
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1997 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -27,7 +27,7 @@
copyright
"
COPYRIGHT (c) 1997 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -43,9 +43,9 @@
initialize
AbstractMethodInvokationSignal isNil ifTrue:[
- AbstractMethodInvokationSignal := ExecutionErrorSignal newSignalMayProceed:true.
- AbstractMethodInvokationSignal nameClass:self message:#abstractMethodInvokationSignal.
- AbstractMethodInvokationSignal notifierString:'attempt to execute abstract method'.
+ AbstractMethodInvokationSignal := ExecutionErrorSignal newSignalMayProceed:true.
+ AbstractMethodInvokationSignal nameClass:self message:#abstractMethodInvokationSignal.
+ AbstractMethodInvokationSignal notifierString:'attempt to execute abstract method'.
].
A_PUBLIC := 16r0001.
@@ -194,8 +194,8 @@
"/ s peek == Character space ifTrue:[
"/ s next
"/ ] ifFalse:[
- argSpec := self fieldTypeFromStream:s in:nil.
- spec := spec copyWith:argSpec.
+ argSpec := self fieldTypeFromStream:s in:nil.
+ spec := spec copyWith:argSpec.
"/ ]
].
^ spec
@@ -208,25 +208,25 @@
sig := ''.
arr do:[:el |
- |jCLass|
-
- jCLass := el.
- jCLass isJavaClass ifFalse:[
- jCLass := JavaVM classForJavaClassObject:el
- ].
- jCLass isJavaClass ifTrue:[
- sig := sig , jCLass typeName.
- sig := sig, ';'
- ] ifFalse:[
- self halt.
- ]
+ |jCLass|
+
+ jCLass := el.
+ jCLass isJavaClass ifFalse:[
+ jCLass := JavaVM classForJavaClassObject:el
+ ].
+ jCLass isJavaClass ifTrue:[
+ sig := sig , jCLass typeName.
+ sig := sig, ';'
+ ] ifFalse:[
+ self halt.
+ ]
].
^ sig
"
self argSignatureFromArgTypeArray:
- (Array
- with:(JavaVM javaClassObjectForClass:(Java at:'com.sun.java.swing.JComponent')))
+ (Array
+ with:(JavaVM javaClassObjectForClass:(Java at:'com.sun.java.swing.JComponent')))
"
"Modified: / 13.2.1998 / 14:57:58 / cg"
@@ -292,21 +292,21 @@
argNr := 1.
spec := ''.
[s atEnd or:[s peek == $)]] whileFalse:[
- argSpec := self fieldTypeFromStream:s in:aPackage.
-
- (argNames notNil
- and:[argNames size >= argNr
- and:[(nm := argNames at:argNr) notNil]]) ifFalse:[
- nm := 'arg' , argNr printString.
- ].
- argSpec := argSpec , ' ' , nm.
-
- spec size ~~ 0 ifTrue:[
- spec := spec , ', '
- ].
- spec := spec , argSpec.
-
- argNr := argNr + 1.
+ argSpec := self fieldTypeFromStream:s in:aPackage.
+
+ (argNames notNil
+ and:[argNames size >= argNr
+ and:[(nm := argNames at:argNr) notNil]]) ifFalse:[
+ nm := 'arg' , argNr printString.
+ ].
+ argSpec := argSpec , ' ' , nm.
+
+ spec size ~~ 0 ifTrue:[
+ spec := spec , ', '
+ ].
+ spec := spec , argSpec.
+
+ argNr := argNr + 1.
].
^ spec
@@ -324,31 +324,31 @@
typeSym := SignatureTypeCodes at:typeChar ifAbsent:#unknown.
typeSym == #unknown ifTrue:[
- ^ typeSym
+ ^ typeSym
].
typeSym == #object ifTrue:[
- className := s upTo:$;.
- "/ strip off default
-
- nm := className.
- aPackage notNil ifTrue:[
- (nm startsWith:aPackage) ifTrue:[
- nm := nm copyFrom:(aPackage size + 2).
- ].
- ].
+ className := s upTo:$;.
+ "/ strip off default
+
+ nm := className.
+ aPackage notNil ifTrue:[
+ (nm startsWith:aPackage) ifTrue:[
+ nm := nm copyFrom:(aPackage size + 2).
+ ].
+ ].
- nm := nm copyReplaceAll:$/ with:$..
- ^ nm
+ nm := nm copyReplaceAll:$/ with:$..
+ ^ nm
].
typeSym == #array ifTrue:[
- s peek isDigit ifTrue:[
- size := Integer readFrom:s.
- elType := self fieldTypeFromStream:s in:aPackage.
- ^ elType , '[' , size printString , ']'
- ].
- elType := self fieldTypeFromStream:s in:aPackage.
- ^ elType , '[]'
+ s peek isDigit ifTrue:[
+ size := Integer readFrom:s.
+ elType := self fieldTypeFromStream:s in:aPackage.
+ ^ elType , '[' , size printString , ']'
+ ].
+ elType := self fieldTypeFromStream:s in:aPackage.
+ ^ elType , '[]'
].
^ typeSym
@@ -381,19 +381,19 @@
n := 0.
[s atEnd or:[s peek == $)]] whileFalse:[
- t := self fieldTypeFromStream:s in:nil.
- "/
- "/ some args count as 2
- "/
- t == #long ifTrue:[
- n := n + 2.
- ] ifFalse:[
- t == #double ifTrue:[
- n := n + 2
- ] ifFalse:[
- n := n + 1.
- ]
- ]
+ t := self fieldTypeFromStream:s in:nil.
+ "/
+ "/ some args count as 2
+ "/
+ t == #long ifTrue:[
+ n := n + 2.
+ ] ifFalse:[
+ t == #double ifTrue:[
+ n := n + 2
+ ] ifFalse:[
+ n := n + 1.
+ ]
+ ]
].
^ n
@@ -431,12 +431,12 @@
s := aSignature readStream.
(c := s peek) ~~ $( ifTrue:[
- c == $' ifTrue:[
- [s peek ~= $'] whileTrue:[s next].
- s next.
- ^ (self retvalSpecFromStream:s in:aPackage)
- ].
- ^ (self retvalSpecFromStream:s in:aPackage)
+ c == $' ifTrue:[
+ [s peek ~= $'] whileTrue:[s next].
+ s next.
+ ^ (self retvalSpecFromStream:s in:aPackage)
+ ].
+ ^ (self retvalSpecFromStream:s in:aPackage)
].
s next.
@@ -478,7 +478,7 @@
s peek == $V ifTrue:[^ #void].
spec := self fieldTypeFromStream:s in:aPackage.
spec knownAsSymbol ifTrue:[
- ^ spec asSymbol
+ ^ spec asSymbol
].
^ spec
@@ -642,13 +642,13 @@
s := aSignature readStream.
(c := s peek) ~~ $( ifTrue:[
- c == $' ifTrue:[
- s next.
- [s peek ~= $'] whileTrue:[s next].
- s next.
- ^ (self retvalSpecFromStream:s in:package)
- ].
- ^ (self retvalSpecFromStream:s in:package)
+ c == $' ifTrue:[
+ s next.
+ [s peek ~= $'] whileTrue:[s next].
+ s next.
+ ^ (self retvalSpecFromStream:s in:package)
+ ].
+ ^ (self retvalSpecFromStream:s in:package)
].
s next.
@@ -850,38 +850,38 @@
|cls returnType|
(returnType := self returnType) isNil ifTrue:[
- self halt.
+ self halt.
].
cls := Java at:returnType.
cls notNil ifTrue:[^ cls].
returnType == #void ifTrue:[
- ^ nil
+ ^ nil
].
returnType == #double ifTrue:[
- 'warning: no returnTypeClass for double' printCR.
+ 'warning: no returnTypeClass for double' printCR.
"/ self halt:'no returnTypeClass for double'.
- ^ nil
+ ^ nil
].
returnType == #float ifTrue:[
- 'warning: no returnTypeClass for float' printCR.
+ 'warning: no returnTypeClass for float' printCR.
"/ self halt:'no returnTypeClass for float'.
- ^ nil
+ ^ nil
].
returnType == #long ifTrue:[
- 'warning: no returnTypeClass for long' printCR.
+ 'warning: no returnTypeClass for long' printCR.
"/ self halt:'no returnTypeClass for long'.
- ^ nil
+ ^ nil
].
returnType == #int ifTrue:[
- 'warning: no returnTypeClass for int' printCR.
+ 'warning: no returnTypeClass for int' printCR.
"/ self halt:'no returnTypeClass for int'.
- ^ nil
+ ^ nil
].
returnType == #boolean ifTrue:[
- 'warning: no returnTypeClass for boolean' printCR.
+ 'warning: no returnTypeClass for boolean' printCR.
"/ self halt:'no returnTypeClass for boolean'.
- ^ nil
+ ^ nil
].
self halt.
^ nil
@@ -1007,7 +1007,7 @@
numArgs := self class numArgsFromSignature:aString.
(tooManyArgs := (numArgs > self class maxNumberOfArguments)) ifTrue:[
- numArgs := 0.
+ numArgs := 0.
].
self numberOfArgs:numArgs.
returnType := self class typeFromSignature:aString in:nil.
@@ -1016,20 +1016,20 @@
"/ the flags ...
returnType == #void ifTrue:[
- accessFlags := accessFlags bitOr:R_VOID
+ accessFlags := accessFlags bitOr:R_VOID
] ifFalse:[
- returnType == #long ifTrue:[
- accessFlags := accessFlags bitOr:R_LONG
- ] ifFalse:[
- returnType == #double ifTrue:[
- accessFlags := accessFlags bitOr:R_DOUBLE
- ]
- ]
+ returnType == #long ifTrue:[
+ accessFlags := accessFlags bitOr:R_LONG
+ ] ifFalse:[
+ returnType == #double ifTrue:[
+ accessFlags := accessFlags bitOr:R_DOUBLE
+ ]
+ ]
].
tooManyArgs ifTrue:[
- ^ ArgumentSignal
- raiseRequestWith:self
- errorString:'too many args in method'
+ ^ ArgumentSignal
+ raiseRequestWith:self
+ errorString:'too many args in method'
].
"Created: / 16.4.1996 / 11:34:29 / cg"
@@ -1092,7 +1092,7 @@
clearBreakPoint
self hasCode ifTrue:[
- MessageTracer unwrapMethod:self
+ MessageTracer unwrapMethod:self
].
accessFlags := (accessFlags bitClear:A_BREAKPOINT).
@@ -1113,7 +1113,7 @@
setBreakPoint
self hasCode ifTrue:[
- MessageTracer trapMethod:self
+ MessageTracer trapMethod:self
].
accessFlags := (accessFlags bitOr:A_BREAKPOINT).
@@ -1167,37 +1167,37 @@
decompileSourceTo:aStream
"/ self isNative ifFalse:[
"/ self isAbstract ifFalse:[
- aStream nextPutAll:'// '; cr.
- aStream nextPutAll:'// decompiled source'; cr.
- aStream nextPutAll:'// '; cr.
- aStream cr.
- SignalSet anySignal handle:[:ex |
- ex signal == Object haltSignal ifTrue:[ex reject].
- ex signal == MessageTracer breakpointSignal ifTrue:[ex reject].
- ex signal == Signal noHandlerSignal ifTrue:[ex reject].
-
- aStream nextPutAll:'error while decompiling:'.
- aStream cr; cr; spaces:4.
- aStream nextPutAll:ex errorString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext printString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext sender printString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext sender sender printString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext sender sender sender printString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext sender sender sender sender printString.
- aStream cr.
- aStream nextPutAll:ex suspendedContext sender sender sender sender sender printString.
- aStream cr.
-
- JavaDecompiler decompile:self to:aStream.
- ex return
- ] do:[
- aStream nextPutAll:(JavaDeparser decompile:self).
- ].
+ aStream nextPutAll:'// '; cr.
+ aStream nextPutAll:'// decompiled source'; cr.
+ aStream nextPutAll:'// '; cr.
+ aStream cr.
+ SignalSet anySignal handle:[:ex |
+ ex signal == Object haltSignal ifTrue:[ex reject].
+ ex signal == MessageTracer breakpointSignal ifTrue:[ex reject].
+ ex signal == Signal noHandlerSignal ifTrue:[ex reject].
+
+ aStream nextPutAll:'error while decompiling:'.
+ aStream cr; cr; spaces:4.
+ aStream nextPutAll:ex errorString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext printString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext sender printString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext sender sender printString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext sender sender sender printString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext sender sender sender sender printString.
+ aStream cr.
+ aStream nextPutAll:ex suspendedContext sender sender sender sender sender printString.
+ aStream cr.
+
+ JavaDecompiler decompile:self to:aStream.
+ ex return
+ ] do:[
+ aStream nextPutAll:(JavaDeparser decompile:self).
+ ].
"/ ].
"/ ].
@@ -1230,7 +1230,7 @@
invalidByteCode
self isAbstract ifTrue:[
- ^ AbstractMethodInvokationSignal raise.
+ ^ AbstractMethodInvokationSignal raise.
].
((self class numArgsFromSignature:signature) > self class maxNumberOfArguments) ifTrue:[
^ self error:'method cannot be executed - too many args'
@@ -1274,8 +1274,8 @@
updateClassRefsFrom:oldClass to:newClass
javaClass == oldClass ifTrue:[
- "/ invalidate
- byteCode := nil.
+ "/ invalidate
+ byteCode := nil.
]
"Created: / 6.1.1998 / 18:19:48 / cg"
@@ -1285,7 +1285,7 @@
displayString
javaClass isNil ifTrue:[
- ^ 'JavaMethod(???)'
+ ^ 'JavaMethod(???)'
].
^ 'JavaMethod(' , javaClass displayString , '::' , self signatureName , ')'
@@ -1301,7 +1301,7 @@
"/ ].
self name = #'<init>' ifTrue:[
- ^ self class specTextFromSignature:signature withName:(javaClass lastName).
+ ^ self class specTextFromSignature:signature withName:(javaClass lastName).
].
^ self signatureNameText
@@ -1360,7 +1360,7 @@
myName := self name.
myName = '<init>' ifTrue:[
- myName := javaClass name
+ myName := javaClass name
].
^ self class specFromSignature:signature withName:myName argNames:argNames in:nil
@@ -1375,7 +1375,7 @@
myName := self name.
myName = '<init>' ifTrue:[
- myName := javaClass name
+ myName := javaClass name
].
^ self class specFromSignature:signature withName:myName argNames:argNames in:package
@@ -1488,42 +1488,42 @@
ForceByteCodeDisplay == true ifFalse:[
- lineNumberTable notNil ifTrue:[
- classSource := javaClass source.
- classSource notNil ifTrue:[
- lineNumberTable pairWiseDo:[:lPc :lNr |
- lPc >= pc ifTrue:[
- lPc == pc ifTrue:[^ lNr].
- last isNil ifTrue:[^ lNr].
- ^ last.
- ].
- last := lNr.
- ].
- last notNil ifTrue:[
- ^ last
- ].
- ^ lineNumberTable at:2
- ].
- ].
+ lineNumberTable notNil ifTrue:[
+ classSource := javaClass source.
+ classSource notNil ifTrue:[
+ lineNumberTable pairWiseDo:[:lPc :lNr |
+ lPc >= pc ifTrue:[
+ lPc == pc ifTrue:[^ lNr].
+ last isNil ifTrue:[^ lNr].
+ ^ last.
+ ].
+ last := lNr.
+ ].
+ last notNil ifTrue:[
+ ^ last
+ ].
+ ^ lineNumberTable at:2
+ ].
+ ].
].
"/ decompile and look which line the pc falls into
ForceByteCodeDisplay == true ifTrue:[
- text := self decompiledBytecode asCollectionOfLines.
+ text := self decompiledBytecode asCollectionOfLines.
] ifFalse:[
- text := self decompiledSource asCollectionOfLines.
+ text := self decompiledSource asCollectionOfLines.
].
text keysAndValuesDo:[:lineNr :line |
- |nr|
-
- (line startsWith:' ') ifFalse:[
- nr := Integer readFrom:line onError:0.
- nr >= pc ifTrue:[
- ^ lineNr
- ]
- ]
+ |nr|
+
+ (line startsWith:' ') ifFalse:[
+ nr := Integer readFrom:line onError:0.
+ nr >= pc ifTrue:[
+ ^ lineNr
+ ]
+ ]
].
^ num
@@ -1540,18 +1540,18 @@
|last|
lineNumberTable notNil ifTrue:[
- lineNumberTable pairWiseDo:[:lPc :lNr |
- lPc >= pc ifTrue:[
- lPc == pc ifTrue:[^ lNr].
- last isNil ifTrue:[^ lNr].
- ^ last.
- ].
- last := lNr.
- ].
- last notNil ifTrue:[
- ^ last
- ].
- ^ lineNumberTable at:2
+ lineNumberTable pairWiseDo:[:lPc :lNr |
+ lPc >= pc ifTrue:[
+ lPc == pc ifTrue:[^ lNr].
+ last isNil ifTrue:[^ lNr].
+ ^ last.
+ ].
+ last := lNr.
+ ].
+ last notNil ifTrue:[
+ ^ last
+ ].
+ ^ lineNumberTable at:2
].
^ nil
@@ -1609,7 +1609,7 @@
i := index + 1.
(i between:1 and:arr size) ifFalse:[
- JavaVM throwArrayIndexOutOfBoundsException:index
+ JavaVM throwArrayIndexOutOfBoundsException:index
].
'Java: warning bad array in aaload' errorPrintCR.
@@ -1626,7 +1626,7 @@
i := index + 1.
(i between:1 and:arr size) ifFalse:[
- JavaVM throwArrayIndexOutOfBoundsException:index
+ JavaVM throwArrayIndexOutOfBoundsException:index
].
'Java: warning bad array in aastore' errorPrintCR.
@@ -1657,7 +1657,7 @@
i := index + 1.
(i between:1 and:arr size) ifFalse:[
- JavaVM throwArrayIndexOutOfBoundsException:index
+ JavaVM throwArrayIndexOutOfBoundsException:index
].
^ arr at:i
@@ -1670,48 +1670,48 @@
"trampouline for unhandled cases ..."
aClassOrInterface isBehavior ifTrue:[
- aClassOrInterface == ByteArray ifTrue:[
- ^ anObject class == aClassOrInterface
- ].
-
- aClassOrInterface isInterface ifTrue:[
- (anObject class hasInterface:aClassOrInterface) ifTrue:[
- ^ true
- ]
- ].
- (anObject isKindOf:aClassOrInterface) ifTrue:[
- ^ true
- ].
- anObject isArray ifTrue:[
- ^ true
- ].
- self halt.
- ^ false.
+ aClassOrInterface == ByteArray ifTrue:[
+ ^ anObject class == aClassOrInterface
+ ].
+
+ aClassOrInterface isInterface ifTrue:[
+ (anObject class hasInterface:aClassOrInterface) ifTrue:[
+ ^ true
+ ]
+ ].
+ (anObject isKindOf:aClassOrInterface) ifTrue:[
+ ^ true
+ ].
+ anObject isArray ifTrue:[
+ ^ true
+ ].
+ self halt.
+ ^ false.
].
(aClassOrInterface isMemberOf:JavaClassPointerRef) ifTrue:[
- "/ must be a pointer to an array of that class
-
- anObject isArray ifTrue:[
- ^ true
- ].
- self halt.
- ^ false.
+ "/ must be a pointer to an array of that class
+
+ anObject isArray ifTrue:[
+ ^ true
+ ].
+ self halt.
+ ^ false.
].
(aClassOrInterface isMemberOf:JavaBuiltInClassPointerRef) ifTrue:[
- aClassOrInterface arrayClass == anObject class ifTrue:[
- ^ true
- ].
+ aClassOrInterface arrayClass == anObject class ifTrue:[
+ ^ true
+ ].
].
(anObject isMemberOf:Array) ifTrue:[
- anObject size == 0 ifTrue:[
- ^ true
- ].
- (self _checkCast:(anObject at:1) class:(aClassOrInterface deref)) ifTrue:[
- ^ true
- ].
- self halt.
- ^ false
+ anObject size == 0 ifTrue:[
+ ^ true
+ ].
+ (self _checkCast:(anObject at:1) class:(aClassOrInterface deref)) ifTrue:[
+ ^ true
+ ].
+ self halt.
+ ^ false
].
self halt.
^ false.
@@ -1725,13 +1725,13 @@
v := op1 asInteger.
v > 16r7FFFFFFFFFFFFFFF ifTrue:[
- self halt.
- v := 16r7FFFFFFFFFFFFFFF
+ self halt.
+ v := 16r7FFFFFFFFFFFFFFF
] ifFalse:[
- v < 16r8000000000000000 negated ifTrue:[
- self halt.
- v := 16r8000000000000000 negated
- ]
+ v < 16r8000000000000000 negated ifTrue:[
+ self halt.
+ v := 16r8000000000000000 negated
+ ]
].
^ v
@@ -1757,7 +1757,7 @@
i := index + 1.
(i between:1 and:arr size) ifFalse:[
- JavaVM throwArrayIndexOutOfBoundsException:index
+ JavaVM throwArrayIndexOutOfBoundsException:index
].
'Java: warning bad array in iaload' errorPrintCR.
@@ -1774,7 +1774,7 @@
i := index + 1.
(i between:1 and:arr size) ifFalse:[
- JavaVM throwArrayIndexOutOfBoundsException:index
+ JavaVM throwArrayIndexOutOfBoundsException:index
].
'Java: warning bad array in iastore' errorPrintCR.
@@ -1821,7 +1821,7 @@
|rslt|
(op1 < 0 or:[op2 < 0]) ifTrue:[
- self halt.
+ self halt.
].
rslt := op1 bitAnd: op2.
^ rslt
@@ -1850,19 +1850,19 @@
sign := 1.
(o1 := op1) < 0 ifTrue:[
- sign := -1.
- o1 := o1 negated.
+ sign := -1.
+ o1 := o1 negated.
].
(o2 := op2) < 0 ifTrue:[
- sign := sign negated.
- o2 := o2 negated.
+ sign := sign negated.
+ o2 := o2 negated.
].
prod := (o1 * o2) bitAnd:16rFFFFFFFFFFFFFFFF.
(prod bitAnd:16r8000000000000000) ~~ 0 ifTrue:[
].
sign == -1 ifTrue:[
- prod := prod negated
+ prod := prod negated
].
^ prod
@@ -1874,7 +1874,7 @@
|rslt|
(op1 < 0 or:[op2 < 0]) ifTrue:[
- self halt.
+ self halt.
].
rslt := op1 bitOr: op2.
^ rslt
@@ -1896,7 +1896,7 @@
|rslt|
(op1 < 0) ifTrue:[
- self halt.
+ self halt.
].
rslt := (op1 bitShift:op2) bitAnd:16rFFFFFFFFFFFFFFFF.
^ rslt
@@ -1909,11 +1909,11 @@
|rslt|
op1 < 0 ifTrue:[
- self halt
+ self halt
].
(op1 < 0) ifTrue:[
- self halt.
+ self halt.
].
rslt := (op1 bitShift:op2 negated) bitAnd:16rFFFFFFFFFFFFFFFF.
^ rslt
@@ -1936,11 +1936,11 @@
|rslt|
op1 < 0 ifTrue:[
- self halt
+ self halt
].
(op1 < 0) ifTrue:[
- self halt.
+ self halt.
].
rslt := (op1 bitShift:op2 negated) bitAnd:16rFFFFFFFFFFFFFFFF.
^ rslt
@@ -1953,7 +1953,7 @@
|rslt|
(op1 < 0 or:[op2 < 0]) ifTrue:[
- self halt.
+ self halt.
].
rslt := op1 bitXor: op2.
^ rslt
@@ -1962,6 +1962,14 @@
"Modified: / 7.1.1998 / 21:22:00 / cg"
!
+_monenter:anObject
+ ^ JavaVM monitorEnter:anObject.
+!
+
+_monexit:anObject
+ ^ JavaVM monitorExit:anObject.
+!
+
_multiNew:typeRef _:dim1
|clsRef cls arr elType elSizes|
@@ -1979,7 +1987,7 @@
|clsRef cls arr elType elSizes|
typeRef == Array ifTrue:[
- self halt.
+ self halt.
].
clsRef := typeRef asClassPointerRef.
@@ -1989,7 +1997,7 @@
elType := typeRef deref.
1 to:dim2 do:[:idx |
- arr at:idx put:(self _multiNew:elType _:dim1)
+ arr at:idx put:(self _multiNew:elType _:dim1)
].
^ arr
@@ -2008,7 +2016,7 @@
elType := typeRef deref.
1 to:dim3 do:[:idx |
- arr at:idx put:(self _multiNew:elType _:dim1 _:dim2)
+ arr at:idx put:(self _multiNew:elType _:dim1 _:dim2)
].
"/ self halt.
@@ -2032,8 +2040,8 @@
divisionByZero
JavaVM
- throwExceptionClassName:'java.lang.ArithmeticException'
- withMessage:'/ by zero'
+ throwExceptionClassName:'java.lang.ArithmeticException'
+ withMessage:'/ by zero'
"Created: / 15.1.1998 / 02:27:23 / cg"
!
@@ -2062,9 +2070,9 @@
nm := selector copyWithoutLast:signature size.
sel := ('_' , javaClass lastName , '_' , nm , ':') asSymbol.
"/ (JavaVM respondsTo:sel) ifTrue:[
- ^ JavaVM
- perform:sel
- with:thisContext sender.
+ ^ JavaVM
+ perform:sel
+ with:thisContext sender.
"/ ].
"/
"/ self error:('unimplemented nativeMethod: ' , javaClass name , ' ' , self name).
@@ -2084,6 +2092,6 @@
!JavaMethod class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.82 1998/12/23 19:27:30 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.83 1998/12/29 16:50:12 cg Exp $'
! !
JavaMethod initialize!