Can V8 annotate source with Closure Types as it runs?
barricane.com
barricane.com
I think a basic version of this could be built in a day.
Advantages of instrumenting the code:
1. No mucking around in V8 internals.
2. Works on any JavaScript engine.
Or perhaps it's for documentation or something. In that case, it'd be a hell of a lot of hand-editing to remove noise from the output.
Another side, the set of types used by any variable may be affected by program inputs, so the result can never be complete, unless you run V8 for every possible program input (likely an impossible task).
I would like to run this during automated testing. For modules where code coverage is 100%, it could be possible that most input-dependent type paths are covered.