-
Yorick Peterse authored
Modules are now first-class objects in the VM. This allows us to remove the top-level object, clean up core::bootstrap, and remove core::globals (in favour of using core::bootstrap directly). As part of this we also remove Trait.implement(), instead implementing traits using compiler generated code. Trait.implement() could not be safely used anyway, as it only copied over default methods; without verifying if all required methods are implemented. All of this makes it easier to implement the self-hosting compiler: the top-level object no longer needs to be supported, and we can treat core::bootstrap like any other module. This in turn allows us to use a more efficient way of storing type information in various places.