1. Pypy
  2. Untitled project
  3. pypy


Armin Rigo  committed a6f1025

Don't ever call makerepr()! That's always bogus.

  • Participants
  • Parent commits 6fe2c02
  • Branches default

Comments (0)

Files changed (3)

File rpython/rlib/rweakref.py

View file
  • Ignore whitespace
     def rtyper_makerepr(self, rtyper):
         from rpython.rlib import _rweakvaldict
         return _rweakvaldict.WeakValueDictRepr(rtyper,
-                                               rtyper.makerepr(self.s_key))
+                                               rtyper.getrepr(self.s_key))
     def rtyper_makekey_ex(self, rtyper):
         return self.__class__,

File rpython/rtyper/rint.py

View file
  • Ignore whitespace
         if not s_int1.nonneg or not s_int2.nonneg:
             raise TyperError("comparing a signed and an unsigned number")
-    repr = hop.rtyper.makerepr(annmodel.unionof(s_int1, s_int2)).as_int
+    repr = hop.rtyper.getrepr(annmodel.unionof(s_int1, s_int2)).as_int
     vlist = hop.inputargs(repr, repr)
     return hop.genop(repr.opprefix+func, vlist, resulttype=Bool)

File rpython/rtyper/rtyper.py

View file
  • Ignore whitespace
     def makekey(self, s_obj):
         return pair(self.type_system, s_obj).rtyper_makekey(self)
-    def makerepr(self, s_obj):
+    def _makerepr(self, s_obj):
         return pair(self.type_system, s_obj).rtyper_makerepr(self)
     def getrepr(self, s_obj):
             result = self.reprs[key]
         except KeyError:
             self.reprs[key] = None
-            result = self.makerepr(s_obj)
+            result = self._makerepr(s_obj)
             assert not isinstance(result.lowleveltype, ContainerType), (
                 "missing a Ptr in the type specification "
                 "of %s:\n%r" % (s_obj, result.lowleveltype))