Ralston_Matthew.pdf (672.84 kB)
Download file

Tail Call Elimination in the OpenSmalltalk Virtual Machine

Download (672.84 kB)
posted on 22.05.2021, 10:55 authored by Matthew Ralston
Tail call elimination is used by languages and compilers to optimize the activation of methods in tail position. While this optimization has been the source of much research, it has not previously been implemented in the OpenSmalltalk virtual machine - the open-source Smalltalk virtual machine used by Smalltalk environments such as Pharo and Squeak. There are many approaches described in the literature to implement tail call elimination, such as removing stack frames on method activation instead of method return. Two implementations of tail call elimination using a stack frame removal approach are presented for Opensmalltalk VM. One implementation is presented for the Interpreter and one for the Cog JIT compiler. These implementations are tested with both ideal and real world scenarios and show improvements in execution time and memory usage.





Master of Science


Computer Science

Granting Institution

Ryerson University

LAC Thesis Type


Usage metrics