--- a/JavaFieldRef2.st Sat Oct 05 23:37:01 2013 +0100
+++ b/JavaFieldRef2.st Sun Oct 06 00:01:04 2013 +0100
@@ -77,11 +77,10 @@
!
type
- type == T_LONG ifTrue: [ ^ #long. ].
- type == T_DOUBLE ifTrue: [ ^ #double ].
^ type.
"Created: / 15-05-2011 / 22:29:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 05-10-2013 / 23:57:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaFieldRef2 methodsFor:'private - resolving'!
@@ -105,6 +104,12 @@
!
findResolvedValue: doClassInit
+ "
+ Stores resolved field in valueCache field, fills offset and
+ type fields. In case of multiple coexisting java class versions
+ sets cleanCacheFlag recognized by the vm, which causes the
+ caches to be cleaned after the use.
+ "
valueCache := JavaResolver uniqueInstance
resolveFieldIndentifiedByRef: self.
valueCache isStatic ifTrue: [ classCache := valueCache javaClass ] ifFalse: [
@@ -119,6 +124,7 @@
"Modified: / 07-12-2011 / 21:52:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 09-02-2012 / 23:09:18 / mh <hlopik@gmail.com>"
"Modified: / 16-10-2012 / 10:46:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-10-2013 / 21:34:10 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
!
findStaticOffset
@@ -161,16 +167,20 @@
!
resolveType
- type := JavaMethod typeFromSignature:((constantPool at: nameAndTypeIndex) descriptor) in:nil.
- type == #long ifTrue:[
+ | descriptor |
+
+ descriptor := (constantPool at: nameAndTypeIndex) descriptor.
+ type := 0.
+ descriptor = 'J' ifTrue:[
type := T_LONG.
] ifFalse:[
- type == #double ifTrue:[
+ type = 'D' ifTrue:[
type := T_DOUBLE
]
].
"Created: / 15-05-2011 / 22:29:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 05-10-2013 / 23:56:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaFieldRef2 class methodsFor:'documentation'!