JavaNativeMethod.st
branchrefactoring-vmdata
changeset 2010 9bacff8c53de
parent 1993 6cb676a913a8
child 2016 6afb298c7403
--- a/JavaNativeMethod.st	Wed Jan 30 14:24:21 2013 +0000
+++ b/JavaNativeMethod.st	Wed Jan 30 14:47:53 2013 +0000
@@ -182,18 +182,16 @@
 
     header := String streamContents:[:s|
         sel numArgs == 2 ifTrue:[
-            s nextPutAll: sel; space; nextPutAll: 'this _context: '.
+            s nextPutAll: sel; space; nextPutAll: 'this  '.
         ] ifFalse:[
             | kw |
 
-            kw := sel keywords.
-            self assert: kw last = '_context:'.
+            kw := sel keywords.            
             s nextPutAll: kw first.
             s nextPutAll: ' this '.
             2 to: kw size - 1 do:[:i|
                 sel nextPutAll: (kw at: i); space; nextPut:$a; nextPutAll: i printString; space.
-            ].
-            s nextPutAll: '_context:'.
+            ].            
         ]
     ].
 
@@ -219,18 +217,16 @@
 
    header := String streamContents:[:s|
         sel numArgs == 2 ifTrue:[
-            s nextPutAll: sel keywords first; space; nextPutAll: 'this _context: '.
+            s nextPutAll: sel keywords first.
         ] ifFalse:[
             | kw |
 
-            kw := sel keywords.
-            self assert: kw last = '_context:'.
+            kw := sel keywords.            
             s nextPutAll: kw first.
             s nextPutAll: ' this '.
             2 to: kw size - 1 do:[:i|
                 s nextPutAll: (kw at: i); space; nextPut:$a; nextPutAll: (i - 1) printString; space.
-            ].
-            s nextPutAll: '_context:'.
+            ].            
         ]
     ].
 
@@ -306,19 +302,19 @@
     nm := selector upTo: $(.
 
     args := #(
-        "0"  '_context:'
-        "1"  '_:_context:'
-        "2"  '_:_:_context:'
-        "3"  '_:_:_:_context:'
-        "4"  '_:_:_:_:_context:'
-        "5"  '_:_:_:_:_:_context:'
-        "6"  '_:_:_:_:_:_:_context:'
-        "7"  '_:_:_:_:_:_:_:_:context:'
-        "8"  '_:_:_:_:_:_:_:_:_context:'
-        "9"  '_:_:_:_:_:_:_:_:_:_context:'
-        "10" '_:_:_:_:_:_:_:_:_:_:_context:'
-        "11" '_:_:_:_:_:_:_:_:_:_:_:_context:'
-        "12" '_:_:_:_:_:_:_:_:_:_:_:_:_context:'
+        "0"  ''
+        "1"  '_:'
+        "2"  '_:_:'
+        "3"  '_:_:_:'
+        "4"  '_:_:_:_:'
+        "5"  '_:_:_:_:_:'
+        "6"  '_:_:_:_:_:_:'
+        "7"  '_:_:_:_:_:_:_:'
+        "8"  '_:_:_:_:_:_:_:_:'
+        "9"  '_:_:_:_:_:_:_:_:_:'
+        "10" '_:_:_:_:_:_:_:_:_:_:'
+        "11" '_:_:_:_:_:_:_:_:_:_:_:'
+        "12" '_:_:_:_:_:_:_:_:_:_:_:_:'
     ) at: numArgs + 1.
 
     newStyleSel := ('_' , ((javaClass name copyReplaceAll:$/ with:$_) replaceAll:$$ with:$_), '_' , nm , ':' , args) asSymbol.    
@@ -358,10 +354,10 @@
     
     | sel  mthd  sender nArgs receiverAndArgsAndContext |
     nCalls := (nCalls ? 0) + 1.
-    receiverAndArgsAndContext := Array new: (nArgs := context numArgs) + 1"receiver"+1"context".
+    receiverAndArgsAndContext := Array new: (nArgs := context numArgs) + 1"receiver".
     receiverAndArgsAndContext replaceFrom:2 to:1 + nArgs with: context startingAt: context arg1Index.
     receiverAndArgsAndContext at: 1 put: context receiver.
-    receiverAndArgsAndContext at: nArgs + 2 put: context.
+    
 
 
     (mthd := nativeImplementation) isNil ifTrue: [