[pypy-svn] r7574 - pypy/trunk/src/pypy/annotation
mwh at codespeak.net
mwh at codespeak.net
Mon Nov 22 18:05:59 CET 2004
Author: mwh
Date: Mon Nov 22 18:05:58 2004
New Revision: 7574
Modified:
pypy/trunk/src/pypy/annotation/binaryop.py
pypy/trunk/src/pypy/annotation/model.py
pypy/trunk/src/pypy/annotation/unaryop.py
Log:
SomePBC is now referred to as SomePBC (and not SomePrebuiltConstant)
everywhere. Having more than one name for something is officially Just
Annoying.
Modified: pypy/trunk/src/pypy/annotation/binaryop.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/binaryop.py (original)
+++ pypy/trunk/src/pypy/annotation/binaryop.py Mon Nov 22 18:05:58 2004
@@ -8,7 +8,7 @@
from pypy.annotation.model import SomeTuple, SomeImpossibleValue
from pypy.annotation.model import SomeInstance, SomeCallable
from pypy.annotation.model import SomeBuiltin, SomeIterator
-from pypy.annotation.model import SomePrebuiltConstant, immutablevalue
+from pypy.annotation.model import SomePBC, immutablevalue
from pypy.annotation.model import unionof, set, setunion, missing_operation
from pypy.annotation.factory import generalize, isclassdef, getbookkeeper
from pypy.objspace.flow.model import Constant
@@ -297,7 +297,7 @@
return obj1
-class __extend__(pairtype(SomePrebuiltConstant, SomePrebuiltConstant)):
+class __extend__(pairtype(SomePBC, SomePBC)):
def union((pbc1, pbc2)):
- return SomePrebuiltConstant(setunion(pbc1.prebuiltinstances,
- pbc2.prebuiltinstances))
+ return SomePBC(setunion(pbc1.prebuiltinstances,
+ pbc2.prebuiltinstances))
Modified: pypy/trunk/src/pypy/annotation/model.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/model.py (original)
+++ pypy/trunk/src/pypy/annotation/model.py Mon Nov 22 18:05:58 2004
@@ -188,8 +188,6 @@
self.prebuiltinstances = prebuiltinstances
self.knowntype = reduce(commonbase,
[x.__class__ for x in prebuiltinstances])
-SomePrebuiltConstant = SomePBC
-
class SomeImpossibleValue(SomeObject):
"""The empty set. Instances are placeholders for objects that
@@ -250,7 +248,7 @@
elif hasattr(x, '__class__') and x.__class__.__module__ != '__builtin__':
if isinstance(x, Cache) and not x.frozen:
x.freeze()
- result = SomePrebuiltConstant({x: True}) # pre-built inst:
+ result = SomePBC({x: True}) # pre-built inst:
elif x is None:
result = SomeNone()
else:
Modified: pypy/trunk/src/pypy/annotation/unaryop.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/unaryop.py (original)
+++ pypy/trunk/src/pypy/annotation/unaryop.py Mon Nov 22 18:05:58 2004
@@ -9,7 +9,7 @@
from pypy.annotation.model import SomeTuple, SomeImpossibleValue
from pypy.annotation.model import SomeInstance, SomeBuiltin
from pypy.annotation.model import SomeCallable, SomeIterator
-from pypy.annotation.model import SomePrebuiltConstant
+from pypy.annotation.model import SomePBC
from pypy.annotation.model import immutablevalue
from pypy.annotation.model import unionof, set, setunion, missing_operation
from pypy.annotation.factory import BlockedInference, getbookkeeper
@@ -193,7 +193,7 @@
# return unionof(*results)
-class __extend__(SomePrebuiltConstant):
+class __extend__(SomePBC):
def getattr(pbc, s_attr):
assert s_attr.is_constant()
More information about the Pypy-commit
mailing list