Context.st
changeset 25 e34a6267c79b
parent 12 8e03bd717355
child 37 d9a302eaa3ef
equal deleted inserted replaced
24:20cfbafcd0a3 25:e34a6267c79b
    31 surrounding block (if its a nested block) or of its method. Contexts of cheap blocks do not
    31 surrounding block (if its a nested block) or of its method. Contexts of cheap blocks do not
    32 have a home context - their home field is also nil.
    32 have a home context - their home field is also nil.
    33 
    33 
    34 Warning: layout and size known by the compiler and runtime system - do not change.
    34 Warning: layout and size known by the compiler and runtime system - do not change.
    35 
    35 
    36 $Header: /cvs/stx/stx/libbasic/Context.st,v 1.6 1993-12-11 00:45:34 claus Exp $
    36 $Header: /cvs/stx/stx/libbasic/Context.st,v 1.7 1993-12-19 23:39:49 claus Exp $
    37 '!
    37 '!
    38 
    38 
    39 !Context class methodsFor:'queries'!
    39 !Context class methodsFor:'queries'!
    40 
    40 
    41 isBuiltInClass
    41 isBuiltInClass
    53 !
    53 !
    54 
    54 
    55 isBlockContext
    55 isBlockContext
    56     "return true, iff the receiver is a BlockContext, false otherwise"
    56     "return true, iff the receiver is a BlockContext, false otherwise"
    57 
    57 
       
    58     ^ false
       
    59 ! !
       
    60 
       
    61 !Context methodsFor:'testing'!
       
    62 
       
    63 isRecursive
       
    64     "return true, if this context is one of a recursive send of the same
       
    65      selector to the same class before"
       
    66 
       
    67     |c|
       
    68 
       
    69     c := self sender.
       
    70     [c notNil] whileTrue:[
       
    71 	((c selector == selector) and:[c receiver == receiver]) ifTrue:[
       
    72 	    ^ true
       
    73         ].
       
    74 	c := c sender
       
    75     ].
    58     ^ false
    76     ^ false
    59 ! !
    77 ! !
    60 
    78 
    61 !Context methodsFor:'accessing'!
    79 !Context methodsFor:'accessing'!
    62 
    80