[Cleanup] ContextCleanupPlus-ajh

Anthony Hannan ajhannan at yahoo.com
Thu Mar 27 17:31:54 UTC 2003


As per Andreas' suggestion I separated the general runtime enhancements I made
to contexts, the debugger, etc. from the closure compiler and packaged them in
the attached changeset zip file.  This zip file is also on the closure compiler
web page.  Below is the description you will find in the ReadMe.

"Andreas Raab" <andreas.raab at gmx.de> wrote:
> Yes, this makes a lot of sense - I'd actually vote for a [CLEANUP]
> submission or somesuch just for this change as it has been biting me (and
> probably others) regularly too. BTW, if you're just at it, you might also
> remove some of the other old EH handling nonsense which nobody uses any
> longer ;-)

These changes includes cleanup of other EH nonsense as well.

Cheers,
Anthony

Package:	Context Cleanup Plus Other Enhancements
Author:		Anthony Hannan <ajh18 at cornell.edu>
Version:	26 March 2003
Homepage:	http://minnow.cc.gatech.edu/squeak/ClosureCompiler

Installing:	File-in the enclosed changesets in their numbered order (due to
exception changes, these must be filed in one at a time).

Description:

Context Control Enhancements - Methods like #return:, #restart, and #jump have
been added to ContextPart for simpler control of the current thread.

Process Control Enhancements - Methods like #completeStep: have been added to
Process for simpler control of suspended processes. 'completeStep: aContext'
will resume the thread them jump back to the triggering thread when aContext
get control back. This allows quick stepping while in the context of the
suspended process (i.e. its exception handlers will be active instead of the
triggering thread's).

Debugger Enhancements - The debugger uses the new process methods described
above.

ContextTags - 'methodContext contextTag' will create a unique ContextTag object
for that methodContext and hold it in its receiverMap instance variable which
was previously unused. Copies of the methodContext will hold the same
contextTag. Holding a contextTag instead of a context directly is safer when
copying contexts (see continuations below). A context for a context tag is
found in the current thread just be traversing the senders until one is found
with that contextTag.

Exceptions Refactored - Exceptions now hold initialContext and handlerContext
tags instead of the actual contexts so contexts can be copied safely (described
above). Also, searching for handler contexts has been simplified utilizing
Context control behavior described above.

Continuations - 'Continuation current' copies thisContext stack and wraps it in
a Continuation object. Also, '[:cc | ...] callCC' copies the sender stack into
a Continuation and returning it. Evaluating a continuation copies the stack
again and resumes that copy. The current process stack is abandoned. When a
BlockContext on the stack is copied it points to copied home context if it is
also on the stack.

Miscellaneous - Changeset 1 contains general additions to basic objects,
collections, and streams, that are used by the rest of changes described above.


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ContextCleanupPlus-ajh.zip
Type: application/x-zip-compressed
Size: 41502 bytes
Desc: ContextCleanupPlus-ajh.zip
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030327/c2e6cbf8/ContextCleanupPlus-ajh.bin


More information about the Squeak-dev mailing list