src/JavaByteCodeProcessor.st
branchjk_new_structure
changeset 1353 2968f8acb434
parent 1155 d6f6d5fc0343
child 1354 d55b6a30d906
--- a/src/JavaByteCodeProcessor.st	Tue Jan 24 23:56:08 2012 +0000
+++ b/src/JavaByteCodeProcessor.st	Thu Feb 09 22:24:01 2012 +0000
@@ -2485,6 +2485,11 @@
     "Created: / 22-03-2011 / 14:49:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
 !
 
+handleNativeMethod
+
+    "Created: / 09-02-2012 / 22:47:03 / mh <hlopik@gmail.com>"
+!
+
 initializeContextArgsFrom: argArray 
     1 to: numArgs do: [:idx | context at: idx put: (argArray at: idx). ]
 
@@ -2504,18 +2509,18 @@
 
 process: aMethod receiver: aReceiver arguments: args 
     | argArray |
-
-    aMethod isAbstract 
-        ifTrue: 
-            [ ('Processing abstract method ' , aMethod displayString) infoPrintCR.
-            ^ self handleAbstractMethod. ].
-    args size ~~ aMethod javaNumArgs 
-        ifTrue: [ self error: 'bad number of arguments' ].
-    aMethod isStatic 
-        ifTrue: [ argArray := args ]
-        ifFalse: 
-            [ argArray := OrderedCollection with: aReceiver.
-            args ifNotNil: [ argArray addAll: args. ]. ].
+    aMethod isAbstract ifTrue: [
+      
+        ^ self handleAbstractMethod.
+    ].
+    aMethod isNative ifTrue: [ ^ self handleNativeMethod ].
+    args size ~~ aMethod javaNumArgs ifTrue: [
+        self error: 'bad number of arguments'
+    ].
+    aMethod isStatic ifTrue: [ argArray := args ] ifFalse: [
+        argArray := OrderedCollection with: aReceiver.
+        args ifNotNil: [ argArray addAll: args. ].
+    ].
     numArgs := argArray size.
     numVars := aMethod numVars.
     method := aMethod.
@@ -2536,6 +2541,7 @@
     "Modified: / 24-02-2011 / 11:09:07 / Marcel Hlopko <hlopik@gmail.com>"
     "Created: / 17-03-2011 / 17:25:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
     "Modified: / 31-03-2011 / 16:38:05 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+    "Modified: / 09-02-2012 / 22:51:38 / mh <hlopik@gmail.com>"
 !
 
 switch: op