2012 · 131 citations · 20 references
ComputingComputer ScienceAlgorithmsCompilersProgramming LanguagesAbstract Syntax TreesData TypesPolymorphism AnalysisStatic Code AnalysisType CheckingType SystemsPolymorphic CodePolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesStatic Type CheckingType AnalysisType Inference
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.
20
Program Analysis and Specialization for the C Programming Language
Lars Ole Andersen, Peter Lee · 2005 · 920 citations
David Ungar, Randall B. Smith · 1987 · 909 citations
An analysis of the dynamic behavior of JavaScript programs
Gregor Richards, Sylvain Lebresne, Brian R. Burg et al. · 2010 · 356 citations
Trace-based just-in-time type specialization for dynamic languages
Andreas Gal, Brendan Eich, Mike Shaver et al. · 2009 · 341 citations
Object-oriented type inference
Jens Palsberg, Michael I. Schwartzbach · 1991 · 305 citations · Full text