def new_class(self, class_class): # Allocate a new class and set its class to be the given class class result = Class(self, class_class.get_number_of_instance_fields()) result.set_class(class_class) # Return the freshly allocated class return result
def new_system_class(self): # Allocate the new system class system_class = Class(self) # Setup the metaclass hierarchy system_class.set_class(Class(self)) system_class.get_class(self).set_class(self.metaclassClass) # Return the freshly allocated system class return system_class
def new_metaclass_class(self): # Allocate the metaclass classes result = Class(self) result.set_class(Class(self)) # Setup the metaclass hierarchy result.get_class(self).set_class(result) # Return the freshly allocated metaclass class return result