Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Introduced new naming convention to denote slots which are valid
only after a reference is resolved. Unused method removed. Added some
documentation.
--- a/JavaClassContentRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-"
-"{ Package: 'stx:libjava' }"
-
-JavaRef2 subclass:#JavaClassContentRef2
- instanceVariableNames:'classRefIndex nameAndTypeIndex classCache nameAndTypeCache'
- classVariableNames:''
- poolDictionaries:''
- category:'Languages-Java-Reader-Support-new'
-!
-
-!JavaClassContentRef2 class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-
-"
-! !
-
-!JavaClassContentRef2 class methodsFor:'instance creation'!
-
-in: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
- ^ self basicNew
- initializeIn: aJavaConstantPool
- withNameAndTypeAt: nameAndTypeCPIndex
- andClassAt: classRefCPIndex.
-
- "Created: / 12-05-2011 / 18:36:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
-!JavaClassContentRef2 methodsFor:'accessing'!
-
-classRef
- ^ constantPool at: classRefIndex.
-
- "Modified: / 12-05-2011 / 18:38:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-descriptor
- ^ self nameAndType descriptor.
-
- "Created: / 08-04-2011 / 15:08:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-05-2011 / 18:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-javaClass
- ^ classCache
-
- "Created: / 20-01-2014 / 15:03:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-name
- ^ self nameAndType name.
-
- "Created: / 08-04-2011 / 13:54:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-05-2011 / 18:39:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-nameAndType
- ^ constantPool at: nameAndTypeIndex.
-
- "Created: / 11-04-2011 / 19:57:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-05-2011 / 18:39:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-selector
- ^ self nameAndType selector.
-
- "Created: / 11-04-2011 / 20:38:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-05-2011 / 18:39:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-signature
- ^ self nameAndType signature.
-
- "Created: / 20-05-2011 / 17:10:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
-!JavaClassContentRef2 methodsFor:'comparing'!
-
-= anotherJavaRef
-
- ^ self class == anotherJavaRef class
- and:[self classRef = anotherJavaRef classRef
- and:[self nameAndType = anotherJavaRef nameAndType]]
-
- "Modified: / 30-08-2013 / 17:15:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-hash
- ^ self classRef hash bitXor: self nameAndType hash
-
- "Modified: / 30-08-2013 / 17:14:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaClassContentRef2 methodsFor:'initialization'!
-
-initializeIn: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
- constantPool := aJavaConstantPool.
- classRefIndex := classRefCPIndex.
- nameAndTypeIndex := nameAndTypeCPIndex.
- super initialize.
-
- "Created: / 12-05-2011 / 18:37:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
-!JavaClassContentRef2 methodsFor:'printing'!
-
-displayString
- "superclass JavaRef2 says that I am responsible to implement this method"
-
- ^ self classRef displayString , '.' , self name
-
- "Created: / 14-08-2011 / 21:18:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-printString
- ^ 'JavaClassContentRef: class=[' , self classRef printString , '] name=['
- , self nameAndType printString , ']'.
-
- "Created: / 10-05-2011 / 14:15:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-05-2011 / 18:40:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
-!JavaClassContentRef2 methodsFor:'resolving'!
-
-invalidate
- self classRef invalidate.
- classCache := nil.
- nameAndTypeCache := nil.
- ^ super invalidate.
-
- "Created: / 13-04-2011 / 12:21:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 18-05-2011 / 12:41:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 20-01-2014 / 10:18:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-invalidateForClass: class
- "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
- Return true, if reference was invalidated."
-
- (self classRef invalidateForClass: class) ifTrue: [
- self invalidate.
- ^ true
- ].
- ^ false.
-
- "Modified: / 12-05-2011 / 18:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified (format): / 21-02-2012 / 10:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaClassContentRef2 class methodsFor:'documentation'!
-
-version_CVS
- ^ '$Header: /cvs/stx/stx/libjava/JavaClassContentRef2.st,v 1.6 2013-09-06 00:41:19 vrany Exp $'
-!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-!
-
-version_SVN
- ^ 'Id'
-! !
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaClassMemberRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -0,0 +1,235 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaRef2 subclass:#JavaClassMemberRef2
+ instanceVariableNames:'classRefIndex nameAndTypeIndex resolvedClass type'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Java-Reader-Support-new'
+!
+
+!JavaClassMemberRef2 class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ An abstract base superclass for method refs and field refs.
+
+ [author:]
+ Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+ classRefIndex ...... index to constant pool to classref describing
+ method's or field's class.
+ nameAndTypeIndex ... index to constant pool to name-and-type structure
+ describing name and type of field or name and descriptor
+ of a method.
+ !! resolvedClass ...... once a reference is resolved, this slot contains
+ the class to in which this method/field is defined.
+ !!!!!! Used by the VM !!!!!!
+ !! type ............... this slot contains integer of value:
+ - ACX_R_VOID if method returns void.
+ - ACX_R_DOUBLE if method returns long / field is of type long
+ - ACX_R_DOUBLE if method returns double / field is of type double
+ - 0 otherwise.
+ This value is used by both interpreter and JIT compiler to correctly
+ push/pop values onto/from stack. long/double occupies 2 slots (2x 32 bit)
+ !!!!!! Used by the VM !!!!!!
+ [class variables:]
+
+ [see also:]
+ JavaFieldRef2
+ JavaMethodRef2
+
+"
+! !
+
+!JavaClassMemberRef2 class methodsFor:'instance creation'!
+
+in: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
+ ^ self basicNew
+ initializeIn: aJavaConstantPool
+ withNameAndTypeAt: nameAndTypeCPIndex
+ andClassAt: classRefCPIndex.
+
+ "Created: / 12-05-2011 / 18:36:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 methodsFor:'accessing'!
+
+classRef
+ ^ constantPool at: classRefIndex.
+
+ "Modified: / 12-05-2011 / 18:38:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+descriptor
+ ^ self nameAndType descriptor.
+
+ "Created: / 08-04-2011 / 15:08:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 12-05-2011 / 18:39:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+javaClass
+ ^ resolvedClass
+
+ "Created: / 20-01-2014 / 15:03:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+name
+ ^ self nameAndType name.
+
+ "Created: / 08-04-2011 / 13:54:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 12-05-2011 / 18:39:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+nameAndType
+ ^ constantPool at: nameAndTypeIndex.
+
+ "Created: / 11-04-2011 / 19:57:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 12-05-2011 / 18:39:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+selector
+ ^ self nameAndType selector.
+
+ "Created: / 11-04-2011 / 20:38:54 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 12-05-2011 / 18:39:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+!
+
+signature
+ ^ self nameAndType signature.
+
+ "Created: / 20-05-2011 / 17:10:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 methodsFor:'comparing'!
+
+= anotherJavaRef
+
+ ^ self class == anotherJavaRef class
+ and:[self classRef = anotherJavaRef classRef
+ and:[self nameAndType = anotherJavaRef nameAndType]]
+
+ "Modified: / 30-08-2013 / 17:15:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hash
+ ^ self classRef hash bitXor: self nameAndType hash
+
+ "Modified: / 30-08-2013 / 17:14:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 methodsFor:'initialization'!
+
+initializeIn: aJavaConstantPool withNameAndTypeAt: nameAndTypeCPIndex andClassAt: classRefCPIndex
+ constantPool := aJavaConstantPool.
+ classRefIndex := classRefCPIndex.
+ nameAndTypeIndex := nameAndTypeCPIndex.
+ super initialize.
+
+ "Created: / 12-05-2011 / 18:37:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 methodsFor:'printing'!
+
+displayString
+ "superclass JavaRef2 says that I am responsible to implement this method"
+
+ ^ self classRef displayString , '.' , self name
+
+ "Created: / 14-08-2011 / 21:18:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+printString
+ ^ 'JavaClassContentRef: class=[' , self classRef printString , '] name=['
+ , self nameAndType printString , ']'.
+
+ "Created: / 10-05-2011 / 14:15:39 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 12-05-2011 / 18:40:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 methodsFor:'resolving'!
+
+invalidate
+ self classRef invalidate.
+ resolvedClass := nil.
+ ^ super invalidate.
+
+ "Created: / 13-04-2011 / 12:21:38 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 18-05-2011 / 12:41:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:02:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+invalidateForClass: class
+ "Invalidate (means call invalidate) reference if it has something to do with given class (e.g Class named internalJavaClassName was unloaded).
+ Return true, if reference was invalidated."
+
+ (self classRef invalidateForClass: class) ifTrue: [
+ self invalidate.
+ ^ true
+ ].
+ ^ false.
+
+ "Modified: / 12-05-2011 / 18:40:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified (format): / 21-02-2012 / 10:21:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaClassMemberRef2 class methodsFor:'documentation'!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libjava/JavaClassContentRef2.st,v 1.6 2013-09-06 00:41:19 vrany Exp $'
+!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
+version_SVN
+ ^ 'Id'
+! !
+
--- a/JavaClassRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaClassRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -51,6 +51,23 @@
as of 1.9.2010
"
+!
+
+documentation
+"
+ A symbolic reference to a class.
+
+ [author:]
+ Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
! !
!JavaClassRef2 class methodsFor:'instance creation'!
@@ -88,8 +105,8 @@
javaClass
- valueCache isNil ifTrue:[self resolve: false].
- ^valueCache
+ resolvedValue isNil ifTrue:[self resolve: false].
+ ^resolvedValue
"Created: / 22-05-2011 / 14:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 31-08-2013 / 10:59:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -97,7 +114,7 @@
javaClass: javaClass
- valueCache := javaClass.
+ resolvedValue := javaClass.
"Created: / 12-10-2013 / 15:43:45 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
!
@@ -227,7 +244,7 @@
findResolvedValue: doInit
"Resolve reference and set valueCache."
- valueCache := JavaResolver uniqueInstance
+ resolvedValue := JavaResolver uniqueInstance
resolveClassIndentifiedByRef: self init: doInit.
"Modified: / 08-04-2011 / 17:39:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -286,14 +303,6 @@
"Modified: / 23-05-2011 / 15:21:20 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified (format): / 21-02-2012 / 10:21:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-resolve
-
- ^self resolve: true
-
- "Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Created: / 12-08-2011 / 22:18:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaClassRef2 class methodsFor:'documentation'!
--- a/JavaClassRefTests.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaClassRefTests.st Fri Jan 31 09:19:51 2014 +0000
@@ -141,11 +141,12 @@
javaClassRef owner: (Java
classForName: 'stx.libjava.tests.mocks.SubclassOfNonPublicClass').
javaClassRef resolve.
- self assertTrue: (javaClassRef valueCache notNil).
+ self assertTrue: (javaClassRef resolvedValue notNil).
self disableMockedExceptionThrowing.
"Created: / 13-04-2011 / 13:38:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 17:58:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:12:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testPublicClassPresent
@@ -156,12 +157,12 @@
javaClassRef := self getClassRefNamed: initString.
javaClassRef owner: self javaLangObject.
javaClassRef resolve.
- self assertTrue: (javaClassRef valueCache notNil).
+ self assertTrue: (javaClassRef resolvedValue notNil).
self disableMockedExceptionThrowing.
"Created: / 13-04-2011 / 13:39:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 17:58:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 10-12-2013 / 18:39:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:13:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaClassRefTests methodsFor:'primitives'!
@@ -230,11 +231,12 @@
initString := 'Ljava/lang/String;'.
javaClassRef := self getClassRefNamed: initString.
self assertFalse: (javaClassRef isResolved).
- self assertTrue: (javaClassRef valueCache isNil).
+ self assertTrue: (javaClassRef resolvedValue isNil).
self assertTrue: (javaClassRef name = initString).
"Created: / 08-04-2011 / 14:01:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 17:58:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:12:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testCorrectResolving
--- a/JavaConstantPool.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaConstantPool.st Fri Jan 31 09:19:51 2014 +0000
@@ -238,56 +238,6 @@
ifTrue: [ entry invalidate] ].
"Created: / 13-05-2011 / 09:37:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-updateClassRefsFrom:oldClass to:newClass
-owner == oldClass ifTrue:[
- self halt.
- ^ self
-].
-
- self keysAndValuesDo:[:index :constItem |
- |nameIndex|
-
- constItem == oldClass ifTrue:[
- self at:index put:newClass
- ] ifFalse:[
- (constItem isNil
- or:[constItem isNumber]) ifFalse:[
- constItem isString ifTrue:[
- "/ nothing done ...
- ] ifFalse:[
- (constItem isMemberOf:(Java java_lang_String)) ifTrue:[
- "/ nothing done ...
- ] ifFalse:[
- constItem isBehavior ifFalse:[
- constItem updateClassRefsFrom:oldClass to:newClass
- ] ifTrue:[
- constItem isJavaClass ifTrue:[
- constItem fullName = oldClass fullName ifTrue:[
- 'JAVA: class update by name [in pool].' infoPrintCR.
- newClass isNil ifTrue:[
- "/ mhm - must find a slot for the classes name
- nameIndex := -1.
- self
- at:index
- put:(JavaUnresolvedClassConstant
- pool:self
- poolIndex:index
- nameIndex:nameIndex)
- ] ifFalse:[
- self at:index put:newClass
- ]
- ]
- ]
- ]
- ]
- ]
- ]
- ]
- ]
-
- "Modified: / 4.2.1998 / 22:12:03 / cg"
! !
!JavaConstantPool class methodsFor:'documentation'!
--- a/JavaConstants.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaConstants.st Fri Jan 31 09:19:51 2014 +0000
@@ -28,8 +28,8 @@
ACC_ENUM ACC_VOLATILE ACC_TRANSIENT ACC_OBSOLETE ACX_INITIALIZED
ACX_INITIALIZING ACX_BREAKPNT ACX_HASHANDLER ACX_HASFINALLY
ACX_HASFINALIZE AXC_RESOLVED ACX_HASMULTIVERS ACX_CLONEABLE
- LOCKWORD_TID_MASK LOCKWORD_TID_SHIFT LOCKWORD_CNT__MASK
- LOCKWORD_CNT_SHIFT'
+ ACX_R_VOID ACX_R_LONG ACX_R_DOUBLE LOCKWORD_TID_MASK
+ LOCKWORD_TID_SHIFT LOCKWORD_CNT__MASK LOCKWORD_CNT_SHIFT'
poolDictionaries:''
category:'Languages-Java-Support'
!
@@ -104,7 +104,11 @@
@global(JavaConstants:ACX_CLONEABLE)= __MKSMALLINT(__ACX_CLONEABLE);
#else
@global(JavaConstants:ACX_CLONEABLE)= __MKSMALLINT(__ACC_STRICT);
-#endif
+#endif
+
+ @global(JavaConstants:ACX_R_VOID)= __MKSMALLINT(__ACX_R_VOID);
+ @global(JavaConstants:ACX_R_LONG)= __MKSMALLINT(__ACX_R_LONG);
+ @global(JavaConstants:ACX_R_DOUBLE)= __MKSMALLINT(__ACX_R_DOUBLE);
@global(JavaConstants:LOCKWORD_TID_MASK) = __MKSMALLINT(__LOCKWORD_TID_MASK);
@global(JavaConstants:LOCKWORD_TID_SHIFT) = __MKSMALLINT(__LOCKWORD_TID_SHIFT);
@@ -116,7 +120,7 @@
"Created: / 25-10-2011 / 09:50:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 28-10-2011 / 16:56:17 / m"
- "Modified: / 12-11-2013 / 01:27:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:32:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaConstants class methodsFor:'constants'!
--- a/JavaFieldRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaFieldRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -20,10 +20,10 @@
"
"{ Package: 'stx:libjava' }"
-JavaClassContentRef2 subclass:#JavaFieldRef2
- instanceVariableNames:'offset type'
- classVariableNames:'T_LONG T_DOUBLE'
- poolDictionaries:''
+JavaClassMemberRef2 subclass:#JavaFieldRef2
+ instanceVariableNames:'resolvedOffset'
+ classVariableNames:''
+ poolDictionaries:'JavaConstants'
category:'Languages-Java-Reader-Support-new'
!
@@ -51,15 +51,28 @@
as of 1.9.2010
"
-! !
+!
-!JavaFieldRef2 class methodsFor:'initialization'!
+documentation
+"
+ A symbolic reference to a field.
+
+ [author:]
+ Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
+ Jan Vrany <jan.vrany@fit.cvut.cz>
-initialize
- T_LONG := 1.
- T_DOUBLE := 2.
+ [instance variables:]
+ !! resolvedOffset ...... once resolved, this slot contains physical offset
+ of the field within an instance (if instance field)
+ or of the static field withing a class instance
+ (if static field).
+ !!!!!! Used by the VM !!!!!!
- "Created: / 15-05-2011 / 22:31:19 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ [class variables:]
+
+ [see also:]
+
+"
! !
!JavaFieldRef2 methodsFor:'accessing'!
@@ -71,11 +84,17 @@
!
offset
- ^ offset.
+ ^ resolvedOffset.
"Created: / 15-05-2011 / 22:26:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
+resolvedOffset
+ ^ resolvedOffset.
+
+ "Created: / 31-01-2014 / 09:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
type
^ type.
@@ -87,105 +106,76 @@
findInstOffset
"fieldRef must be resolved before calling me"
- self assert: classCache notNil.
- self assert: valueCache notNil.
- ^ classCache instVarOffsetOf: self name.
+ self assert: resolvedClass notNil.
+ self assert: resolvedValue notNil.
+ ^ resolvedClass instVarOffsetOf: self name.
"Created: / 07-12-2011 / 13:44:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-findResolvedStaticValue
-
-self findResolvedValue.
-
- "Created: / 28-04-2011 / 22:05:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 03-12-2011 / 12:16:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-12-2011 / 13:37:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
findResolvedValue: doClassInit
"
- Stores resolved field in valueCache field, fills offset and
+ Stores resolved field in valueCache field, fills offset and
type fields.
"
- valueCache := JavaResolver uniqueInstance
+ resolvedValue := JavaResolver uniqueInstance
resolveFieldIndentifiedByRef: self.
- valueCache isStatic ifTrue: [ classCache := valueCache javaClass ] ifFalse: [
- classCache := self classRef resolve: doClassInit.
+ resolvedValue isStatic ifTrue: [ resolvedClass := resolvedValue javaClass ] ifFalse: [
+ resolvedClass := self classRef resolve: doClassInit.
].
- classCache isNil ifTrue: [ self breakPoint: #mh ].
+ resolvedClass isNil ifTrue: [ self breakPoint: #mh ].
self resolveOffset.
- nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
- self resolveType.
- nameAndTypeCache isNil ifTrue: [ self breakPoint: #mh ].
"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: / 12-10-2013 / 17:54:48 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:02:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
findStaticOffset
"fieldRef must be resolved before calling me"
- self assert: classCache notNil.
- self assert: valueCache notNil.
- ^ classCache class instVarOffsetOf: self name.
+ self assert: resolvedClass notNil.
+ self assert: resolvedValue notNil.
+ ^ resolvedClass class instVarOffsetOf: self name.
"Created: / 07-12-2011 / 13:45:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
preResolve
- self resolveType
-
- "Created: / 16-10-2012 / 10:45:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-resolveOffset
- "fieldRef must be resolved before calling me"
-
- self assert: valueCache notNil.
- self assert: classCache isJavaClass.
- valueCache isStatic ifTrue: [ offset := self findStaticOffset. ] ifFalse: [
- offset := self findInstOffset.
- ].
- self assert: offset notNil.
-
- "Modified: / 07-12-2011 / 21:47:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-resolveStaticOffset
- "fieldRef must be resolved before calling me"
-
- | currentClass |
- currentClass := classCache.
- self assert: (currentClass class instVarNames includes: self name).
- offset := currentClass class instVarOffsetOf: self name.
-
- "Modified: / 07-12-2011 / 13:38:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
-resolveType
| descriptor |
descriptor := (constantPool at: nameAndTypeIndex) descriptor.
type := 0.
descriptor = 'J' ifTrue:[
- type := T_LONG.
+ type := ACX_R_LONG.
] ifFalse:[
descriptor = 'D' ifTrue:[
- type := T_DOUBLE
+ type := ACX_R_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>"
+ "Created: / 16-10-2012 / 10:45:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:38:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+resolveOffset
+ "fieldRef must be resolved before calling me"
+
+ self assert: resolvedValue notNil.
+ self assert: resolvedClass isJavaClass.
+ resolvedValue isStatic ifTrue: [ resolvedOffset := self findStaticOffset. ] ifFalse: [
+ resolvedOffset := self findInstOffset.
+ ].
+ self assert: resolvedOffset notNil.
+
+ "Modified: / 07-12-2011 / 21:47:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !
!JavaFieldRef2 methodsFor:'resolving'!
invalidate
- offset := nil.
+ resolvedOffset := nil.
type := nil.
^ super invalidate.
@@ -208,5 +198,3 @@
^ 'Id'
! !
-
-JavaFieldRef2 initialize!
--- a/JavaFieldRefTests.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaFieldRefTests.st Fri Jan 31 09:19:51 2014 +0000
@@ -23,7 +23,7 @@
JavaRefsAndConstantPoolTestCase subclass:#JavaFieldRefTests
instanceVariableNames:''
classVariableNames:''
- poolDictionaries:''
+ poolDictionaries:'JavaConstants'
category:'Languages-Java-Tests-RuntimeConstantPool'
!
@@ -346,13 +346,14 @@
typed: '[C'
inClass: initString.
self assertTrue: (javaFieldRef isResolved not).
- self assertTrue: (javaFieldRef valueCache isNil).
+ self assertTrue: (javaFieldRef resolvedValue isNil).
self assertTrue: (javaFieldRef name = 'value').
self assertTrue: (javaFieldRef descriptor = '[C').
self assertTrue: (javaFieldRef classRef name = initString).
"Created: / 08-04-2011 / 14:01:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 16:28:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:12:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testCorrectResolving
@@ -371,12 +372,12 @@
classForName: 'stx.libjava.tests.mocks.PublicClass') fields
at: 3.
self assertTrue: (result = expectedResult).
- self assertTrue: (javaFieldRef offset = 4).
+ self assertTrue: (javaFieldRef resolvedOffset = 4).
self assertTrue: (javaFieldRef type = 0).
"Created: / 08-04-2011 / 14:07:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 17-11-2012 / 21:44:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 05-10-2013 / 23:58:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:15:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testInvalidation
--- a/JavaInterfaceMethodRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaInterfaceMethodRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -55,41 +55,29 @@
!JavaInterfaceMethodRef2 methodsFor:'private - resolving'!
-findResolvedStaticValue
- self halt: 'tell mh if you have valid use case for calling me'.
-
- "Created: / 28-04-2011 / 22:53:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 18-05-2011 / 12:44:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-!
-
findResolvedValue
"Resolve reference and set valueCache."
- valueCache := JavaResolver uniqueInstance
+ resolvedValue := JavaResolver uniqueInstance
resolveInterfaceMethodIdentifiedByRef: self.
- classCache := self classRef resolve.
- classCache ifNil: [ self breakPoint: #mh ].
- nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
- nameAndTypeCache ifNil: [ self breakPoint: #mh ].
+ resolvedClass := self classRef resolve.
"Modified: / 18-05-2011 / 12:44:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified (format): / 12-10-2013 / 18:07:51 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:01:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
findResolvedValue: doClassInit
"Resolve reference and set valueCache."
- valueCache := JavaResolver uniqueInstance resolveInterfaceMethodIdentifiedByRef: self.
- valueCache mclass classInit. "/ Apparently, invocation of interface method initializes the interface
- classCache := self classRef resolve: doClassInit.
- classCache isNil ifTrue: [ self breakPoint: #mh ].
- nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
- nameAndTypeCache isNil ifTrue: [ self breakPoint: #mh ].
+ resolvedValue := JavaResolver uniqueInstance resolveInterfaceMethodIdentifiedByRef: self.
+ resolvedValue mclass classInit. "/ Apparently, invocation of interface method initializes the interface
+ resolvedClass := self classRef resolve: doClassInit.
"Modified: / 18-05-2011 / 12:44:44 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 09-02-2012 / 23:10:44 / mh <hlopik@gmail.com>"
"Modified: / 12-10-2013 / 18:07:47 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
- "Modified (format): / 09-11-2013 / 00:15:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaInterfaceMethodRef2 methodsFor:'queries'!
--- a/JavaInterfaceMethodRefTests.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaInterfaceMethodRefTests.st Fri Jan 31 09:19:51 2014 +0000
@@ -64,13 +64,14 @@
typed: '()V'
inClass: initString.
self assertTrue: (javaMethodRef isResolved not).
- self assertTrue: (javaMethodRef valueCache isNil).
+ self assertTrue: (javaMethodRef resolvedValue isNil).
self assertTrue: (javaMethodRef name = 'run').
self assertTrue: (javaMethodRef descriptor = '()V').
self assertTrue: (javaMethodRef classRef name = 'Ljava/lang/Runnable;').
"Created: / 08-04-2011 / 14:01:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 17:19:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:13:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testCorrectResolving
--- a/JavaMethod.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaMethod.st Fri Jan 31 09:19:51 2014 +0000
@@ -26,9 +26,8 @@
classVariableNames:'AbstractMethodInvokationSignal SignatureTypeCodes
ForceByteCodeDisplay ShowFullSource UnresolvedClassSignal
A_PUBLIC A_PRIVATE A_PROTECTED A_STATIC A_FINAL A_SYNCHRONIZED
- A_ABSTRACT A_NATIVE A_BREAKPOINT R_VOID R_LONG R_DOUBLE
- A_HASHANDLER A_BRIDGE A_VARARGS A_STRICT A_SYNTHETIC A_RESOLVED
- A_HASFINALLY'
+ A_ABSTRACT A_NATIVE A_BREAKPOINT A_HASHANDLER A_BRIDGE A_VARARGS
+ A_STRICT A_SYNTHETIC A_RESOLVED A_HASFINALLY'
poolDictionaries:'JavaConstants'
category:'Languages-Java-Classes'
!
@@ -88,10 +87,6 @@
A_STRICT := 16r0800.
A_SYNTHETIC := 16r1000.
- R_VOID := 16r01000000.
- R_LONG := 16r02000000.
- R_DOUBLE := 16r04000000.
-
A_BREAKPOINT := 16r10000000.
A_HASHANDLER := 16r20000000.
A_HASFINALLY := 16r00004000.
@@ -122,7 +117,7 @@
"
"Modified: / 16-10-1998 / 01:29:48 / cg"
- "Modified: / 14-09-2013 / 11:58:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:35:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
reinitialize
@@ -162,24 +157,6 @@
"Created: / 27.1.1998 / 21:50:05 / cg"
!
-r_double
- ^R_DOUBLE
-
- "Created: / 15-10-2012 / 23:21:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-r_long
- ^R_LONG
-
- "Created: / 15-10-2012 / 23:20:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-r_void
- ^R_VOID
-
- "Created: / 15-10-2012 / 23:20:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
unresolvedClassSignal
"return the signal raised when an unresolved class is referenced"
@@ -1958,19 +1935,19 @@
"/ the flags ...
returnType == #void ifTrue:[
- accessFlags := accessFlags bitOr:R_VOID
+ accessFlags := accessFlags bitOr:ACX_R_VOID
] ifFalse:[
returnType == #long ifTrue:[
- accessFlags := accessFlags bitOr:R_LONG
+ accessFlags := accessFlags bitOr:ACX_R_LONG
] ifFalse:[
returnType == #double ifTrue:[
- accessFlags := accessFlags bitOr:R_DOUBLE
+ accessFlags := accessFlags bitOr:ACX_R_DOUBLE
]
]
].
"Created: / 14-08-2011 / 19:41:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 04-10-2013 / 13:02:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:33:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setSignature:aString
--- a/JavaMethodRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaMethodRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -20,10 +20,10 @@
"
"{ Package: 'stx:libjava' }"
-JavaClassContentRef2 subclass:#JavaMethodRef2
- instanceVariableNames:'selectorCache numArgSlotsCache returnTypeCache'
+JavaClassMemberRef2 subclass:#JavaMethodRef2
+ instanceVariableNames:'selector numArgSlots'
classVariableNames:''
- poolDictionaries:''
+ poolDictionaries:'JavaConstants'
category:'Languages-Java-Reader-Support-new'
!
@@ -51,6 +51,31 @@
as of 1.9.2010
"
+!
+
+documentation
+"
+ A symbolic reference to a method.
+
+ [author:]
+ Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+ !! selector ......... this slot contains a selector of the method,
+ as used by the VM. Used by JIT-compiler.
+ !!!!!! Used by the VM !!!!!!
+
+ !! numArgSlots ...... this slot number of arguments slots. Usually number of
+ method arguments, but long and double args count for 2.
+ Used by JIT-compiler.
+ !!!!!! Used by the VM !!!!!!
+
+ [class variables:]
+
+ [see also:]
+
+"
! !
!JavaMethodRef2 methodsFor:'printing & storing'!
@@ -73,16 +98,15 @@
findResolvedValue: doClassInit
"Resolve reference and set valueCache."
- valueCache := JavaResolver uniqueInstance
+ resolvedValue := JavaResolver uniqueInstance
resolveMethodIndentifiedByRef: self.
- classCache := valueCache javaClass.
- doClassInit ifTrue:[ classCache classInit ].
- nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
+ resolvedClass := resolvedValue javaClass.
+ doClassInit ifTrue:[ resolvedClass classInit ].
"Modified: / 18-05-2011 / 12:44:07 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 09-02-2012 / 23:10:32 / mh <hlopik@gmail.com>"
- "Modified: / 22-08-2012 / 14:53:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 12-10-2013 / 18:07:26 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:02:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaMethodRef2 methodsFor:'queries'!
@@ -99,30 +123,30 @@
"Fill in selectorCache and numArgSlotsCache for these are used
by the JIT-compiler"
- | returnTypeChar |
+ | returnTypeChar nameAndType |
- nameAndTypeCache := (constantPool at: nameAndTypeIndex) resolve.
- nameAndTypeCache isNil ifTrue: [ self breakPoint: #mh ].
- selectorCache isNil ifTrue: [
- selectorCache := (nameAndTypeCache name , nameAndTypeCache descriptor) asSymbol
+ nameAndType := self nameAndType.
+ selector isNil ifTrue: [
+ selector := (nameAndType name , nameAndType descriptor) asSymbol
].
- numArgSlotsCache := JavaMethod numArgsFromSignature: nameAndTypeCache descriptor.
- returnTypeChar := nameAndTypeCache descriptor last.
+ numArgSlots := JavaMethod numArgsFromSignature: nameAndType descriptor.
+ returnTypeChar := nameAndType descriptor last.
returnTypeChar == $V ifTrue:[
- returnTypeCache := JavaMethod r_void.
+ type := ACX_R_VOID.
] ifFalse:[
returnTypeChar == $J ifTrue:[
- returnTypeCache := JavaMethod r_long.
+ type := ACX_R_LONG.
] ifFalse:[
returnTypeChar == $D ifTrue:[
- returnTypeCache := JavaMethod r_double.
+ type := ACX_R_DOUBLE.
] ifFalse:[
- returnTypeCache := 0.
+ type := 0.
]
- ]
- ]
+ ].
+ ].
"Created: / 15-10-2012 / 23:13:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 03:34:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaMethodRef2 class methodsFor:'documentation'!
--- a/JavaMethodRefTests.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaMethodRefTests.st Fri Jan 31 09:19:51 2014 +0000
@@ -321,13 +321,14 @@
javaMethodRef := self getMethodRefNamed: '<init>' typed: '()V' inClass: initString.
self assertTrue: (javaMethodRef isResolved not).
- self assertTrue: (javaMethodRef valueCache isNil).
+ self assertTrue: (javaMethodRef resolvedValue isNil).
self assertTrue: (javaMethodRef name = '<init>').
self assertTrue: (javaMethodRef descriptor = '()V').
self assertTrue: (javaMethodRef classRef name = 'Ljava/lang/String;').
"Created: / 08-04-2011 / 14:01:41 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-05-2011 / 17:03:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:08:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
testCorrectResolving
--- a/JavaRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -21,7 +21,7 @@
"{ Package: 'stx:libjava' }"
Object subclass:#JavaRef2
- instanceVariableNames:'valueCache constantPool'
+ instanceVariableNames:'resolvedValue constantPool'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Reader-Support-new'
@@ -51,6 +51,42 @@
as of 1.9.2010
"
+!
+
+documentation
+"
+ An abstract superclass for symbolic references in Java class files.
+ A reference is either ''unresolved'' (when `resolvedValue` instvar nil)
+ or ''resolved'' (when ``resolvedValue`` instvar is not nil).
+
+ IMPORTANT: The exact physical structure of (sub)instances is known
+ by the VM and therefore changing number, order or meaning of individual
+ instance variables would imply to change the VM accordingly.
+ See comments in individual subclasses which instvars are accessed by the VM.
+
+ IMPORTANT: There's a naming convention:
+ Slots whose name starts with ''resolved'' are valid only after the reference
+ is resolved. Otherwise, they MUST have nil value.
+ Other slots MUST be valid once JavaClassReader finishes reading of the
+ .class file.
+
+ [author:]
+ Marcel Hlopko <marcel.hlopko@fit.cvut.cz>
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+ !! resolvedValue ..... resolved value whatever it is (class, method, field...).
+ It also serve as an indicator whether the reference
+ is unresolved (nil value) or resolved (non-nil value).
+ !!!!!! Used by the VM !!!!!!
+ constantPool ...... a constant pool to which this reference belongs.
+
+ [class variables:]
+
+ [see also:]
+ Subclasses
+
+"
! !
!JavaRef2 class methodsFor:'instance creation'!
@@ -81,10 +117,11 @@
!
isResolved
- ^ valueCache isNil not.
+ ^ resolvedValue notNil.
"Created: / 08-04-2011 / 11:36:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 08-04-2011 / 17:39:42 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 02:30:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
name
@@ -105,54 +142,37 @@
"Modified: / 12-05-2011 / 18:32:04 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-valueCache
- ^ valueCache.
-
- "Created: / 08-04-2011 / 11:37:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+resolvedValue
+ ^ resolvedValue
! !
!JavaRef2 methodsFor:'comparing'!
= anotherJavaRef
-^ self subclassResponsibility.
+
+ ^ self subclassResponsibility.
"Created: / 08-04-2011 / 12:15:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified (format): / 31-01-2014 / 03:14:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
hash
-^ self subclassResponsibility.
+ ^ self subclassResponsibility.
"Created: / 08-04-2011 / 12:15:51 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified (format): / 31-01-2014 / 03:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaRef2 methodsFor:'initialization'!
initialize
- valueCache := nil.
+ resolvedValue := nil.
super initialize.
"Modified: / 08-04-2011 / 17:39:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !
-!JavaRef2 methodsFor:'logging'!
-
-info: arg
-
- Logger log: arg severity: #info facility: 'JVM'
-
- "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 14-09-2011 / 21:47:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-warning: arg
-
- Logger log: arg severity: #warn facility: 'JVM'
-
- "Created: / 10-05-2011 / 15:01:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 14-09-2011 / 21:47:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!JavaRef2 methodsFor:'printing'!
displayString
@@ -206,8 +226,8 @@
| invalidated |
- invalidated := valueCache notNil.
- valueCache := nil.
+ invalidated := resolvedValue notNil.
+ resolvedValue := nil.
^ invalidated
"Created: / 08-04-2011 / 11:42:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -237,27 +257,17 @@
"Created: / 15-10-2012 / 23:13:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-preresolve
- "Pre-resolve some caches. Called when the constant pool
- is loaded. MUST NOT load new nor modify any existing class!!!!!!
- Ask JV for what this is needed"
-
- "Nothing by default"
-
- "Created: / 15-10-2012 / 23:08:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
resolve
"
Do it all method - resolves current reference and returns expected element (JavaMethod, JavaField etc.)
Hides implementation details of the way of dealing with invalidation etc. User should not need to call anything
else."
- self resolve: true.
- ^ valueCache.
+ ^ self resolve: true.
"Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 23-02-2012 / 17:21:39 / Marcel Hlopko <hlopik@gmail.com>"
+ "Modified (format): / 31-01-2014 / 09:08:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
resolve: doClassInit
@@ -274,27 +284,18 @@
].
]
].
- ^ valueCache.
+ ^ resolvedValue.
"Created: / 08-04-2011 / 11:30:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 09-02-2012 / 23:08:15 / mh <hlopik@gmail.com>"
"Modified: / 23-12-2013 / 23:02:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-updateClassRefsFrom: oldOwner to: newOwner
- self owner = oldOwner ifTrue: [
- self owner: newOwner.
- ].
-
- "Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 04-06-2011 / 17:54:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
! !
!JavaRef2 methodsFor:'testing'!
isUnresolved
- ^valueCache isNil
+ ^resolvedValue isNil
"Created: / 22-05-2011 / 14:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
--- a/JavaRefMock.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaRefMock.st Fri Jan 31 09:19:51 2014 +0000
@@ -77,16 +77,6 @@
^ self shouldImplement
! !
-!JavaRefMock methodsFor:'private - resolving'!
-
-findResolvedValue
- "Resolve reference and set valueCache and isResolved."
-
- valueCache := 'ok'.
-
- "Modified: / 08-04-2011 / 17:39:50 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
-! !
-
!JavaRefMock methodsFor:'resolving'!
invalidateForClass: internalJavaClassName
--- a/JavaRefsAndConstantPoolTestCase.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaRefsAndConstantPoolTestCase.st Fri Jan 31 09:19:51 2014 +0000
@@ -86,10 +86,12 @@
cp := JavaConstantPool new:2.
cp at: 1 put: (self getClassRefIn: cp withNameAt: 2).
cp at: 2 put: name.
+ cp do:[:ref|ref isJavaRef ifTrue:[ref preResolve]].
^ cp at: 1.
"Created: / 23-05-2011 / 16:17:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:11:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
getFieldRefNamed: name typed: type inClass: classString
@@ -106,9 +108,12 @@
getFieldRefIn: cp
withNameAndTypeAt: 6 andClassAt: 1).
cp at: 6 put: (self getNameAndTypeIn: cp withNameAt: 3 andTypeAt: 4).
+ cp do:[:ref|ref isJavaRef ifTrue:[ref preResolve]].
+
^ cp at: 5.
"Created: / 23-05-2011 / 15:56:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:11:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
getInterfaceMethodRefNamed: name typed: type inClass: classString
@@ -130,9 +135,11 @@
getNameAndTypeIn: cp
withNameAt: 3
andTypeAt: 4).
+ cp do:[:ref|ref isJavaRef ifTrue:[ref preResolve]].
^ cp at: 5.
"Created: / 23-05-2011 / 16:15:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
getMethodRefNamed: name typed: type inClass: classString
@@ -154,9 +161,11 @@
getNameAndTypeIn: cp
withNameAt: 3
andTypeAt: 4).
+ cp do:[:ref|ref isJavaRef ifTrue:[ref preResolve]].
^ cp at: 5.
"Created: / 23-05-2011 / 16:00:01 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:12:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaRefsAndConstantPoolTestCase methodsFor:'helpers'!
--- a/JavaStringRef2.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaStringRef2.st Fri Jan 31 09:19:51 2014 +0000
@@ -51,6 +51,22 @@
as of 1.9.2010
"
+!
+
+documentation
+"
+ A java.lang.String literal value.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
! !
!JavaStringRef2 class methodsFor:'instance creation'!
@@ -76,7 +92,7 @@
findResolvedValue: doClassInit
| myIndex |
- valueCache :=
+ resolvedValue :=
JavaVM
javaStringObjectForString: (constantPool at: valueIndex)
interned: true.
@@ -89,7 +105,7 @@
"/ myIndex := constantPool identityIndexOf: self.
"/ myIndex == 0 ifTrue:[self error:'Constant pool messed up. Should not happen'].
"/ constantPool at: myIndex put: valueCache.
- ^ valueCache.
+ ^ resolvedValue.
"Created: / 13-05-2011 / 17:21:49 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Created: / 23-02-2012 / 17:18:21 / Marcel Hlopko <hlopik@gmail.com>"
@@ -102,18 +118,6 @@
"Created: / 13-05-2011 / 17:20:22 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-invalidateForClass: internalJavaClassName
- "Invalidates receiver iff it refers (even indirectly)
- to a class ref that has been resolved to given class.
- Returns true, if the receiver has been invalidated,
- false otherwise"
-
- ^false
-
- "Created: / 13-05-2011 / 17:22:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 22-02-2012 / 20:52:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
name
"dont use me, I'm here just because marcel was not sure he found and fixed all senders"
self breakPoint: #mh.
--- a/JavaVM.st Thu Jan 30 23:40:39 2014 +0000
+++ b/JavaVM.st Fri Jan 31 09:19:51 2014 +0000
@@ -5172,12 +5172,13 @@
"Called by jitted code for GETFIELD insn iff fieldref is not yet resolved"
obj isNil ifTrue:[
- ^self throwNullPointerException.
+ ^self throwNullPointerException.
].
fieldRef resolve.
- ^ obj instVarAt: fieldRef offset.
+ ^ obj instVarAt: fieldRef resolvedOffset.
"Created: / 20-01-2014 / 14:56:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:15:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_GETSTATIC_R: fieldRef
@@ -5188,9 +5189,10 @@
fieldRef resolve.
class := fieldRef javaClass.
class classInitInternal.
- ^ class instVarAt: fieldRef offset.
+ ^ class instVarAt: fieldRef resolvedOffset.
"Created: / 20-01-2014 / 15:03:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:15:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_INSTANCEOF:obj _:cls
@@ -6873,13 +6875,14 @@
"Called by jitted code for PUTFIELD insn iff fieldref is not yet resolved"
obj isNil ifTrue:[
- ^self throwNullPointerException.
+ ^self throwNullPointerException.
].
fieldRef resolve.
- ^ obj instVarAt: fieldRef offset put: value
+ ^ obj instVarAt: fieldRef resolvedOffset put: value
"Created: / 20-01-2014 / 15:01:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:15:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_PUTSTATIC_R: fieldRef _: value
@@ -6890,9 +6893,10 @@
fieldRef resolve.
class := fieldRef javaClass.
class classInitInternal.
- ^ class instVarAt: fieldRef offset put: value
+ ^ class instVarAt: fieldRef resolvedOffset put: value
"Created: / 20-01-2014 / 15:06:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 31-01-2014 / 09:16:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaVM class methodsFor:'windows - events'!
--- a/Make.proto Thu Jan 30 23:40:39 2014 +0000
+++ b/Make.proto Fri Jan 31 09:19:51 2014 +0000
@@ -242,7 +242,7 @@
$(OUTDIR)JavaByteCodeEnumerator.$(O) JavaByteCodeEnumerator.$(H): JavaByteCodeEnumerator.st $(INCLUDE_TOP)/stx/libjava/JavaDecompiler.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodeProcessorAdapter.$(O) JavaByteCodeProcessorAdapter.$(H): JavaByteCodeProcessorAdapter.st $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassAnnotationContainer.$(O) JavaClassAnnotationContainer.$(H): JavaClassAnnotationContainer.st $(INCLUDE_TOP)/stx/libjava/JavaAnnotationContainer.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaClassContentRef2.$(O) JavaClassContentRef2.$(H): JavaClassContentRef2.st $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaClassMemberRef2.$(O) JavaClassMemberRef2.$(H): JavaClassMemberRef2.st $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassReader.$(O) JavaClassReader.$(H): JavaClassReader.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassRef2.$(O) JavaClassRef2.$(H): JavaClassRef2.st $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassRegistry.$(O) JavaClassRegistry.$(H): JavaClassRegistry.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -273,9 +273,9 @@
$(OUTDIR)JavaClass.$(O) JavaClass.$(H): JavaClass.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libjava/JavaBehavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Array.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(STCHDR)
$(OUTDIR)JavaClassMirror.$(O) JavaClassMirror.$(H): JavaClassMirror.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMirror.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassPathBundle.$(O) JavaClassPathBundle.$(H): JavaClassPathBundle.st $(INCLUDE_TOP)/stx/libjava/JavaCodeBundle.$(H) $(INCLUDE_TOP)/stx/libjava/JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClassMemberRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodAnalyzer.$(O) JavaMethodAnalyzer.$(H): JavaMethodAnalyzer.st $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessorAdapter.$(H) $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaConstants.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClassMemberRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(INCLUDE_TOP)/stx/libjava/JavaMethod.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_OpenJDK7.$(O) JavaNativeMethodImpl_OpenJDK7.$(H): JavaNativeMethodImpl_OpenJDK7.st $(INCLUDE_TOP)/stx/libjava/JavaVMData.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK6.$(O) JavaNativeMethodImpl_SunJDK6.$(H): JavaNativeMethodImpl_SunJDK6.st $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -287,7 +287,7 @@
$(OUTDIR)ProxyMethodMethodInvocationNode.$(O) ProxyMethodMethodInvocationNode.$(H): ProxyMethodMethodInvocationNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodTypeCheckNode.$(O) ProxyMethodTypeCheckNode.$(H): ProxyMethodTypeCheckNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GroovyClass.$(O) GroovyClass.$(H): GroovyClass.st $(INCLUDE_TOP)/stx/libjava/JavaClass.$(H) $(INCLUDE_TOP)/stx/libjava/JavaBehavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaMethodRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaMethodRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClassMemberRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithHandler.$(O) JavaMethodWithHandler.$(H): JavaMethodWithHandler.st $(INCLUDE_TOP)/stx/libjava/JavaMethodWithException.$(H) $(INCLUDE_TOP)/stx/libjava/JavaMethod.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK7.$(O) JavaNativeMethodImpl_SunJDK7.$(H): JavaNativeMethodImpl_SunJDK7.st $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK7.$(H) $(INCLUDE_TOP)/stx/libjava/JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaMethodInvocationNode.$(O) ProxyMethodJavaMethodInvocationNode.$(H): ProxyMethodJavaMethodInvocationNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodMethodInvocationNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec Thu Jan 30 23:40:39 2014 +0000
+++ b/Make.spec Fri Jan 31 09:19:51 2014 +0000
@@ -127,7 +127,7 @@
JavaByteCodeEnumerator \
JavaByteCodeProcessorAdapter \
JavaClassAnnotationContainer \
- JavaClassContentRef2 \
+ JavaClassMemberRef2 \
JavaClassReader \
JavaClassRef2 \
JavaClassRegistry \
@@ -260,7 +260,7 @@
$(OUTDIR_SLASH)JavaByteCodeEnumerator.$(O) \
$(OUTDIR_SLASH)JavaByteCodeProcessorAdapter.$(O) \
$(OUTDIR_SLASH)JavaClassAnnotationContainer.$(O) \
- $(OUTDIR_SLASH)JavaClassContentRef2.$(O) \
+ $(OUTDIR_SLASH)JavaClassMemberRef2.$(O) \
$(OUTDIR_SLASH)JavaClassReader.$(O) \
$(OUTDIR_SLASH)JavaClassRef2.$(O) \
$(OUTDIR_SLASH)JavaClassRegistry.$(O) \
--- a/abbrev.stc Thu Jan 30 23:40:39 2014 +0000
+++ b/abbrev.stc Fri Jan 31 09:19:51 2014 +0000
@@ -95,7 +95,7 @@
JavaByteCodeEnumerator JavaByteCodeEnumerator stx:libjava 'Languages-Java-Support-Decompiling' 0
JavaByteCodeProcessorAdapter JavaByteCodeProcessorAdapter stx:libjava 'Languages-Java-Bytecode' 0
JavaClassAnnotationContainer JavaClassAnnotationContainer stx:libjava 'Languages-Java-Annotations' 1
-JavaClassContentRef2 JavaClassContentRef2 stx:libjava 'Languages-Java-Reader-Support-new' 0
+JavaClassMemberRef2 JavaClassMemberRef2 stx:libjava 'Languages-Java-Reader-Support-new' 0
JavaClassReader JavaClassReader stx:libjava 'Languages-Java-Support' 0
JavaClassReaderTests JavaClassReaderTests stx:libjava 'Languages-Java-Tests-RuntimeConstantPool' 1
JavaClassRef2 JavaClassRef2 stx:libjava 'Languages-Java-Reader-Support-new' 0
--- a/bc.mak Thu Jan 30 23:40:39 2014 +0000
+++ b/bc.mak Fri Jan 31 09:19:51 2014 +0000
@@ -175,7 +175,7 @@
$(OUTDIR)JavaByteCodeEnumerator.$(O) JavaByteCodeEnumerator.$(H): JavaByteCodeEnumerator.st $(INCLUDE_TOP)\stx\libjava\JavaDecompiler.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodeProcessorAdapter.$(O) JavaByteCodeProcessorAdapter.$(H): JavaByteCodeProcessorAdapter.st $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassAnnotationContainer.$(O) JavaClassAnnotationContainer.$(H): JavaClassAnnotationContainer.st $(INCLUDE_TOP)\stx\libjava\JavaAnnotationContainer.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaClassContentRef2.$(O) JavaClassContentRef2.$(H): JavaClassContentRef2.st $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaClassMemberRef2.$(O) JavaClassMemberRef2.$(H): JavaClassMemberRef2.st $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassReader.$(O) JavaClassReader.$(H): JavaClassReader.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassRef2.$(O) JavaClassRef2.$(H): JavaClassRef2.st $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassRegistry.$(O) JavaClassRegistry.$(H): JavaClassRegistry.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -206,9 +206,9 @@
$(OUTDIR)JavaClass.$(O) JavaClass.$(H): JavaClass.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libjava\JavaBehavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Array.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(STCHDR)
$(OUTDIR)JavaClassMirror.$(O) JavaClassMirror.$(H): JavaClassMirror.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMirror.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaClassPathBundle.$(O) JavaClassPathBundle.$(H): JavaClassPathBundle.st $(INCLUDE_TOP)\stx\libjava\JavaCodeBundle.$(H) $(INCLUDE_TOP)\stx\libjava\JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClassMemberRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodAnalyzer.$(O) JavaMethodAnalyzer.$(H): JavaMethodAnalyzer.st $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessorAdapter.$(H) $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaConstants.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClassMemberRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(INCLUDE_TOP)\stx\libjava\JavaMethod.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_OpenJDK7.$(O) JavaNativeMethodImpl_OpenJDK7.$(H): JavaNativeMethodImpl_OpenJDK7.st $(INCLUDE_TOP)\stx\libjava\JavaVMData.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK6.$(O) JavaNativeMethodImpl_SunJDK6.$(H): JavaNativeMethodImpl_SunJDK6.st $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -220,7 +220,7 @@
$(OUTDIR)ProxyMethodMethodInvocationNode.$(O) ProxyMethodMethodInvocationNode.$(H): ProxyMethodMethodInvocationNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodTypeCheckNode.$(O) ProxyMethodTypeCheckNode.$(H): ProxyMethodTypeCheckNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GroovyClass.$(O) GroovyClass.$(H): GroovyClass.st $(INCLUDE_TOP)\stx\libjava\JavaClass.$(H) $(INCLUDE_TOP)\stx\libjava\JavaBehavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaMethodRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaInterfaceMethodRef2.$(O) JavaInterfaceMethodRef2.$(H): JavaInterfaceMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaMethodRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClassMemberRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithHandler.$(O) JavaMethodWithHandler.$(H): JavaMethodWithHandler.st $(INCLUDE_TOP)\stx\libjava\JavaMethodWithException.$(H) $(INCLUDE_TOP)\stx\libjava\JavaMethod.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaNativeMethodImpl_SunJDK7.$(O) JavaNativeMethodImpl_SunJDK7.$(H): JavaNativeMethodImpl_SunJDK7.st $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK7.$(H) $(INCLUDE_TOP)\stx\libjava\JavaNativeMethodImpl_OpenJDK6.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaMethodInvocationNode.$(O) ProxyMethodJavaMethodInvocationNode.$(H): ProxyMethodJavaMethodInvocationNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodMethodInvocationNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/libInit.cc Thu Jan 30 23:40:39 2014 +0000
+++ b/libInit.cc Fri Jan 31 09:19:51 2014 +0000
@@ -104,7 +104,7 @@
_JavaByteCodeEnumerator_Init(pass,__pRT__,snd);
_JavaByteCodeProcessorAdapter_Init(pass,__pRT__,snd);
_JavaClassAnnotationContainer_Init(pass,__pRT__,snd);
-_JavaClassContentRef2_Init(pass,__pRT__,snd);
+_JavaClassMemberRef2_Init(pass,__pRT__,snd);
_JavaClassReader_Init(pass,__pRT__,snd);
_JavaClassRef2_Init(pass,__pRT__,snd);
_JavaClassRegistry_Init(pass,__pRT__,snd);
--- a/libjava.rc Thu Jan 30 23:40:39 2014 +0000
+++ b/libjava.rc Fri Jan 31 09:19:51 2014 +0000
@@ -3,7 +3,7 @@
// automagically generated from the projectDefinition: stx_libjava.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,32767,32767
+ FILEVERSION 6,2,1791,1791
PRODUCTVERSION 6,2,3,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -20,12 +20,12 @@
BEGIN
VALUE "CompanyName", "eXept Software AG & SWING Research Group\0"
VALUE "FileDescription", "Java support for Smalltalk/X (LIB)\0"
- VALUE "FileVersion", "6.2.32767.32767\0"
+ VALUE "FileVersion", "6.2.1791.1791\0"
VALUE "InternalName", "stx:libjava\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n SWING Research Group, Czech Technical University In Prague\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Mon, 20 Jan 2014 13:59:16 GMT\0"
+ VALUE "ProductDate", "Fri, 31 Jan 2014 09:19:03 GMT\0"
END
END
--- a/stx_libjava.st Thu Jan 30 23:40:39 2014 +0000
+++ b/stx_libjava.st Fri Jan 31 09:19:51 2014 +0000
@@ -401,7 +401,7 @@
JavaByteCodeEnumerator
JavaByteCodeProcessorAdapter
JavaClassAnnotationContainer
- JavaClassContentRef2
+ JavaClassMemberRef2
JavaClassReader
(JavaClassReaderTests autoload)
JavaClassRef2