summaryrefslogtreecommitdiff
path: root/Modules/symtablemodule.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2005-10-20 19:59:25 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2005-10-20 19:59:25 +0000
commit0d45400bf5d6dc0f310a12d6e9d8d99395895c0b (patch)
tree39a310a36e115aafcf9fa5052440f9c0f9a7e201 /Modules/symtablemodule.c
parenta778b23cb1c7c0ecede0c6821ffd5ed9e4d9f346 (diff)
downloadcpython-0d45400bf5d6dc0f310a12d6e9d8d99395895c0b.tar.gz
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 'Modules/symtablemodule.c')
-rw-r--r--Modules/symtablemodule.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c
index 909a404fdc..7a52aae0e6 100644
--- a/Modules/symtablemodule.c
+++ b/Modules/symtablemodule.c
@@ -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 @@ init_symtable(void)
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);