diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2005-10-20 19:59:25 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2005-10-20 19:59:25 (GMT) |
commit | 3e0055f8c65c407e74ce476b8e2b1fb889723514 (patch) | |
tree | 169cce8c87033e15364b57de947073e6e9c34d59 /Makefile.pre.in | |
parent | 2cb94aba122b86dcda87d437eb36a860d14393d5 (diff) | |
download | cpython-3e0055f8c65c407e74ce476b8e2b1fb889723514.zip cpython-3e0055f8c65c407e74ce476b8e2b1fb889723514.tar.gz cpython-3e0055f8c65c407e74ce476b8e2b1fb889723514.tar.bz2 |
Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.
The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r-- | Makefile.pre.in | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index 66bc88a..7a69a6b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -216,10 +216,22 @@ PGOBJS= \ PGENOBJS= $(PGENMAIN) $(POBJS) $(PGOBJS) +########################################################################## +# AST +AST_H= $(srcdir)/Include/Python-ast.h +AST_C= $(srcdir)/Python/Python-ast.c +AST_ASDL= $(srcdir)/Parser/Python.asdl + +ASDLGEN_FILES= $(srcdir)/Parser/asdl.py $(srcdir)/Parser/asdl_c.py +# XXX Note that a build now requires Python exist before the build starts +ASDLGEN= $(srcdir)/Parser/asdl_c.py -h $(srcdir)/Include -c $(srcdir)/Python ########################################################################## # Python PYTHON_OBJS= \ + Python/Python-ast.o \ + Python/asdl.o \ + Python/ast.o \ Python/bltinmodule.o \ Python/exceptions.o \ Python/ceval.o \ @@ -265,6 +277,7 @@ OBJECT_OBJS= \ Objects/cellobject.o \ Objects/classobject.o \ Objects/cobject.o \ + Objects/codeobject.o \ Objects/complexobject.o \ Objects/descrobject.o \ Objects/enumobject.o \ @@ -457,8 +470,10 @@ Parser/metagrammar.o: $(srcdir)/Parser/metagrammar.c Parser/tokenizer_pgen.o: $(srcdir)/Parser/tokenizer.c +$(AST_H) $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) + $(ASDLGEN) $(AST_ASDL) -Python/compile.o Python/symtable.o: $(GRAMMAR_H) +Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H) Python/getplatform.o: $(srcdir)/Python/getplatform.c $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c @@ -474,12 +489,15 @@ Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \ PYTHON_HEADERS= \ Include/Python.h \ + Include/Python-ast.h \ + Include/asdl.h \ Include/abstract.h \ Include/boolobject.h \ Include/bufferobject.h \ Include/ceval.h \ Include/classobject.h \ Include/cobject.h \ + Include/code.h \ Include/codecs.h \ Include/compile.h \ Include/complexobject.h \ |