Fix in ContextInspectorView: care for Java contexts. jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 05 Nov 2013 15:47:12 +0000
branchjv
changeset 13658 065376680d85
parent 13649 8515cdfced8c
child 13660 c9d5afbdbd62
Fix in ContextInspectorView: care for Java contexts. Size of (java) context for non-static method is bigger than numArgs + numVars + numTemps because of the receiver (which is always the first argument for non-static methods)
ContextInspectorView.st
--- a/ContextInspectorView.st	Sat Oct 26 18:01:03 2013 +0100
+++ b/ContextInspectorView.st	Tue Nov 05 15:47:12 2013 +0000
@@ -132,7 +132,8 @@
                     homeNames := method methodArgAndVarNamesInContext: methodHomeContext.
 
                     "/ did it already allocate its locals ?
-                    (homeNames size > (methodHomeContext numArgs + methodHomeContext numVars)) ifTrue:[
+                    "/                 |-----------------------------| care about Java contexts where this is first arg
+                    (homeNames size > (methodHomeContext arg1Index - 1 + methodHomeContext numArgs + methodHomeContext numVars)) ifTrue:[
                         argsOnly := true.
                     ].
                 ].
@@ -297,7 +298,7 @@
     ].
 
     "Modified: / 03-06-2012 / 11:56:59 / cg"
-    "Modified: / 08-10-2013 / 12:00:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-11-2013 / 15:44:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 namesOfBlockContext:aContext