*** empty log message ***
authorcg
Thu, 31 Jul 1997 22:34:20 +0000
changeset 185 99ff1b6d90fe
parent 184 f65eb9c4ba6e
child 186 6aafd9bbc30b
*** empty log message ***
JavaClass.st
--- a/JavaClass.st	Thu Jul 31 22:33:54 1997 +0000
+++ b/JavaClass.st	Thu Jul 31 22:34:20 1997 +0000
@@ -176,6 +176,21 @@
     "Modified: 30.7.1997 / 15:35:22 / cg"
 !
 
+compiledMethodAt:name signature:sig
+    "lookup the classes methodDictionary"
+
+    methodDictionary keysAndValuesDo:[:mFullSelector :aMethod |
+        aMethod name == name ifTrue:[
+            aMethod signature == sig ifTrue:[
+                ^ aMethod
+            ]
+        ]
+    ].
+    ^ nil
+
+    "Created: 1.8.1997 / 00:01:58 / cg"
+!
+
 constantPool
     ^ constantPool
 !
@@ -932,7 +947,7 @@
     "
 
     "Created: 30.7.1997 / 14:06:50 / cg"
-    "Modified: 30.7.1997 / 14:07:55 / cg"
+    "Modified: 1.8.1997 / 00:06:56 / cg"
 !
 
 invoke:selector signature:signature
@@ -946,18 +961,12 @@
         sig notNil ifTrue:[
             cls := self.
             [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-                cls methodDictionary keysAndValuesDo:[:sel :aMethod |
-
-                    aMethod name == selector ifTrue:[
-                        aMethod signature == signature ifTrue:[
-                            aMethod numArgs == 0 ifTrue:[
-                                ^ self 
-                                    invokeJavaMethod:aMethod 
-                                    sender:thisContext
-                                    selector:selector
-                            ]
-                        ]
-                    ]
+                method := cls compiledMethodAt:sel signature:signature.
+                method notNil ifTrue:[
+                    ^ self 
+                        invokeJavaMethod:method 
+                        sender:thisContext
+                        selector:sel
                 ].
                 cls := cls superclass.
             ].
@@ -985,8 +994,8 @@
      stack invoke:#size. 
     "
 
-    "Modified: 30.7.1997 / 14:07:55 / cg"
     "Created: 30.7.1997 / 14:12:29 / cg"
+    "Modified: 1.8.1997 / 00:04:45 / cg"
 !
 
 invoke:selector signature:signature with:arg
@@ -1000,19 +1009,13 @@
         sig notNil ifTrue:[
             cls := self.
             [cls notNil and:[cls ~~ JavaObject]] whileTrue:[
-                cls methodDictionary keysAndValuesDo:[:mFullSelector :aMethod |
-
-                    aMethod name == sel ifTrue:[
-                        aMethod signature == sig ifTrue:[
-                            aMethod numArgs == 1 ifTrue:[
-                                ^ self 
-                                    invokeJavaMethod:aMethod 
-                                    sender:thisContext
-                                    selector:selector
-                                    with:arg
-                            ]
-                        ]
-                    ]
+                method := cls compiledMethodAt:sel signature:signature.
+                method notNil ifTrue:[
+                    ^ self 
+                        invokeJavaMethod:method 
+                        sender:thisContext
+                        selector:sel
+                        with:arg
                 ].
                 cls := cls superclass.
             ].
@@ -1041,7 +1044,7 @@
     "
 
     "Created: 30.7.1997 / 14:13:30 / cg"
-    "Modified: 30.7.1997 / 14:19:57 / cg"
+    "Modified: 1.8.1997 / 00:04:40 / cg"
 !
 
 invoke:selector with:arg
@@ -1220,6 +1223,6 @@
 !JavaClass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.53 1997/07/31 21:14:24 cg Exp $'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaClass.st,v 1.54 1997/07/31 22:34:20 cg Exp $'
 ! !
 JavaClass initialize!