Nqp-js update.

Datetime:2016-08-22 21:33:53          Topic: JavaScript  ECMAScript           Share

nqp-js/rakudo.js is now targeting ECMAScript 6

Scott McWhirter helped a ton with the transitions (as well as with some general cleanup).

Most of the modern browsers now support ECMAScript 6 so I feel it makes sense to target it.

When targeting old ones that don't we can use polyfills and compilers from ECMAScript 6 to 5.

After doing most of the obvious and promising nqp-js optimizations I'm focusing again on getting rakudo.js to work.

Before that I'm cleaning up the nqp-js code base to remove hacks that might shoot us in the back while working on rakudo.js

I removed a bunch of workarounds that weren't needed anymore as well as a bunch of accumulated technical debt.

In the past I was attempted to store native js lexicals for storing lexicals as much as possible even when it meant introducing ugly hack.

It turns out they can't be used in a lot of places anyway because closure in nqp need to be serializable.

That means we might as well pass around contexts directly when necessary and get rid of a whole bunch of hacks.

For cleanup the main remaining is to stop deserializing closures by evaling code at deserialization time as that hinders debugging.

Hopefully one it's done a few mysteries in the output of the profiler will be solved and we can optimize nqp-js some more.

I'll also plan package nqp-js-compiled-to-js in a way that allows it to be installed by npm which should allow a saner rakudo.js build process.





About List