EFFICIENT SUPPORT FOR SCHEMA MIGRATION IN SMALLTALK VMS

Live programming, originally introduced by Smalltalk and Lisp, and now gaining popularity in contemporary systems such as Swift, requires on-the-fly support for object schema migration, such that the layout of objects may be changed while the program is at one and the same time being run and developed. In Smalltalk schema migration is supported by two primitives, one that answers a collection of all instances of a class, and one that exchanges the identities of pairs of objects, called the become primitive. Existing instances are collected, copies are created using the new schema with state copied from the corresponding existing instance, and all pairs of instances are exchanged with become, effecting the schema migration.

Historically the implementation of become has either required an extra level of indirection between an object’s address and its body, slowing down slot access, or has required a sweep of all objects, a very slow operation on large heaps. Spur, a new object representation and memory manager for Smalltalk-like languages, has neither of these deficiencies. It uses direct pointers but still provides a fast become operation in large heaps, thanks to forwarding objects that when read conceptually answer another object and a partial read barrier that avoids the cost of explicitly checking for forwarding objects on the vast majority of object accesses.

Download presentation
  • Clement-Bera

    Clément Béra

    After working as a virtual machine engineer during two years in the Pharo team, Clément Béra is now a phd student interested in virtual machines, especially just-in-time compilers. Recently he was experimenting a new architecture for the Cog virtual machine with Eliot Miranda.