[pypy-svn] r48814 - in pypy/branch/new-genc-tests-wrapper/pypy/translator/c: . test

rxe at codespeak.net rxe at codespeak.net
Tue Nov 20 13:05:46 CET 2007


Author: rxe
Date: Tue Nov 20 13:05:44 2007
New Revision: 48814

Removed:
   pypy/branch/new-genc-tests-wrapper/pypy/translator/c/symboltable.py
   pypy/branch/new-genc-tests-wrapper/pypy/translator/c/test/test_symboltable.py
Modified:
   pypy/branch/new-genc-tests-wrapper/pypy/translator/c/genc.py
Log:
(cfbolz, rxe) remove symbol table which was commented out and broken anyways

Modified: pypy/branch/new-genc-tests-wrapper/pypy/translator/c/genc.py
==============================================================================
--- pypy/branch/new-genc-tests-wrapper/pypy/translator/c/genc.py	(original)
+++ pypy/branch/new-genc-tests-wrapper/pypy/translator/c/genc.py	Tue Nov 20 13:05:44 2007
@@ -20,7 +20,6 @@
 class CBuilder(object):
     c_source_filename = None
     _compiled = False
-    symboltable = None
     modulename = None
     
     def __init__(self, translator, entrypoint, config, libraries=None,
@@ -141,14 +140,10 @@
             CBuilder.have___thread = check_under_under_thread()
         if not self.standalone:
             assert not self.config.translation.instrument
-            from pypy.translator.c.symboltable import SymbolTable
-            # XXX fix symboltable
-            #self.symboltable = SymbolTable()
             cfile, extra, include_dirs, library_dirs = \
                    gen_source(db, modulename, targetdir,
                               defines = defines,
                               exports = self.exports,
-                              symboltable = self.symboltable,
                               libraries = self.libraries)
         else:
             if self.config.translation.instrument:
@@ -208,8 +203,6 @@
         mod = import_module_from_directory(self.c_source_filename.dirpath(),
                                            self.c_source_filename.purebasename)
         self.c_ext_module = mod
-        if self.symboltable:
-            self.symboltable.attach(mod)   # hopefully temporary hack
         return mod
 
     def isolated_import(self):
@@ -712,7 +705,7 @@
 
 
 def gen_source(database, modulename, targetdir, defines={}, exports={},
-               symboltable=None, libraries=[]):
+               libraries=[]):
     assert not database.standalone
     if isinstance(targetdir, str):
         targetdir = py.path.local(targetdir)
@@ -759,27 +752,6 @@
     sg.write_extra_sources(sources)
 
     #
-    # Debugging info
-    #
-    if symboltable:
-        print >> f
-        print >> f, '/*******************************************************/'
-        print >> f, '/***  Debugging info                                 ***/'
-        print >> f
-        print >> f, 'static int debuginfo_offsets[] = {'
-        for node in database.structdefnodes.values():
-            for expr in symboltable.generate_type_info(database, node):
-                print >> f, '\t%s,' % expr
-        print >> f, '\t0 };'
-        print >> f, 'static void *debuginfo_globals[] = {'
-        for node in database.globalcontainers():
-            if not isinstance(node, PyObjectNode):
-                result = symboltable.generate_global_info(database, node)
-                print >> f, '\t%s,' % (result,)
-        print >> f, '\tNULL };'
-        print >> f, '#include "src/debuginfo.h"'
-
-    #
     # PyObject support (strange) code
     #
     pyobjmaker = database.pyobjmaker



More information about the Pypy-commit mailing list