Peter Van Der Zee - Live Recompilation of Running JS

JSConf US 2013

31 May 2013

compile JS on the fly maintains access to closures no restart lazy evaluation generic approach - works with pretty much any js

compile in JS

function getFunction () {
  return function () {
    return Function ('string rep of function')();
  }
}

Issues

  • function argumnets
  • closures
  • func declarations
  • named function expressions
  • performance

Direct vs indirect eval

  • direct (eval) has access to lexical scopes
  • indirect (Function) only global

Open issues

Big -Inserting new functions

Minor -variable clashes -hard to explain

Only for code that will be reinvoked at some point (like callbacks)

http://github.com/qfox/recompiler

www: qfox.nl

Video

JSConf 2013

This is a quick summary of a talk I attended at JSConf 2013. You can see a list of all those I've summarized notes from here. There's also a General thoughts during JSConf 2013 post for all the non-talk bits and pieces.

There were 3 concurrent tracks at the conference, so only those I attended myself are summarized here. Other attendees have summarized some of the talks I didn't get to due to scheduling conflicts - you can find those at jlongster.com (James Long) and Toby Ho's github repo.