[pypy-svn] r10655 - pypy/dist/pypy/translator

tismer at codespeak.net tismer at codespeak.net
Fri Apr 15 01:14:31 CEST 2005

Author: tismer
Date: Fri Apr 15 01:14:30 2005
New Revision: 10655

Yes, I did change this checkin, although it was totally correct.
So why, you may ask???

Baaasically (Hi Alex) the same change that arigo did,
but I really had to add some commentary,
which should be dropped, after we fulfilled
our task of really documenting and supporting
the maintainers of tcc, who were so very helpful
for us. Please, try to digest that sentence.

We need to keep track of actions which we
want to propagate through the pypy environment.
We are an open-sourced, EU-funded project.
In this outstanding situation, we are oblieged
not to just digest and valuate existing other OS
projects, but we have to support them, I guess.

Now, by putting tcc into a real-world situation,
I think that we also added to its reasons why it
should exist, of course.
But if we do use it, and if we do find problems
with it, then it should be a consequence to support
it and to provide follow-ups and bug-reports.

Was this spelled correctly, guys?

cheers - chris

Modified: pypy/dist/pypy/translator/gensupp.py
--- pypy/dist/pypy/translator/gensupp.py	(original)
+++ pypy/dist/pypy/translator/gensupp.py	Fri Apr 15 01:14:30 2005
@@ -35,7 +35,7 @@
     return [block for ofs, txt, block in allblocks]
 # a unique list, similar to a list.
-# append1 appends an object only if it is not there,already.
+# append1 appends an object only if it is not there, already.
 class UniqueList(list):
     def __init__(self, *args, **kwds):
@@ -149,10 +149,14 @@
             basename = ('v', 'w_') [wrapped]
         elif scorepos >= 0 and name[scorepos+1:].isdigit():
             basename = name[:scorepos]
-            if wrapped:
-                basename = "w_" + basename
-            else:
-                basename = "l_" + basename
+            # for wrapped named things, prepend a w_
+            # for other named things, prepend a l_.
+            # XXX The latter is needed because tcc has a nasty parser bug that
+            # produces errors if names co-incide with global typedefs,
+            # if the type prefix is itself a typedef reference!
+            # XXX report this bug to the tcc maintainer(s)
+            # YYY drop this comment afterwards, but keep the code, it's better.
+            basename = ("l_", "w_")[wrapped] + basename
             basename = name
         ret = self.uniquename(basename)

More information about the Pypy-commit mailing list