Skip to content

NeilFraser/JS-Interpreter

master
Switch branches/tags
Code

Latest commit

Use caching to prevent respidering of variables/functions every time a new scope is created (i.e. a function is called).

This would be a great use of a weakmap, but we don’t have that in ES5 so we’re tacking an extra property onto the AST nodes instead.

This commit also eliminates a call to Date.now() in ‘step’ if the step is not part of a polyfill.  This results in a measurable performance improvement.  An unintended side-effect is that polyfills now get one step for free, but that shouldn’t matter.
036ffcd

Git stats

Files

Permalink
Failed to load latest commit information.