[pypy-svn] pypy default: merge heads

berdario commits-noreply at bitbucket.org
Sun May 1 20:11:22 CEST 2011


Author: Dario Bertini <berdario at gmail.com>
Branch: 
Changeset: r43833:15b9db6dfd50
Date: 2011-05-01 20:10 +0200
http://bitbucket.org/pypy/pypy/changeset/15b9db6dfd50/

Log:	merge heads

diff --git a/pypy/doc/getting-started-python.rst b/pypy/doc/getting-started-python.rst
--- a/pypy/doc/getting-started-python.rst
+++ b/pypy/doc/getting-started-python.rst
@@ -171,7 +171,7 @@
 using only the tools provided by the Microsoft .NET SDK, since
 ``ilasm`` crashes when trying to assemble the pypy-cli code due to its
 size.  Microsoft .NET SDK 2.0.50727.42 is affected by this bug; other
-version could be affected as well: if you find a version of the SDK
+versions could be affected as well: if you find a version of the SDK
 that works, please tell us.
 
 Windows users that want to compile their own pypy-cli can install

diff --git a/pypy/doc/how-to-release.rst b/pypy/doc/how-to-release.rst
--- a/pypy/doc/how-to-release.rst
+++ b/pypy/doc/how-to-release.rst
@@ -31,6 +31,7 @@
   necessary
 * update pypy/doc/contributor.txt (and possibly LICENSE)
 * update README
+* change the tracker to have a new release tag to file bugs against
 * go to pypy/tool/release and run:
   force-builds.py /release/<release branch>
 * wait for builds to complete, make sure there are no failures

diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py
--- a/pypy/objspace/std/test/test_dictmultiobject.py
+++ b/pypy/objspace/std/test/test_dictmultiobject.py
@@ -131,25 +131,6 @@
         assert self.space.eq_w(space.call_function(get, w("33")), w(None))
         assert self.space.eq_w(space.call_function(get, w("33"), w(44)), w(44))
 
-    def test_initialize_from_strdict_shared(self):
-        space = self.space
-        w = space.wrap
-        d = {"a": w(1), "b": w(2)}
-        w_d = space.newdict(from_strdict_shared=d)
-        assert self.space.eq_w(space.getitem(w_d, w("a")), w(1))
-        assert self.space.eq_w(space.getitem(w_d, w("b")), w(2))
-
-    def test_initialize_from_strdict_really_shared(self):
-        space = self.space
-        w = space.wrap
-        d = {"a": w(1), "b": w(2)}
-        w_d = space.newdict(from_strdict_shared=d)
-        assert self.space.eq_w(space.getitem(w_d, w("a")), w(1))
-        assert self.space.eq_w(space.getitem(w_d, w("b")), w(2))
-        d["c"] = w(41)
-        assert self.space.eq_w(space.getitem(w_d, w("c")), w(41))
-
-
 
 class AppTest_DictObject:
     def setup_class(cls):

diff --git a/pypy/translator/cli/src/ll_math.cs b/pypy/translator/cli/src/ll_math.cs
--- a/pypy/translator/cli/src/ll_math.cs
+++ b/pypy/translator/cli/src/ll_math.cs
@@ -25,13 +25,13 @@
             return result;
         }
 
-        // the following code is borrowed from 
+        // the following code is borrowed from
         // http://web.telia.com/~u31115556/under_construction/Functions.Cephes.CFunctions.cs
         const double MAXNUM = double.MaxValue; // 1.79769313486232e308
         const int MEXP = 0x7ff;
 
         [StructLayout(LayoutKind.Explicit)] //, CLSCompliantAttribute(false)]
-        struct DoubleUshorts 
+        struct DoubleUshorts
         {
             [FieldOffset(0)] public double d;
             [FieldOffset(0)] public ushort u0;
@@ -235,6 +235,11 @@
             return double.IsInfinity(x);
         }
 
+        static public bool ll_math_isfinite(double x)
+        {
+            return !double.IsNaN(x) && !double.IsInfinity(x);
+        }
+
         static public double ll_math_copysign(double x, double y)
         {
             if (x < 0.0)

diff --git a/pypy/rlib/rsre/rsre_core.py b/pypy/rlib/rsre/rsre_core.py
--- a/pypy/rlib/rsre/rsre_core.py
+++ b/pypy/rlib/rsre/rsre_core.py
@@ -227,11 +227,12 @@
     subresult = None
 
     def move_to_next_result(self, ctx):
+        # returns either 'self' or None
         result = self.subresult
         if result is None:
             return
         if result.move_to_next_result(ctx):
-            return result
+            return self
         return self.find_next_result(ctx)
 
     def find_next_result(self, ctx):
@@ -808,7 +809,7 @@
         def fre(ctx, ptr, end, ppos):
             return end
     elif checkerfn == match_IN:
-        install_jitdriver_spec('MatchIn', 
+        install_jitdriver_spec('MatchIn',
                                greens=['ppos', 'ctx.pattern'],
                                reds=['ptr', 'end', 'ctx'],
                                debugprint=(1, 0))
@@ -822,7 +823,7 @@
                 else:
                     return ptr
     elif checkerfn == match_IN_IGNORE:
-        install_jitdriver_spec('MatchInIgnore', 
+        install_jitdriver_spec('MatchInIgnore',
                                greens=['ppos', 'ctx.pattern'],
                                reds=['ptr', 'end', 'ctx'],
                                debugprint=(1, 0))

diff --git a/pypy/rlib/rsre/test/test_match.py b/pypy/rlib/rsre/test/test_match.py
--- a/pypy/rlib/rsre/test/test_match.py
+++ b/pypy/rlib/rsre/test/test_match.py
@@ -283,3 +283,7 @@
     def test_match_bug2(self):
         r = get_code(r'(x??)??$')
         assert rsre_core.match(r, "x")
+
+    def test_match_bug3(self):
+        r = get_code(r'([ax]*?x*)?$')
+        assert rsre_core.match(r, "aaxaa")

diff --git a/pypy/config/test/test_pypyoption.py b/pypy/config/test/test_pypyoption.py
--- a/pypy/config/test/test_pypyoption.py
+++ b/pypy/config/test/test_pypyoption.py
@@ -70,6 +70,6 @@
         prefix = descr._name
         c = Config(descr)
         for path in c.getpaths(include_groups=True):
-            fn = prefix + "." + path + ".rst"
+            fn = prefix + "." + path + ".txt"
             yield check_file_exists, fn
 

diff --git a/pypy/translator/jvm/src/pypy/PyPy.java b/pypy/translator/jvm/src/pypy/PyPy.java
--- a/pypy/translator/jvm/src/pypy/PyPy.java
+++ b/pypy/translator/jvm/src/pypy/PyPy.java
@@ -1198,6 +1198,10 @@
         return Double.isInfinite(x);
     }
 
+    public boolean ll_math_isfinite(double x) {
+        return !Double.isNaN(x) && !Double.isInfinite(x);
+    }
+
     private double check(double v) {
         if (Double.isNaN(v))
             interlink.throwValueError();

diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -37,13 +37,16 @@
         #return space.call(space.type(w_self),W_SetIterObject(rdict_w))
         objtype = type(w_self)
         if objtype is W_SetObject:
-            obj = W_SetObject(space, rdict_w)
+            w_obj = W_SetObject(space, rdict_w)
         elif objtype is W_FrozensetObject:
-            obj = W_FrozensetObject(space, rdict_w)
+            w_obj = W_FrozensetObject(space, rdict_w)
         else:
-            itemiterator = space.iter(W_SetIterObject(rdict_w))
-            obj = space.call_function(space.type(w_self),itemiterator)
-        return obj
+            w_type = space.type(w_self)
+            _, w_newdescr = w_type.lookup_where('__new__')
+            w_newfunc = space.get(w_newdescr, w_type)
+            w_itemiterator = W_SetIterObject(rdict_w)
+            w_obj = space.call_function(w_newfunc, w_type, w_itemiterator)
+        return w_obj
 
     _lifeline_ = None
     def getweakref(self):


More information about the Pypy-commit mailing list