This talk summarises two decades of work on Smalltalk and Self compilation and virtual machine technology and describes a novel attempt at an adaptive optimizer for Smalltalk that is written in Smalltalk and to a meaningful extent, portable across implementations.
Smalltalk-80 and Self are fully object-oriented implicitly typed dynamic programming languages and interactive programming environments hosted above virtual machines that appear to execute stack-oriented bytecode for a pure stack machine. These systems' code and execution state are all represented by objects programmed in Smalltalk, such that the compiler, debugger, exception system and more are all implemented entirely in Smalltalk and available to the programmer for immediate incremental and interactive modification.
Such an architecture places great demands on the virtual machine to provide high performance. These demands have led to a series of ground breaking virtual machine architectures from the original microcoded implementations through Deutsch and Schiffmann's dynamic translation systems, and Ungar, Chambers and Hoelzle's adaptive optimizers for Self. The key insight that the polymorphic inline caches used to speed up message sends (late-bound procedure calls) also provide concrete type information that can be used to optimize a running program led to Hoelzle's Self-4 run-time type-feedback adaptive optimizer, the Animorphic Smalltalk implementation and to Sun's HotSpot server Java VM.
Up until now these architectures have all been implemented in C or C++, and have generated machine code, incurring comcomitant costs in implementation difficulty, portability and extensibility. But the explicit representation of code and execution state make it convenient to implement a hybrid architecture where an adaptive optimizer written entirely in Smalltalk, guided by type information obtained from the VM, produces optimized bytecoded methods that are executed by a more-or-less conventional VM.
While the architecture does not aim to provide the ultimate in execution performance, it does aim to provide an excellent ratio of performance to implementation effort, and to provide a means of unifying the Smalltalk implementation community through an open source and portable code base.
The talk will present the key technical components of these architectures and some of the social history behind them.
About the speaker:
Eliot Miranda is a habitual Smalltalk virtual machine implementor, starting in 1983 in a summer job at the Rutherford Appleton Laboratory. This obsession took him first to Queen Mary Westfield College, University of London where his implementations were used for teaching and research and where he lectured before joining Harlequin Ltd to work on Dylan in 1993.
Since joining ParcPlace Systems in 1995 he has been working with VisualWorks, the direct commercial descendent of the original Xerox Smalltalk-80 system. He became technical lead for VisualWorks in 1997, essentially because he stayed while wiser colleagues either left or were let go. ParcPlace merged with Digitalk in 1995, changed its name to ObjectShare in 1997, and sold the VisualWorks technology to Cincom Systems in 1999, his current employer.
Eliot's own BrouHaHa Smalltalk-80 virtual machine implementations used a number of cheap tricks best summed up as C compiler abuse to provide "good" performance with little implementation effort. This economy of means has proved well suited to enhancing VisualWorks, a once proud implementation fallen on hard times, as Smalltalk vendors are unwilling or unable to provide the personnel resources available to competing technologies such as Java.
Eliot holds a BSc in Computer Science from the University of York, UK, and is a member of the ACM.