massimiliano-mantione/metascript — pull request #37 by drslump (2014-06-14 21:49:12+00:00)
Title: Use a location manager to reduce creation of additional objects

Two big changes in this pull :)

The first one is to reduce the object allocation pressure on the javascript engine by avoiding the use of objects for the location tracking information. It uses a helper `LocationManager` to encode the information into plain numbers, currently with these limits: 65K lines, 1K columns, 64 files. I don't expect this change to make any noticeable difference on the compilation speed but it should help a bit with memory usage.

The second is a product of `LocationManager` being implemented in metascript :squirrel:, this means that the compiler needs to start being *self hosted*. To solve the bootstrapping problem I've included a new dev dependency in the package for metascript 0.0.35, and then use it to compile any .mjs files in the compiler to bootstrap it. I think this should work for some time, obviously if the language evolves substantially we'll want to a more modern bootstrapping compiler but that's a thought for another day :)