[pypy-commit] pypy win64-stage1: Merge with default

ctismer noreply at buildbot.pypy.org
Fri Mar 23 20:10:51 CET 2012


Author: Christian Tismer  <tismer at stackless.com>
Branch: win64-stage1
Changeset: r53957:fd7331abbb59
Date: 2012-03-23 20:09 +0100
http://bitbucket.org/pypy/pypy/changeset/fd7331abbb59/

Log:	Merge with default

diff --git a/pypy/doc/you-want-to-help.rst b/pypy/doc/you-want-to-help.rst
--- a/pypy/doc/you-want-to-help.rst
+++ b/pypy/doc/you-want-to-help.rst
@@ -16,7 +16,9 @@
   It's not only what we believe in, but also that PyPy's architecture is
   working very well with TDD in mind and not so well without it. Often
   the development means progressing in an unrelated corner, one unittest
-  at a time and then flipping a giant switch. It's worth repeating - PyPy
+  at a time; and then flipping a giant switch, bringing it all together.
+  (It generally works out of the box.  If it doesn't, then we didn't
+  write enough unit tests.)  It's worth repeating - PyPy
   approach is great if you do TDD, not so great otherwise.
 
 * PyPy uses an entirely different set of tools - most of them included
@@ -25,21 +27,21 @@
 Architecture
 ============
 
-PyPy has layers. The 100 mile view:
+PyPy has layers. The 100 miles view:
 
-* `RPython`_ is a language in which we write interpreter in PyPy. Not the entire
-  PyPy project is written in RPython, only parts that are compiled in
+* `RPython`_ is the language in which we write interpreters. Not the entire
+  PyPy project is written in RPython, only the parts that are compiled in
   the translation process. The interesting point is that RPython has no parser,
   it's compiled from the live python objects, which make it possible to do
   all kinds of metaprogramming during import time. In short, Python is a meta
   programming language for RPython.
 
-  RPython standard library is to be found in ``rlib`` subdirectory.
+  The RPython standard library is to be found in the ``rlib`` subdirectory.
 
 .. _`RPython`: coding-guide.html#RPython
 
-* Translation toolchain - this is the part that takes care about translating
-  RPython to flow graphs and then to C. There is more in `architecture`_
+* The translation toolchain - this is the part that takes care about translating
+  RPython to flow graphs and then to C. There is more in the `architecture`_
   document written about it.
 
   It mostly lives in ``rpython``, ``annotator`` and ``objspace/flow``.
diff --git a/pypy/rlib/parsing/pypackrat.py b/pypy/rlib/parsing/pypackrat.py
--- a/pypy/rlib/parsing/pypackrat.py
+++ b/pypy/rlib/parsing/pypackrat.py
@@ -1,6 +1,8 @@
 
 from pypy.rlib.parsing.tree import Nonterminal, Symbol
-from makepackrat import PackratParser, BacktrackException, Status
+from pypy.rlib.parsing.makepackrat import PackratParser, BacktrackException, Status
+
+
 class Parser(object):
     def NAME(self):
         return self._NAME().result
diff --git a/pypy/rpython/rstr.py b/pypy/rpython/rstr.py
--- a/pypy/rpython/rstr.py
+++ b/pypy/rpython/rstr.py
@@ -165,6 +165,7 @@
         v_char = hop.inputarg(rstr.char_repr, arg=1)
         v_left = hop.inputconst(Bool, left)
         v_right = hop.inputconst(Bool, right)
+        hop.exception_is_here()
         return hop.gendirectcall(self.ll.ll_strip, v_str, v_char, v_left, v_right)
 
     def rtype_method_lstrip(self, hop):
diff --git a/pypy/rpython/test/test_rstr.py b/pypy/rpython/test/test_rstr.py
--- a/pypy/rpython/test/test_rstr.py
+++ b/pypy/rpython/test/test_rstr.py
@@ -637,13 +637,16 @@
     def _make_split_test(self, split_fn):
         const = self.const
         def fn(i):
-            s = [const(''), const('0.1.2.4.8'), const('.1.2'), const('1.2.'), const('.1.2.4.')][i]
-            l = getattr(s, split_fn)(const('.'))
-            sum = 0
-            for num in l:
-                if len(num):
-                    sum += ord(num[0]) - ord(const('0')[0])
-            return sum + len(l) * 100
+            try:
+                s = [const(''), const('0.1.2.4.8'), const('.1.2'), const('1.2.'), const('.1.2.4.')][i]
+                l = getattr(s, split_fn)(const('.'))
+                sum = 0
+                for num in l:
+                    if len(num):
+                        sum += ord(num[0]) - ord(const('0')[0])
+                return sum + len(l) * 100
+            except MemoryError:
+                return 42
         return fn
 
     def test_split(self):


More information about the pypy-commit mailing list