Compiling high level class system for JavaScript