philberty / gccpy Goto Github PK
View Code? Open in Web Editor NEWPython Front-end to GCC
License: GNU General Public License v2.0
Python Front-end to GCC
License: GNU General Public License v2.0
I'd love to have a GNU Python compiler. If this project is still active, I'd love to help.
I need one
Implement gpython.h and lang-calls.h which holds only whats needed for the compiled language calling into runtime. Make more explicit interfaces and helpers.
Need to implement exceptions fully Python >= 2.5 support is hard to write the grammar for so implement the 2.4 python style is simpler and more doable for now.
Reuse C++ native exceptions at compile time and link in some c++ exception handling code or figure out how they are implemented and use /setjmp or set/get context
Seriously awesome project. Using the example code at http://gcc.gnu.org/wiki/gccpyinstall (with or without commenting out the print statement in foo2.py).
$ cat Makefile
all:
gccpy -O0 -fdump-tree-gimple -fpy-dump-dot -c foo2.py -o foo2.o
gccpy -O0 -fdump-tree-gimple -fpy-dump-dot -fpy-gen-main -c foo1.py -o foo1.o
gccpy -O0 -o test foo1.o foo2.o
clean:
rm *.o *.gpyx *.gimple *.dot
$ make
gccpy -O0 -fdump-tree-gimple -fpy-dump-dot -c foo2.py -o foo2.o
DEBUG: <../../gccpy/gcc/python/gpy-data-export.cc:36> Trying to write export data to foo2.export.gpyx
gccpy -O0 -fdump-tree-gimple -fpy-dump-dot -fpy-gen-main -c foo1.py -o foo1.o
DEBUG: <../../gccpy/gcc/python/gpy-data-export.cc:73> Trying to lookup module data on foo2
DEBUG: <../../gccpy/gcc/python/gpy-data-export.cc:81> Trying to open <./foo2.export.gpyx>
DEBUG: <../../gccpy/gcc/python/gpy-data-export.cc:36> Trying to write export data to foo1.export.gpyx
gccpy -O0 -o test foo1.o foo2.o
foo2.o:(.bss+0x0): multiple definition of `__MOD_INIT_CHK'
foo1.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
We need this to work correctly.
Make a sys.py module for the python stdlib
Doing something like:
x,y = 1,2
Doesn't compile its something i don't like very much and will leave it to later milestone.
The access to globals and other memory need a cleanup to maintain consistency across code generation
There isn't one.
need to implement the builtin python sys module
Dicts need implemented
We need this to work correctly.
Just an outstanding tool. It would be great to know upfront how feasible compiling things like system libraries, (simple)json, socket libraries, etc will go. If it's possible to completely compile a REST/http server, for instance, that would be absolutely outstanding especially when looking at all of the options out there (psyco, etc)
Also whether there are any differences between Python 2.x and 3.x when using the tool.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.