|
Class: BlockContext
Object
|
+--Context
|
+--BlockContext
- Package:
- stx:libbasic
- Category:
- Kernel-Methods
- Version:
- rev:
1.48
date: 2023/10/27 10:54:54
- user: stefan
- file: BlockContext.st directory: libbasic
- module: stx stc-classLibrary: libbasic
BlockContexts represent the stack context objects of blocks.
The layout is the same as for other contexts - this class has been added
to avoid a flag in an instance variable.
(has become necessary with cheap blocks, which have no home).
WARNING: layout and size known by compiler and runtime system -
do not change.
copyrightCOPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
accessing
-
canReturn
-
return true, if the receiver allows returning through it.
For normal method contexts, this normally returns true;
for blocks, it (currently) always returns false.
-
guessedHome
-
a temporary kludge: optimized block contexts do (currently) not provide
any home info. The code below tries to guess the home.
-
home
-
return the immediate home of the receiver.
normally this is the methodcontext, where the block was created,
for nested block contexts, this is the surrounding blocks context.
Usage example(s):
copying blocks have no home
|
-
homeReceiver
-
return the receiver from the context, where the receiver was defined
-
method
-
return the method in which the current contexts block was created.
-
methodHome
-
return the method-home for block contexts
-
selector
-
return the selector of the context - which is one of the value
selectors. This selector is not found in the context, but synthesized.
printing & storing
-
printReceiverWithSeparator: sep on: aStream
-
print a string describing the receiver of the context on aStream
Since this is also used by the debugger(s), be very careful to
return something useful, even in case internals of the system
got corrupted ... (i.e. avoid messageNotUnderstood here)
testing
-
isBlockContext
-
return true, iff the receiver is a BlockContext, false otherwise
-
isCheapBlockContext
-
return true, iff the receiver is a BlockContext, for a cheap block, false otherwise.
Cheap blocks do not refer to their home
|