Author: Maciej Fijalkowski <[email protected]>
Branch: kill-someobject
Changeset: r58034:9adfe97b9a6a
Date: 2012-10-12 15:04 +0200
http://bitbucket.org/pypy/pypy/changeset/9adfe97b9a6a/

Log:    fix someobject in jit

diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -770,11 +770,11 @@
     def compute_result_annotation(self, s_driver, s_name, s_value):
         from pypy.annotation import model as annmodel
         assert s_name.is_constant()
-        if annmodel.s_None.contains(s_value):
-            if s_name.const == 'enable_opts':
-                assert annmodel.SomeString(can_be_None=True).contains(s_value)
-            else:
-                assert annmodel.SomeInteger().contains(s_value)
+        if s_name.const == 'enable_opts':
+            assert annmodel.SomeString(can_be_None=True).contains(s_value)
+        else: 
+            assert (s_value == annmodel.s_None or
+                    annmodel.SomeInteger().contains(s_value))
         return annmodel.s_None
 
     def specialize_call(self, hop):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to