Files changed (1)
+The object system is written in Winxed, and uses Parrot's Object/Class. All Python objects are instances of Python.instance.
+Python.instance implements very basic python-like behaviour, and provides overrides for interop purposes (like get_attr* or get_string). It has a __dict__ attribute which is a Parrot Hash which stores all other attributes (inccluding itself). get_attr*/set_attr* look for attributes in said __dict__. Furthermore, they look for __getattribute__/__setattr__ attributes to override themselves up the inheritance chain.
+type is the class of all classes. object is the base of all classes, including type. They're both instances of Python.instance, and type implements __getattribute__ and __setattr__ for correct python behaviour. They walk the inheritance chains correctly and fully implement python descriptors, which are used a lot in python (in particular for bound methods and properties).
+The way stage 2 set things up, Python behaviour is mostly set up correctly. CPython doesn't do more than that (in fact it does a little less than puffin's stage 2 in some ways). However, it would be nice for all of Python's base types to actually use those python base types. And since they're already bootstrapped, it's not even hard.
+For example, since 'function' is exposed to app-level code and takes in a parrot sub as an argument, it is possible to wrap all methods in the object system defined so far in actual python methods. The same can be done for tuples and dicts (like __mro__ and __dict__).
+The compiler uses the 'ast' module to parse python code and walks the resulting AST to generate PIR. It can handle assignment, ints, addition and functions. It uses the object system for all python objects, so if completed it would be a correct implementation of Python3.