date: 2018/06/26 18:00:39
- user: cg
- file: BlockContext.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Claus Gittinger
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.
printing & storing
return true, if the receiver allows returning through it.
For normal method contexts, this normally returns true;
for blocks, it (currently) always returns false.
a temporary kludge: optimized block contexts do (currently) not provide
any home info. The code below tries to guess the 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.
copying blocks have no home
return the receiver from the context, where the receiver was defined
return the method in which the current contexts block was created.
return the method-home for block contexts
return the selector of the context - which is one of the value
selectors. This selector is not found in the context, but synthesized.
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)
return true, iff the receiver is a BlockContext, false otherwise
return true, iff the receiver is a BlockContext, for a cheap block, false otherwise.
Cheap blocks do not refer to their home