Context.st
branchjv
changeset 18017 7fef9e17913f
parent 18011 deb0c3355881
parent 14700 4d0c0720fbe8
child 18045 c0c600e0d3b3
equal deleted inserted replaced
18016:956be83322ff 18017:7fef9e17913f
  1724         newString := '(' , receiver printString , ') ' , receiverClassName
  1724         newString := '(' , receiver printString , ') ' , receiverClassName
  1725     ] ifFalse:[
  1725     ] ifFalse:[
  1726         newString := receiverClassName
  1726         newString := receiverClassName
  1727     ].
  1727     ].
  1728 
  1728 
  1729     selector notNil ifTrue:[
  1729     (selector notNil or:[ method notNil ]) ifTrue:[
  1730 "/        implementorClass := self searchClass whichClassIncludesSelector:selector.
  1730         "/ implementorClass := self searchClass whichClassIncludesSelector:selector.
  1731 
  1731 
  1732         "
  1732         "
  1733          kludge to avoid slow search for containing class
  1733          kludge to avoid slow search for containing class
  1734         "
  1734         "
  1735         (selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[
  1735         (method notNil
       
  1736         or:[ (selector ~~ #doIt and:[selector ~~ #doIt:]) ]) ifTrue:[
  1736             implementorClass := self methodClass.
  1737             implementorClass := self methodClass.
  1737             implementorClass isNil ifTrue:[
  1738             implementorClass isNil ifTrue:[
  1738                 "
  1739                 "
  1739                  kludge for the frame called by a wrappedmethod;
  1740                  kludge for the frame called by a wrappedmethod;
  1740                  the wrappedmethod is in the class, so its mclass is correct.
  1741                  the wrappedmethod is in the class, so its mclass is correct.
  1763             ].
  1764             ].
  1764             "
  1765             "
  1765              kludge for doIt - these unbound methods are not
  1766              kludge for doIt - these unbound methods are not
  1766              found in the classes methodDictionary
  1767              found in the classes methodDictionary
  1767             "
  1768             "
  1768             (selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[
  1769             true "(selector ~~ #doIt and:[selector ~~ #doIt:])" ifTrue:[
  1769                 "/ newString := newString , '>>>**NONE**'
  1770                 "
  1770                 newString := newString , '(**NONE**)'
  1771                  kludge for methods invoked explicitly via valueWithReceiver...
       
  1772                 "
       
  1773                 (self sender notNil 
       
  1774                 and:[ self sender receiver isMethod
       
  1775                 and:[ self sender selector startsWith:'valueWithReceiver:' ]]) ifTrue:[
       
  1776                     newString := newString , '(**DIRECTED**)'
       
  1777                 ] ifFalse:[
       
  1778                     newString := newString , '(**NONE**)'
       
  1779                 ]
  1771             ]
  1780             ]
  1772         ]
  1781         ]
  1773     ].
  1782     ].
  1774 
  1783 
  1775     ^ newString
  1784     ^ newString
  2463 ! !
  2472 ! !
  2464 
  2473 
  2465 !Context class methodsFor:'documentation'!
  2474 !Context class methodsFor:'documentation'!
  2466 
  2475 
  2467 version
  2476 version
  2468     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.178 2012-12-12 22:59:00 stefan Exp $'
  2477     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.179 2013-01-24 15:22:59 cg Exp $'
  2469 !
  2478 !
  2470 
  2479 
  2471 version_CVS
  2480 version_CVS
  2472     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.178 2012-12-12 22:59:00 stefan Exp $'
  2481     ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.179 2013-01-24 15:22:59 cg Exp $'
  2473 !
  2482 !
  2474 
  2483 
  2475 version_SVN
  2484 version_SVN
  2476     ^ '§ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  2485     ^ '§ Id: Context.st 10643 2011-06-08 21:53:07Z vranyj1  §'
  2477 ! !
  2486 ! !
  2478 
  2487 
       
  2488 
  2479 Context initialize!
  2489 Context initialize!