eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BlockContext':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BlockContext


Inheritance:

   Object
   |
   +--Context
      |
      +--BlockContext

Package:
stx:libbasic
Category:
Kernel-Methods
Version:
rev: 1.43 date: 2018/02/02 22:22:49
user: stefan
file: BlockContext.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Claus Gittinger

Description:


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.


Related information:

    Context
    Block
    Method
    Exception
    Signal

Instance protocol:

accessing
o  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.

o  guessedHome
a temporary kludge: optimized block contexts do (currently) not provide
any home info. The code below tries to guess the home.

o  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

o  homeReceiver
return the receiver from the context, where the receiver was defined

o  method
return the method in which the current contexts block was created.

o  methodHome
return the method-home for block contexts

o  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
o  printReceiverOn: 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
o  isBlockContext
return true, iff the receiver is a BlockContext, false otherwise

o  isCheapBlockContext
return true, iff the receiver is a BlockContext, for a cheap block, false otherwise.
Cheap blocks do not refer to their home



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 12:29:45 GMT