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.48 date: 2023/10/27 10:54:54
user: stefan
file: BlockContext.st directory: libbasic
module: stx stc-classLibrary: libbasic

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.

copyright

COPYRIGHT (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.

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  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
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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:24:56 GMT