Rakudo.js update

I have added support for uncached methods (ones that are looked up dynamically by find_method on the metaclass instance rather then set by nqp::setmethcache) by putting an ES6 Proxy inside of our prototype chain.

It's the first use of ES6 that isn't merely a convenience as I don't know of a way to do it without that without introducing a serious performance penalty.
Nqp-js has been refactored to use instances of a class with a VMArray repr instead of a custom JS class wrapping array.
After figuring out I need to pass the --max-old-space-size option to node (which stops node.js from aborting rakudo.js if it does a gc run and judges that we use more memory then we deserve even if we have free RAM around), rakudo.js finally compiled the full setting.

Memory usage of rakudo.js needs to be dealt with eventually but I would rather have it work correctly before I start tweaking stuff.
Now I'm working on getting the full setting to actually execute correctly so that we can start passing tests with it.
This has exposed bugs in nqp-js, such as nqp::spawn not returning a value, or thee nqp::exception op working only directly inside a nqp::handle.
I have fixed and wrote tests for the nqp::pow_I op (which was broken on the JVM, MoarVM and JS backends).
This allowed me to fix rakudo to stop it from relying on a platform dependent bug (nqp::pow_I was behaving differently on Mac OS X). Closing 4 rakudo bug tickets is always good ;)

Currently I'm working on repossessing objects, which is what allows amending objects that have been already serialized.
This is necessary when the setting changes classes that have been create and serialized in bootstrapping code.

Leave a comment

About Paweł Murias

user-pic This is my JavaScript backend for Rakudo/NQP blog.