[pypy-svn] r7439 - pypy/trunk/src/pypy/annotation
mgedmin at codespeak.net
mgedmin at codespeak.net
Fri Nov 19 14:54:20 CET 2004
Author: mgedmin
Date: Fri Nov 19 14:54:20 2004
New Revision: 7439
Modified:
pypy/trunk/src/pypy/annotation/model.py
Log:
Added SomeNone.
Modified: pypy/trunk/src/pypy/annotation/model.py
==============================================================================
--- pypy/trunk/src/pypy/annotation/model.py (original)
+++ pypy/trunk/src/pypy/annotation/model.py Fri Nov 19 14:54:20 2004
@@ -74,6 +74,10 @@
caused_by_merge = property(caused_by_merge, set_caused_by_merge)
del set_caused_by_merge
+class SomeNone(SomeObject):
+ "Stands for None."
+ knowntype = type(None)
+ const = None
class SomeInteger(SomeObject):
"Stands for an object which is known to be an integer."
@@ -246,6 +250,8 @@
if isinstance(x, Cache) and not x.frozen:
x.freeze()
result = SomePrebuiltConstant({x: True}) # pre-built inst:
+ elif x is None:
+ result = SomeNone()
else:
result = SomeObject()
result.const = x
More information about the Pypy-commit
mailing list