Package stx:libjava/experiments cleanup.
Few methods moved to stx:libjava (as they are used by stx:libjava code)
Few methods removed - they are no longer used!
--- a/JavaClass.st Sat Feb 16 12:33:02 2013 +0100
+++ b/JavaClass.st Sat Feb 16 16:15:51 2013 +0000
@@ -1887,6 +1887,77 @@
^nil.
"Created: / 17-03-2012 / 16:41:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+lookupMethodFor:selector
+ |method cls sel queue |
+
+ sel := selector asSymbolIfInterned.
+ sel notNil ifTrue:[
+ queue := OrderedCollection with: self.
+ [ queue isEmpty ] whileFalse:[
+ cls := queue removeFirst.
+ method := cls compiledMethodAt:sel.
+ method notNil ifTrue:[ ^ method ].
+ cls isInterface ifFalse:[
+ cls superclass ~~ JavaObject ifTrue:[queue add: cls superclass]
+ ].
+ queue addAll: cls interfaces.
+ ].
+ ].
+ "/cls ifNotNil:[^super lookupMethodFor: selector].
+ ^ nil
+
+ "Modified: / 19-10-2011 / 17:19:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+performStatic:selector
+ "send a static message, without args."
+
+ |javaMethod sel|
+
+ sel := selector asSymbolIfInterned.
+ sel notNil ifTrue:[
+ javaMethod := methodDictionary at:sel.
+ javaMethod notNil ifTrue:[
+ javaMethod isStatic ifTrue:[
+ ^ javaMethod
+ valueWithReceiver:self
+ arguments:#()
+ ]
+ ].
+ ].
+
+ ^ self doesNotUnderstand:(Message selector:selector)
+
+ "Modified: / 15.1.1998 / 00:31:27 / cg"
+ "Created: / 12.11.1998 / 16:29:20 / cg"
+!
+
+performStatic:selector with:arg
+ "send a static message, with one args."
+
+ |javaMethod sel|
+
+ sel := selector asSymbolIfInterned.
+ sel notNil ifTrue:[
+ javaMethod := methodDictionary at:sel.
+ javaMethod notNil ifTrue:[
+ javaMethod isStatic ifTrue:[
+ ^ javaMethod
+ valueWithReceiver:self
+ arguments:(Array with:arg)
+ selector:selector
+ search:nil
+ sender:nil
+ ]
+ ].
+ ].
+
+ ^ self doesNotUnderstand:(Message selector:selector argument:arg)
+
+ "Modified: / 15.1.1998 / 00:31:27 / cg"
+ "Created: / 10.12.1998 / 21:50:29 / cg"
! !
--- a/JavaObject.st Sat Feb 16 12:33:02 2013 +0100
+++ b/JavaObject.st Sat Feb 16 16:15:51 2013 +0000
@@ -293,6 +293,18 @@
"Created: / 04-12-2011 / 19:28:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!JavaObject methodsFor:'message sending'!
+
+doesNotUnderstand:aMessage
+ | sender |
+ sender := thisContext sender.
+ ^ self class perform: aMessage onReceiver: self from: sender ifNotFound: [ ^ super doesNotUnderstand: aMessage ].
+
+ "Modified: / 16-11-1998 / 16:50:56 / cg"
+ "Modified: / 19-09-2011 / 23:43:56 / Jan Kurs <kursjan@fit.cvut.cz>"
+ "Modified: / 15-12-2011 / 23:43:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-01-2012 / 19:49:35 / kursjan <kursjan@fit.cvut.cz>"
+! !
!JavaObject methodsFor:'printing & storing'!
--- a/experiments/Make.proto Sat Feb 16 12:33:02 2013 +0100
+++ b/experiments/Make.proto Sat Feb 16 16:15:51 2013 +0000
@@ -122,6 +122,7 @@
postMake:: cleanjunk
prereq: $(REQUIRED_SUPPORT_DIRS)
+ cd $(TOP)/../squeak/petitparser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libcomp && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
@@ -135,7 +136,6 @@
cd ../../goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libui && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../goodies/petitparser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
- cd $(TOP)/../squeak/petitparser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libwidg2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
cd ../../libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
@@ -165,7 +165,6 @@
$(OUTDIR)SetSample.$(O) SetSample.$(H): SetSample.st $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)stx_libjava_experiments.$(O) stx_libjava_experiments.$(H): stx_libjava_experiments.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodeSteppableInterpreter.$(O) JavaByteCodeSteppableInterpreter.$(H): JavaByteCodeSteppableInterpreter.st $(INCLUDE_TOP)/stx/libjava/experiments/JavaByteCodeInterpreter.$(H) $(INCLUDE_TOP)/stx/libjava/JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(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/libjava/JavaMethodDescriptor.$(H) $(INCLUDE_TOP)/stx/libjava/JavaDescriptor.$(H) $(INCLUDE_TOP)/stx/libjava/JavaClass.$(H) $(INCLUDE_TOP)/stx/libjava/JavaBehavior.$(H) $(INCLUDE_TOP)/stx/libjava/JavaObject.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/experiments/Make.spec Sat Feb 16 12:33:02 2013 +0100
+++ b/experiments/Make.spec Sat Feb 16 16:15:51 2013 +0000
@@ -73,7 +73,6 @@
$(OUTDIR_SLASH)JavaByteCodeInterpreter.$(O) \
$(OUTDIR_SLASH)JavaByteCodeSteppableInterpreter.$(O) \
$(OUTDIR_SLASH)JavaCompiler.$(O) \
- $(OUTDIR_SLASH)extensions.$(O) \
--- a/experiments/bc.mak Sat Feb 16 12:33:02 2013 +0100
+++ b/experiments/bc.mak Sat Feb 16 16:15:51 2013 +0000
@@ -50,6 +50,7 @@
# build all prerequisite packages for this package
prereq:
+ pushd ..\..\..\squeak\petitparser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libcomp & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -63,7 +64,6 @@
pushd ..\..\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libui & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\goodies\petitparser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
- pushd ..\..\..\squeak\petitparser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libwidg2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
pushd ..\..\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
@@ -90,7 +90,6 @@
$(OUTDIR)SetSample.$(O) SetSample.$(H): SetSample.st $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)stx_libjava_experiments.$(O) stx_libjava_experiments.$(H): stx_libjava_experiments.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaByteCodeSteppableInterpreter.$(O) JavaByteCodeSteppableInterpreter.$(H): JavaByteCodeSteppableInterpreter.st $(INCLUDE_TOP)\stx\libjava\experiments\JavaByteCodeInterpreter.$(H) $(INCLUDE_TOP)\stx\libjava\JavaByteCodeProcessor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)extensions.$(O): extensions.st $(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\libjava\JavaMethodDescriptor.$(H) $(INCLUDE_TOP)\stx\libjava\JavaDescriptor.$(H) $(INCLUDE_TOP)\stx\libjava\JavaClass.$(H) $(INCLUDE_TOP)\stx\libjava\JavaBehavior.$(H) $(INCLUDE_TOP)\stx\libjava\JavaObject.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/experiments/experiments.rc Sat Feb 16 12:33:02 2013 +0100
+++ b/experiments/experiments.rc Sat Feb 16 16:15:51 2013 +0000
@@ -3,7 +3,7 @@
// automagically generated from the projectDefinition: stx_libjava_experiments.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,564,564
+ FILEVERSION 6,2,32767,32767
PRODUCTVERSION 6,2,3,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
@@ -20,12 +20,12 @@
BEGIN
VALUE "CompanyName", "eXept Software AG\0"
VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
- VALUE "FileVersion", "6.2.564.564\0"
+ VALUE "FileVersion", "6.2.32767.32767\0"
VALUE "InternalName", "stx:libjava/experiments\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2013\nCopyright eXept Software AG 1998-2013\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Thu, 14 Feb 2013 16:12:11 GMT\0"
+ VALUE "ProductDate", "Sat, 16 Feb 2013 16:12:25 GMT\0"
END
END
--- a/experiments/extensions.st Sat Feb 16 12:33:02 2013 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-"{ Package: 'stx:libjava/experiments' }"!
-
-!Class methodsFor:'method lookup'!
-
-box: sObj toType: type
- ^ (JavaTypeBox typeBoxForJava: type) box: sObj.
-
- "Created: / 06-09-2011 / 22:12:59 / Jan Kurs <kursjan@fit.cvut.cz>"
-! !
-
-!Class methodsFor:'method lookup'!
-
-unbox: javaArgumentsCollection to: typesCollection
- " box smalltalk arguments collection to Java arguments "
-"/ ^ stArgumentsCollection with: typesCollection collect: [ :stObject :javaType |
-"/ (JavaTypeBox javaTypeAt: javaType) box: stObject.
-"/ ]
- ^ javaArgumentsCollection.
-
- "Created: / 25-09-2011 / 20:22:59 / Jan Kurs <kursjan@fit.cvut.cz>"
-! !
-
-!JavaClass methodsFor:'queries'!
-
-javaWrappedClass
- "Returns true, iff receiver is one of the Java wrapper classes or String"
-
- name == #'java/lang/Byte' ifTrue:[^JavaByte].
- name == #'java/lang/Short' ifTrue:[^JavaShort].
- name == #'java/lang/Integer' ifTrue:[^SmallInteger].
- name == #'java/lang/Long' ifTrue:[^LargeInteger].
- name == #'java/lang/Character' ifTrue:[^Character].
- name == #'java/lang/Boolean' ifTrue:[^Boolean].
- name == #'java/lang/String' ifTrue:[^String].
-
- ^nil.
-
- "Created: / 03-01-2012 / 22:43:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaClass methodsFor:'message sending'!
-
-lookupMethodFor:selector
- |method cls sel queue |
-
- sel := selector asSymbolIfInterned.
- sel notNil ifTrue:[
- queue := OrderedCollection with: self.
- [ queue isEmpty ] whileFalse:[
- cls := queue removeFirst.
- method := cls compiledMethodAt:sel.
- method notNil ifTrue:[ ^ method ].
- cls isInterface ifFalse:[
- cls superclass ~~ JavaObject ifTrue:[queue add: cls superclass]
- ].
- queue addAll: cls interfaces.
- ].
- ].
- "/cls ifNotNil:[^super lookupMethodFor: selector].
- ^ nil
-
- "Modified: / 19-10-2011 / 17:19:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaClass methodsFor:'message sending'!
-
-performStatic:selector
- "send a static message, without args."
-
- |javaMethod sel|
-
- sel := selector asSymbolIfInterned.
- sel notNil ifTrue:[
- javaMethod := methodDictionary at:sel.
- javaMethod notNil ifTrue:[
- javaMethod isStatic ifTrue:[
- ^ javaMethod
- valueWithReceiver:self
- arguments:#()
- ]
- ].
- ].
-
- ^ self doesNotUnderstand:(Message selector:selector)
-
- "Modified: / 15.1.1998 / 00:31:27 / cg"
- "Created: / 12.11.1998 / 16:29:20 / cg"
-! !
-
-!JavaClass methodsFor:'message sending'!
-
-performStatic:selector with:arg
- "send a static message, with one args."
-
- |javaMethod sel|
-
- sel := selector asSymbolIfInterned.
- sel notNil ifTrue:[
- javaMethod := methodDictionary at:sel.
- javaMethod notNil ifTrue:[
- javaMethod isStatic ifTrue:[
- ^ javaMethod
- valueWithReceiver:self
- arguments:(Array with:arg)
- selector:selector
- search:nil
- sender:nil
- ]
- ].
- ].
-
- ^ self doesNotUnderstand:(Message selector:selector argument:arg)
-
- "Modified: / 15.1.1998 / 00:31:27 / cg"
- "Created: / 10.12.1998 / 21:50:29 / cg"
-! !
-
-!JavaMethodDescriptor methodsFor:'accessing'!
-
-guardCondition
-
- "Answers a condition usable in guard that checks if all types of all arguments matches"
-
- | g |
-
- self assert: parameters size ~~ 0. "/Should not be called in that case..."
- g := ProxyMethodJavaTypeCheckNode type: parameters first javaClass argument: 1.
- parameters size > 1 ifTrue:[
- 2 to: parameters size do:[:i|
- g := g and: (ProxyMethodJavaTypeCheckNode type: (parameters at: i) javaClass argument: i)
- ].
- ].
- ^g
-
- "Created: / 06-12-2011 / 22:27:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaObject methodsFor:'message sending'!
-
-doesNotUnderstand:aMessage
- | sender |
- sender := thisContext sender.
- ^ self class perform: aMessage onReceiver: self from: sender ifNotFound: [ ^ super doesNotUnderstand: aMessage ].
-
- "Modified: / 16-11-1998 / 16:50:56 / cg"
- "Modified: / 19-09-2011 / 23:43:56 / Jan Kurs <kursjan@fit.cvut.cz>"
- "Modified: / 15-12-2011 / 23:43:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 01-01-2012 / 19:49:35 / kursjan <kursjan@fit.cvut.cz>"
-! !
-
-!stx_libjava_experiments class methodsFor:'documentation'!
-
-extensionsVersion_HG
-
- ^ '$Changeset: <not expanded> $'
-! !
\ No newline at end of file
--- a/experiments/libInit.cc Sat Feb 16 12:33:02 2013 +0100
+++ b/experiments/libInit.cc Sat Feb 16 16:15:51 2013 +0000
@@ -37,6 +37,6 @@
_stx_137libjava_137experiments_Init(pass,__pRT__,snd);
_JavaByteCodeSteppableInterpreter_Init(pass,__pRT__,snd);
-_stx_137libjava_137experiments_extensions_Init(pass,__pRT__,snd);
+
__END_PACKAGE__();
}
--- a/libjava.rc Sat Feb 16 12:33:02 2013 +0100
+++ b/libjava.rc Sat Feb 16 16:15:51 2013 +0000
@@ -25,7 +25,7 @@
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", "Sat, 16 Feb 2013 09:30:37 GMT\0"
+ VALUE "ProductDate", "Sat, 16 Feb 2013 16:12:45 GMT\0"
END
END