Fast and precise hybrid type inference for JavaScript
Brian Hackett, Shuyu Guo · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · 2012
JavaScript performance is often bound by its dynamically typed nature. Compilers do not have access to static type information, making generation of efficient, type-specialized machine code difficult. We seek to solve this problem by inferring types. In this paper we present a hybrid type inference algorithm for JavaScript based on points-to analysis. Our algorithm is fast, in that it pays for itself in the optimizations it enables. Our algorithm is also precise, generating information that closely reflects the program's actual behavior even when analyzing polymorphic code, by augmenting static analysis with run-time type barriers.
Cited by 129 works. doi:10.1145/2254064.2254094
Authors
References
- Self: The power of simplicity
- Program Analysis and Specialization for the C Programming Language
- Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language
- Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language
- Object-oriented type inference
- Optimizing dynamically-typed object-oriented languages with polymorphic inline caches
- Soft typing
- Type inclusion constraints and type inference
- An analysis of the dynamic behavior of JavaScript programs
- The design and implementation of the self compiler, an optimizing compiler for object-oriented programming languages