src/JavaMethod.st
branchjk_new_structure
changeset 872 c48fb6d0d21c
parent 841 4db3d65dfd33
child 877 f5a5b93e1c78
--- a/src/JavaMethod.st	Mon Jul 18 17:25:20 2011 +0000
+++ b/src/JavaMethod.st	Mon Jul 18 22:35:32 2011 +0000
@@ -740,42 +740,6 @@
     "Modified: / 8.1.1998 / 19:09:31 / cg"
 ! !
 
-!JavaMethod methodsFor:'* As yet uncategorized *'!
-
-isSynthetic
-    ^false
-
-    "Created: / 18-10-2010 / 19:09:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-nameSpaceName
-
-    ^''
-
-    "Created: / 18-10-2010 / 19:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-previousVersionCode
-
-    ^nil
-
-    "Created: / 18-10-2010 / 20:15:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-shouldBeSkippedInDebuggersWalkBack
-
-    ^false
-
-    "Created: / 30-11-2010 / 15:35:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-wrapper
-
-    ^nil
-
-    "Created: / 18-10-2010 / 19:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
 !JavaMethod methodsFor:'accessing'!
 
 accessFlags
@@ -800,6 +764,15 @@
     ^ self class argSigArrayFromSignature:signature
 !
 
+asByteCodeMethod
+
+    "JavaMethods are always bytecode methods"
+
+    ^self
+
+    "Created: / 18-07-2011 / 20:48:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 comment
     "should access the source here, and parse any method comment"
 
@@ -970,6 +943,17 @@
     "
 !
 
+mclass
+    ^ self javaClass
+!
+
+mclass: anObject
+
+    javaClass := anObject
+
+    "Created: / 18-10-2010 / 19:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 methodArgAndVarNames
     ^ "((1 to:self numArgs) collect:[:i | 'arg' , i printString])"
       self methodArgNames
@@ -1044,6 +1028,13 @@
     "Created: 16.4.1996 / 11:34:22 / cg"
 !
 
+nameSpaceName
+
+    ^''
+
+    "Created: / 18-10-2010 / 19:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 numLocals
     ^super numVars.
 "/    numLocals isNil ifTrue:[^ 0].
@@ -1068,6 +1059,13 @@
     "Created: 30.7.1997 / 15:56:18 / cg"
 !
 
+previousVersionCode
+
+    ^nil
+
+    "Created: / 18-10-2010 / 20:15:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 retValSignature
     ^ self class retValSpecFromSignature:signature in:nil
 
@@ -1325,6 +1323,13 @@
     "Modified: / 13-12-2010 / 23:46:30 / Marcel Hlopko <hlopik@gmail.com>"
     "Modified: / 08-01-2011 / 16:20:40 / Jan Kurs <kurs.jan@post.cz>"
     "Modified: / 05-02-2011 / 22:29:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+wrapper
+
+    ^nil
+
+    "Created: / 18-10-2010 / 19:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !JavaMethod methodsFor:'compiler interface'!
@@ -1529,6 +1534,60 @@
 
 !JavaMethod methodsFor:'error handling'!
 
+errorInvalidClassRefAt: index
+
+    "Sent by the VM when an invalid entry in contant pool
+     is encountered - for instance when the VM expects
+     a classref but the entry is not a classref"
+
+    "
+    javaClass constantPool at: index.
+    "
+
+    JavaInvalidRefError new
+        javaClass: javaClass;
+        index: index;
+        raiseRequest
+
+    "Created: / 18-07-2011 / 23:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+errorInvalidFieldRefAt: index
+
+    "Sent by the VM when an invalid entry in contant pool
+     is encountered - for instance when the VM expects
+     a classref but the entry is not a classref"
+
+    "
+    javaClass constantPool at: index.
+    "
+
+    JavaInvalidRefError new
+        javaClass: javaClass;
+        index: index;
+        raiseRequest
+
+    "Created: / 18-07-2011 / 23:33:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+errorInvalidMethodRefAt: index
+
+    "Sent by the VM when an invalid entry in contant pool
+     is encountered - for instance when the VM expects
+     a classref but the entry is not a classref"
+
+    "
+    javaClass constantPool at: index.
+    "
+
+    JavaInvalidRefError new
+        javaClass: javaClass;
+        index: index;
+        raiseRequest
+
+    "Created: / 18-07-2011 / 19:59:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 invalidByteCode
     self isAbstract ifTrue:[
 	^ AbstractMethodInvokationSignal raise.
@@ -1624,17 +1683,6 @@
     ^ self
 !
 
-mclass
-    ^ self javaClass
-!
-
-mclass: anObject
-
-    javaClass := anObject
-
-    "Created: / 18-10-2010 / 19:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
 method
     ^ self
 !
@@ -1833,6 +1881,13 @@
     "Modified: / 25.9.1999 / 23:07:01 / cg"
 !
 
+hasPrimitiveCode
+
+    ^false
+
+    "Created: / 18-07-2011 / 20:45:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 hasResource
     ^ false
 !
@@ -2152,6 +2207,13 @@
     "Modified: / 9.11.1999 / 17:06:03 / cg"
 !
 
+shouldBeSkippedInDebuggersWalkBack
+
+    ^false
+
+    "Created: / 30-11-2010 / 15:35:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 who
     "return the class and selector of where I am defined in."
 
@@ -2192,14 +2254,22 @@
     "Created: / 8.1.1998 / 19:17:58 / cg"
 ! !
 
+!JavaMethod methodsFor:'testing'!
+
+isSynthetic
+    ^false
+
+    "Created: / 18-10-2010 / 19:09:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !JavaMethod class methodsFor:'documentation'!
 
 version
-    ^ '$Id$'
+    ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.106 2009/10/09 14:04:17 cg Exp $'
 !
 
 version_CVS
-    ^ 'Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.106 2009/10/09 14:04:17 cg Exp '
+    ^ '§Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaMethod.st,v 1.106 2009/10/09 14:04:17 cg Exp §'
 !
 
 version_SVN