Write a Blog >>
SPLASH 2019
Sun 20 - Fri 25 October 2019 Athens, Greece
Sun 20 Oct 2019 15:00 - 15:30 at Room 1A - Tooling Chair(s): Christophe Scholliers

The ability to serialize functions is useful in a variety of applications, including web session migration and distributed computing. Despite its usefulness, JavaScript function serialization is difficult because a JavaScript function can capture variables but there is no language meta operator that a serializer can use to query those captured variables. This problem can be addressed by instrumenting code such that captured variables become accessible to a serializer. However, state-of-the-art instrumentation-based solutions introduce high run time overheads, vary in supported syntax and require complex serialization and deserialization algorithms.

We introduce FlashFreeze, a serialization technique that uses a novel instrumentation construction for modeling captured variables. FlashFreeze’s construction uses lazily constructed capture lists to reduce its run time overhead to an absolute minimum: our construction results in a mean Octane score reduction of only 5% compared to 75% for a state-of-the-art tool. Moreover, the construction supports nearly all JavaScript syntax and naturally gives rise to simple serialization and deserialization algorithms.