HaxeFoundation/haxe — pull request #3358 by Simn (2014-09-18 12:26:06+00:00)
Title: Add Compiler.addGlobalMetadata

This adds Compiler.addGlobalMetadata and implements Compiler.keep using it. It works similar to type patches, but it metadata-oriented and works with module sub-types.

The implementation compares type/field paths similar to how ACL does it and if a match is made the metadata is added. I experimented a bit with it and also managed to add `@:build` metadata to all classes, which solves #3129.

Only thing I'm not sure about are the implications of the compilation server.