-
Notifications
You must be signed in to change notification settings - Fork 2
/
summary.txt
21 lines (18 loc) · 1.14 KB
/
summary.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
JavaScript is particularly difficult to implement efficiently because
most of its expressions have all sorts of different meanings that
involve all sorts of different executions that are not distinguished
by any syntactic or type annotation. The common intuition is that only
JIT compilers can handle it efficiently because they can rely on
heuristic-based strategies that require having the program and the
data on hand. But static (AOT) compilers can speculate and use
heuristics too! To demonstrate that, we propose Hopc, an AOT compiler
for JavaScript, based on the following assumption:
The most likely data structure a program will use is
the one for which the compiler is able to produce its best code.
Thus, contrary to most AOT compilers, Hopc does not rely on complex
static analyses to optimize programs. It simply tries to generate its
best code that it protects with guards.
In this lecture, we will first present the basic techniques for
compiling classical dynamically typed functional programming such as
Scheme, and then, once that sets, we will dig into the specificities
of the compilation of modern dynamic languages such as JavaScript.