Monday, June 6, 2011

Cython backend aiming PyPy : Week 2

During this week, I worked on the transformation of the extern definitions :
  • Functions definitions are turned into ctypes functions, functions can have basic C types and structures as parameters (but no pointers for the moment)
  • Structures definitions are turned into ctypes structures, however, for the moment, structures need to be in the right order (a structure A used by structure B needs to be declared before B)
  • Structures can be partially declared thanks to ctypes_configure. This dependency is only needed at compilation time and requires a C compiler (this assumes that the compiler running on the host machine compiles the program with a suitable alignment for the machine running the program).
On this part of the project I still have to :
  • Implement pointers
  • Implement forward declarations
  • Implement unions
It will also be useful to implement a basic code writer as it will be easier to present my work and, it will improve testing as well.

No comments:

Post a Comment