An efficient implementation of SELF a dynamically-typed object-oriented language based on prototypes
- 1 September 1989
- journal article
- conference paper
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 24 (10) , 49-70
- https://doi.org/10.1145/74878.74884
Abstract
We have developed and implemented techniques that double the performance of dynamically-typed object-oriented languages. Our SELF implementation runs twice as fast as the fastest Smalltalk implementation, despite SELF's lack of classes and explicit variables. To compensate for the absence of classes, our system uses implementation-level maps to transparently group objects cloned from the same prototype, providing data type information and eliminating the apparent space overhead for prototype-based systems. To compensate for dynamic typing, user-defined control structures, and the lack of explicit variables, our system dynamically compiles multiple versions of a source method, each customized according to its receiver's map. Within each version the type of the receiver is fixed, and thus the compiler can statically bind and inline all messages sent to self. Message splitting and type prediction extract and preserve even more static type information, allowing the compiler to inline many other messages. Inlining dramatically improves performance and eliminates the need to hard-wire low-level methods such as +,==, and ifTrue:. Despite inlining and other optimizations, our system still supports interactive programming environments. The system traverses internal dependency lists to invalidate all compiled methods affected by a programming change. The debugger reconstructs inlined stack frames from compiler-generated debugging information, making inlining invisible to the SELF programmer.This publication has 17 references indexed in Scilit:
- Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming languagePublished by Association for Computing Machinery (ACM) ,1989
- Common Lisp Object System specificationACM SIGPLAN Notices, 1988
- TS: an optimizing compiler for smalltalkACM SIGPLAN Notices, 1988
- Using prototypical objects to implement shared behavior in object-oriented systemsACM SIGPLAN Notices, 1986
- Genericity versus inheritanceACM SIGPLAN Notices, 1986
- An exemplar based SmalltalkACM SIGPLAN Notices, 1986
- Hurricane: an optimizing compiler for SmalltalkPublished by Association for Computing Machinery (ACM) ,1986
- QUICKTALK: a Smalltalk-80 dialect for defining primitive methodsPublished by Association for Computing Machinery (ACM) ,1986
- Efficient implementation of the smalltalk-80 systemPublished by Association for Computing Machinery (ACM) ,1984
- A type declaration and inference system for smalltalkPublished by Association for Computing Machinery (ACM) ,1982