--- a/Context.st Thu Aug 08 11:09:31 2013 +0100
+++ b/Context.st Mon Aug 19 12:29:07 2013 +0100
@@ -1518,15 +1518,7 @@
^ '**************** nil displayString of ',(someObject class name ? '??')
].
"/ JV@2013-04-26: Following is rubbish, the calles must handle string output correctly.
-"/ moreover storeString does not work on self-referencing structures!!!
-
-"/ s isWideString ifTrue:[
-"/ "make sure that the object really returns something we can stream into a string"
-"/ s := someObject storeString.
-"/ ].
- ^ s
-
- "Modified: / 07-03-2012 / 13:14:17 / cg"
+"/ moreover storeString does not work on self-referencing structures!!
!
argsDisplayString
@@ -2191,7 +2183,7 @@
argAndVarNames
"helper: given a context, return a collection of arg&var names"
- |homeContext method block numArgs numVars m src
+ |homeContext homeMethod block numArgs numVars m src
sel isDoIt blocksLineNr extractFromBlock sender|
numArgs := self numArgs.
@@ -2201,7 +2193,7 @@
homeContext := self methodHome.
homeContext notNil ifTrue:[
sel := homeContext selector.
- method := homeContext method.
+ homeMethod := homeContext method.
].
extractFromBlock :=
@@ -2232,13 +2224,13 @@
numArgs > 0 ifTrue:[
vars := blockNode arguments.
- vars size > 0 ifTrue:[
+ vars notEmptyOrNil ifTrue:[
argNames := vars collect:[:var | var name]
]
].
numVars > 0 ifTrue:[
- vars := blockNode variables.
- vars size > 0 ifTrue:[
+ vars := blockNode variablesIncludingInlined: (homeMethod code notNil and:[homeMethod byteCode isNil]).
+ vars notEmptyOrNil ifTrue:[
varNames := vars collect:[:var | var name].
]
].
@@ -2250,30 +2242,30 @@
isDoIt := (sel == #'doIt') or:[sel == #'doIt:'].
self isBlockContext ifFalse:[
isDoIt ifTrue:[
- method notNil ifTrue:[
+ homeMethod notNil ifTrue:[
"/ special for #doIt
m := nil.
- src := ('[' , method source , '\]') withCRs.
+ src := ('[' , homeMethod source , '\]') withCRs.
"/ blocksLineNr := self lineNumber.
blocksLineNr := (self home ? self) lineNumber.
extractFromBlock value.
]
].
- method notNil ifTrue:[
- ^ method methodArgAndVarNamesInContext: self.
+ homeMethod notNil ifTrue:[
+ ^ homeMethod methodArgAndVarNamesInContext: self.
].
^ #()
].
- method notNil ifTrue:[
+ homeMethod notNil ifTrue:[
isDoIt ifTrue:[
"/ special for #doIt
"/ my source is found in the method.
m := nil.
- src := ('[' , method source , '\]') withCRs.
+ src := ('[' , homeMethod source , '\]') withCRs.
] ifFalse:[
- m := method.
+ m := homeMethod.
src := nil.
].
blocksLineNr := self lineNumber.
@@ -2303,7 +2295,7 @@
^ #()
- "Modified: / 18-12-2012 / 18:18:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 19-08-2013 / 12:13:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
canResume
@@ -2512,6 +2504,11 @@
^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.186 2013-06-09 20:40:08 cg Exp $'
!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
^ '$ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1 $'
! !