On Sun, Aug 25, 2013 at 09:12:38PM +0200, Holger Hans Peter Freyther wrote:
> On Sun, Aug 25, 2013 at 08:42:10PM +0200, Holger Hans Peter Freyther wrote:
> > On Wed, Aug 21, 2013 at 03:00:04PM +0200, Gwenaël Casaccio wrote:
> > > Hi,
> > >
> > > I've added a new command 'J' that print the context state using
> > > the debug informations.
>
> and I broke it. Can you take another look? I think numArgs/numTemproaries
> and method temporaries/arguments can disagree. :}
>
> st> [3 halt. 'String' select: [:each | false] ] value
> MethodContext(ContextPart)>>printTemporariesOn:spaces: (ContextPart.st:120)
I added the below code and it triggers
variables size => 0
self method
..
number of arguments: 1
number of temporaries: 1
number of literals: 0
...
self numTemps => 1
:}
diff --git a/kernel/ContextPart.st b/kernel/ContextPart.st
index d0d6c2f..b74699e 100644
--- a/kernel/ContextPart.st
+++ b/kernel/ContextPart.st
@@ -126,6 +126,8 @@ methods that can be used in inspection or debugging.'>
self printVariableKind: 'temps' on: aStream spaces: 2.
variables := self method temporaries.
+ variables size = self numTemps
+ ifFalse: [variables inspect. self method inspect. self numTemps
printNl].
1 to: self numTemps do: [ :i |
self printVariable: variables at: i do: [ self at: self numArgs +
i ] on: aStream
]
_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk