System Models Execution

SmalltalkLanguage contains, in its runtime environment, a model of its runtime environment. Methods and blocks are invoked from instances of Context, which act like stack frames. Instances of contexts are linked together into instances of Process.

In Smalltalk, therefore, a "continuation" can be defined as part of the behavior of the execution of block. This means that when the block is "continued", for example on any exit, the virtual machine can resume execution at the specific context where the continuation was applied.

This makes it possible to assure that the continuation is executed upon every exit from the block (even exceptions), except under the most catastrophic of situations.

The execution model of Smalltalk also makes it possible to support powerful exception facilities within Smalltalk.

I don't know whether JavaLanguage models its execution in this way, but I believe it is possible. CeePlusPlus, without special attention from the developer or environment, does not model its execution this way, and I believe it is very difficult to make it do so (I once started ComponentSoftware, a company that spent several years and much investor money attempting to accomplish this feat. Ontos accomplished such a model, but it was large, cumbersome, and very very slow).


CategorySmalltalk CategoryLanguageFeature


EditText of this page (last edited July 18, 2003) or FindPage with title or text search