[Python-checkins] python/dist/src/Modules _hotshot.c, 1.37, 1.38 symtablemodule.c, 1.8, 1.9

jhylton@users.sourceforge.net jhylton at users.sourceforge.net
Thu Oct 20 21:59:27 CEST 2005


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2121/Modules

Modified Files:
	_hotshot.c symtablemodule.c 
Log Message:
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. 



Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- _hotshot.c	3 Aug 2004 08:33:55 -0000	1.37
+++ _hotshot.c	20 Oct 2005 19:59:24 -0000	1.38
@@ -3,6 +3,7 @@
  */
 
 #include "Python.h"
+#include "code.h"
 #include "compile.h"
 #include "eval.h"
 #include "frameobject.h"

Index: symtablemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/symtablemodule.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- symtablemodule.c	12 Oct 2003 19:09:37 -0000	1.8
+++ symtablemodule.c	20 Oct 2005 19:59:24 -0000	1.9
@@ -1,6 +1,8 @@
 #include "Python.h"
 
+#include "code.h"
 #include "compile.h"
+#include "Python-ast.h"
 #include "symtable.h"
 
 static PyObject *
@@ -64,9 +66,9 @@
 	PyModule_AddIntConstant(m, "DEF_IMPORT", DEF_IMPORT);
 	PyModule_AddIntConstant(m, "DEF_BOUND", DEF_BOUND);
 
-	PyModule_AddIntConstant(m, "TYPE_FUNCTION", TYPE_FUNCTION);
-	PyModule_AddIntConstant(m, "TYPE_CLASS", TYPE_CLASS);
-	PyModule_AddIntConstant(m, "TYPE_MODULE", TYPE_MODULE);
+	PyModule_AddIntConstant(m, "TYPE_FUNCTION", FunctionBlock);
+	PyModule_AddIntConstant(m, "TYPE_CLASS", ClassBlock);
+	PyModule_AddIntConstant(m, "TYPE_MODULE", ModuleBlock);
 
 	PyModule_AddIntConstant(m, "OPT_IMPORT_STAR", OPT_IMPORT_STAR);
 	PyModule_AddIntConstant(m, "OPT_EXEC", OPT_EXEC);



More information about the Python-checkins mailing list