Clément Béra: Google Software Engineer

Clément Béra: Google Software Engineer

I am interested in runtime environments for object-oriented languages, from Memory management optimisations to efficient compilers (JIT or AOT) through fast interpreters and Foreign Function Interfaces. I am currently working on the Android Studio Compiler at Google, adding support for recent Java features in Android and reducing the size on disk of Android applications. My first significant achievement was the support for the Java Stream and Time libraries on all Android devices. Then I worked on unboxing enums to reduce the Android applications' size on disk.

Before working at Google, my work was focused around the OpenSmalltalk-VM project. OpenSmalltalk-VM is a production Smalltalk and Newspeak VM, and as such, I was able twice to work as an engineer on the project. My top engineering achievements include the introduction of read-only objects or a partial rewrite of the Just-in-Time compiler register allocator. OpenSmalltalk-VM is also a nice environment for experimentations, as besides the production pipeline, the VM can be entirely simulated through a mixed execution mode using a processor simulator and the production VM. Thanks to this facilities, I worked twice in research, first as a Ph.D student and then as a post-doc, using OpenSmalltalk-VM for experimentations. My research focused on three main axis:

  • Just-in-Time compilation: I implemented Sista, a speculative Just-in-Time compiler architecture for OpenSmalltalk-VM. The Sista VM starts the program non-optimized to collect runtime information about the program behavior and detect frequently used portions of code. It then generates optimized code, based on the collected runtime information. The optimizations are speculative, assuming that if the program has always behaved a certain way, it will keep behaving that way. To ensure that the execution remains correct, Sista inserts deoptimization guards, which are able to deoptimize the execution stack and resume execution with non optimized code if the behavior of the program changes. Sista may then re-optimize the code differently based on the new behavior. Research-wise, the main interest of Sista is the ability to persist part of the optimized code across multiple start-ups and the reflexive design, where part of the Just-in-Time compiler is written in Smalltalk itself can be easily inspected and debugged at runtime.
  • Memory management: I worked a lot on various parts of the memory manager of OpenSmalltalk-VM, trying to speed-up the garbage collector or improving the interactions with the Just-in-Time compiler so it can generate better native code. Research-wise, the most interesting work is related to the introduction of forwarding objects and a partial read barrier to support them efficiently. Forwarding objects are used to support efficiently the migration of instances when an extra field is required for each object, the Smalltalk operation #become:, a low-pause garbage collector compactor and to guarantee that pinned objects are always in old space.
  • Virtual machine simulation: I worked on the virtual machine simulator. I focused mainly on documentation, with papers in collaboration with Dan Ingalls and Eliot Miranda to explain the simulator's internals. I was also involved in minor extensions regarding Slang, the DSL used to implement the VM, and the simulation infrastructure (Flags for garbage collection debugging, etc.).

Besides programming languages, compilers and virtual machines, I'm also quite keen on video game implementation. Unfortunately, I've been able to work with 2D engines only, see the projects page.

Contact bera.clement(at)