Runtime Architecture

Damien Cassou, Stéphane Ducasse and Luc Fabresse http://stephane.ducasse.free.fr

Execution Model

Pharo virtual machine (VM) executes compiled code

Multiple Stage Compilation

  1. Pharo code is compiled to bytecodes (platform neutral instructions)
  2. The virtual machine transforms dynamically bytecodes to assembly

Virtual Machine

Image Files: Memory Snapshots

.image files is a cache of objects:

  • Simple objects (points, strings ...)
  • But also compiled classes and compiled methods
  • Each time we save the image, all objects are saved to disc
  • At startup we get back all the objects we saved
  • PC (program counter) is also saved and restored
    • frozen execution is restarted at launch time

Change Files: Change Tape

.changes file is a tape of all the changes performed to the system

A change is associated to an image

Image/Change Files

Save your code using a package and version control system

About the Source/Changes Files

PharoXX.sources

  • Contains the textual definition of system classes and predefined objects
  • Is read-only
  • Created during release of new Pharo versions
  • Shared to all the users (images)

When you Define New Classes

During development or code loading

  • New objects are compiled in the image
  • New definitions are added to the changes file
  • Still you can browse the definition of the system class (stored in the PharoXX.sources)

New Change Management is Coming

Pharo change system

Conclusion

/