[pypy-commit] pypy exctrans: Kill trivial method funcgen.name()

rlamy pypy.commits at gmail.com
Tue Jan 12 14:01:37 EST 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: exctrans
Changeset: r81688:84e61b90451b
Date: 2016-01-12 19:00 +0000
http://bitbucket.org/pypy/pypy/changeset/84e61b90451b/

Log:	Kill trivial method funcgen.name()

diff --git a/rpython/translator/c/funcgen.py b/rpython/translator/c/funcgen.py
--- a/rpython/translator/c/funcgen.py
+++ b/rpython/translator/c/funcgen.py
@@ -83,9 +83,6 @@
                 seen[v] = True
         self.vars = uniquemix
 
-    def name(self, cname):  #virtual
-        return cname
-
     def implementation_begin(self):
         SSI_to_SSA(self.graph)
         self.collect_var_and_types()
@@ -219,8 +216,6 @@
                         yield '}'
                     link = block.exits[0]
                     assert link.exitcase in (False, True)
-                    #yield 'assert(%s == %s);' % (self.expr(block.exitswitch),
-                    #                       self.genc.nameofvalue(link.exitcase, ct))
                     for op in self.gen_link(link):
                         yield op
                 elif TYPE in (Signed, Unsigned, SignedLongLong,
diff --git a/rpython/translator/c/node.py b/rpython/translator/c/node.py
--- a/rpython/translator/c/node.py
+++ b/rpython/translator/c/node.py
@@ -853,8 +853,7 @@
         if self.funcgen:
             yield '%s;' % (
                 forward_cdecl(self.implementationtypename,
-                    self.funcgen.name(self.name), self.db.standalone,
-                    is_exported=is_exported))
+                    self.name, self.db.standalone, is_exported=is_exported))
 
     def implementation(self):
         if self.funcgen:
@@ -871,7 +870,7 @@
         # recompute implementationtypename as the argnames may have changed
         argnames = funcgen.argnames()
         implementationtypename = self.db.gettype(self.T, argnames=argnames)
-        yield '%s {' % cdecl(implementationtypename, funcgen.name(self.name))
+        yield '%s {' % cdecl(implementationtypename, self.name)
         #
         # declare the local variables
         #


More information about the pypy-commit mailing list