Back: Metaclass-testing functionality Up: Base classes Forward: MethodContext-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.107 MethodContext

Defined in namespace Smalltalk
Superclass: ContextPart
Category: Language-Implementation
My instances represent an actively executing method. They record various bits of information about the execution environment, and contain the execution stack.

1.107.1 MethodContext: accessing  (instance)
1.107.2 MethodContext: debugging  (instance)
1.107.3 MethodContext: printing  (instance)


1.107.1 MethodContext: accessing

home
Answer the MethodContext to which the receiver refers (i.e. the receiver itself)

isBlock
Answer whether the receiver is a block context

block

isDisabled
Answers whether the receiver has actually ended execution and will be skipped when doing a return. BlockContexts are removed from the chain whenever a non-local return is done, but MethodContexts need to stay there in case there is a non-local return from the #ensure: block.

isEnvironment
To create a valid execution environment for the interpreter even before it starts, GST creates a fake context which invokes a special "termination" method. Such a context can be used as a marker for the current execution environment. Answer whether the receiver is that kind of context.

isUnwind
Answers whether the context must continue execution even after a non-local return (a return from the enclosing method of a block, or a call to the #continue: method of ContextPart). Such contexts are created only by #ensure:.

sender
Return the context from which the receiver was sent


1.107.2 MethodContext: debugging

isInternalExceptionHandlingContext
Answer whether the receiver is a context that should be hidden to the user when presenting a backtrace. Such contexts are identified through the #exceptionHandlingInternal: attribute: if there is such a context in the backtrace, all those above it are marked as internal.

That is, the attribute being set to true means that the context and all those above it are to be hidden, while the attribute being set to false means that the contexts above it must be hidden, but not the context itself.


1.107.3 MethodContext: printing

printOn: aStream
Print a representation for the receiver on aStream



Back: MethodContext-debugging Up: MethodContext Forward: MethodDictionary   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on May, 22 2008 using texi2html