首页 | 本学科首页   官方微博 | 高级检索  
     


An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes
Authors:Craig Chambers  David Ungar and Elgin Lee
Affiliation:(1) Computer Systems Laboratory, Stanford University, 94305 Stanford, California;(2) Present address: Sun Microsystems, 2500 Garcia Avenue, 94043 Mountain View, CA;(3) Present address: ParcPlace Systems, 1550 Plymouth Street, 94043 Mountain View, CA
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-levelmaps 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 compilesmultiple versions of a source method, eachcustomized according to its receiver's map. Within each version the type of the receiver is fixed, and thus the compiler can statically bind andinline all messages sent toself.Message splitting andtype 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+, ==, andifTrue:.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 work has been generously supported by National Science Foundation Presidential Young Investigator Grant #CCR-8657631, and by IBM, Texas Instruments, NCR, Tandem Computers, Apple Computer, and Sun Microsystems.This paper was originally published inOOPSLA '89 Conference Proceedings (SIGPLAN Notices, 25, 10 (1989) 49–70).
Keywords:
本文献已被 SpringerLink 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号