Open Scope: A Pragmatic JavaScript Pattern for Modular Instrumentation
Abstract
We report on our experience instrumenting Narcissus, a JavaScript interpreter written in JavaScript, to allow the dynamic deployment of dynamic program analyses. Instrumenting an interpreter is a cross-cutting change that can affect many parts of the interpreter source code. We propose a simple open scope pattern that minimizes the changes to the interpreter, while allowing us to implement program analyses in their own files, and to compose them dynamically. We apply our pattern to Narcissus using standard JavaScript features, and find that the gain in extensibility offsets a small loss in performance.
Domains
Programming Languages [cs.PL]Origin | Files produced by the author(s) |
---|
Loading...