Author: Armin Rigo <[email protected]>
Branch:
Changeset: r85823:308fc992b6f1
Date: 2016-07-23 14:46 +0200
http://bitbucket.org/pypy/pypy/changeset/308fc992b6f1/
Log: merge heads
diff --git a/pypy/doc/build.rst b/pypy/doc/build.rst
--- a/pypy/doc/build.rst
+++ b/pypy/doc/build.rst
@@ -104,27 +104,24 @@
apt-get install gcc make libffi-dev pkg-config libz-dev libbz2-dev \
libsqlite3-dev libncurses-dev libexpat1-dev libssl-dev libgdbm-dev \
- tk-dev libgc-dev liblzma-dev
-
-For the optional lzma module on PyPy3 you will also need ``liblzma-dev``.
+ tk-dev libgc-dev \
+ liblzma-dev # For lzma on PyPy3.
On Fedora::
dnf install gcc make libffi-devel pkgconfig zlib-devel bzip2-devel \
lib-sqlite3-devel ncurses-devel expat-devel openssl-devel tk-devel \
- gdbm-devel
-
-For the optional lzma module on PyPy3 you will also need ``xz-devel``.
+ gdbm-devel \
+ xz-devel # For lzma on PyPy3.
On SLES11::
zypper install gcc make python-devel pkg-config \
zlib-devel libopenssl-devel libbz2-devel sqlite3-devel \
- libexpat-devel libffi-devel python-curses
+ libexpat-devel libffi-devel python-curses \
+ xz-devel # For lzma on PyPy3.
(XXX plus the SLES11 version of libgdbm-dev and tk-dev)
-For the optional lzma module on PyPy3 you will also need ``xz-devel``.
-
On Mac OS X, most of these build-time dependencies are installed alongside
the Developer Tools. However, note that in order for the installation to
find them you may need to run::
diff --git a/pypy/doc/install.rst b/pypy/doc/install.rst
--- a/pypy/doc/install.rst
+++ b/pypy/doc/install.rst
@@ -39,17 +39,16 @@
library.
If you want to install 3rd party libraries, the most convenient way is
-to install pip_ (unless you want to install virtualenv as explained
-below; then you can directly use pip inside virtualenvs):
+to install pip_ using ensurepip_ (unless you want to install virtualenv as
+explained below; then you can directly use pip inside virtualenvs):
.. code-block:: console
- $ curl -O https://bootstrap.pypa.io/get-pip.py
- $ ./pypy-2.1/bin/pypy get-pip.py
- $ ./pypy-2.1/bin/pip install pygments # for example
+ $ ./pypy-xxx/bin/pypy -m ensurepip
+ $ ./pypy-xxx/bin/pip install pygments # for example
-Third party libraries will be installed in ``pypy-2.1/site-packages``, and
-the scripts in ``pypy-2.1/bin``.
+Third party libraries will be installed in ``pypy-xxx/site-packages``, and
+the scripts in ``pypy-xxx/bin``.
Installing using virtualenv
@@ -61,7 +60,7 @@
checkout::
# from a tarball
- $ virtualenv -p /opt/pypy-c-jit-41718-3fb486695f20-linux/bin/pypy
my-pypy-env
+ $ virtualenv -p /opt/pypy-xxx/bin/pypy my-pypy-env
# from the mercurial checkout
$ virtualenv -p /path/to/pypy/pypy/translator/goal/pypy-c my-pypy-env
@@ -69,7 +68,7 @@
Note that bin/python is now a symlink to bin/pypy.
.. _pip: http://pypi.python.org/pypi/pip
-
+.. _ensurepip: https://docs.python.org/2.7/library/ensurepip.html
Building PyPy yourself
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/pypy/module/cpyext/test/test_cpyext.py
b/pypy/module/cpyext/test/test_cpyext.py
--- a/pypy/module/cpyext/test/test_cpyext.py
+++ b/pypy/module/cpyext/test/test_cpyext.py
@@ -126,7 +126,14 @@
source_strings=source_strings,
compile_extra=compile_extra,
link_extra=link_extra)
- return str(soname)
+ from imp import get_suffixes, C_EXTENSION
+ pydname = soname
+ for suffix, mode, typ in get_suffixes():
+ if typ == C_EXTENSION:
+ pydname = soname.new(purebasename=modname, ext=suffix)
+ soname.rename(pydname)
+ break
+ return str(pydname)
def freeze_refcnts(self):
rawrefcount._dont_free_any_more()
@@ -359,7 +366,11 @@
space.sys.get('modules'),
space.wrap(name))
else:
- return os.path.dirname(mod)
+ path = os.path.dirname(mod)
+ if self.runappdirect:
+ return path
+ else:
+ return space.wrap(path)
@gateway.unwrap_spec(mod=str, name=str)
def reimport_module(space, mod, name):
diff --git a/pypy/module/cpyext/test/test_import.py
b/pypy/module/cpyext/test/test_import.py
--- a/pypy/module/cpyext/test/test_import.py
+++ b/pypy/module/cpyext/test/test_import.py
@@ -39,7 +39,6 @@
class AppTestImportLogic(AppTestCpythonExtensionBase):
def test_import_logic(self):
- skip("leak?")
path = self.import_module(name='test_import_module', load_it=False)
import sys
sys.path.append(path)
diff --git a/rpython/jit/backend/zarch/assembler.py
b/rpython/jit/backend/zarch/assembler.py
--- a/rpython/jit/backend/zarch/assembler.py
+++ b/rpython/jit/backend/zarch/assembler.py
@@ -356,9 +356,6 @@
self.mc = None
def _build_propagate_exception_path(self):
- if not self.cpu.propagate_exception_descr:
- return
-
self.mc = InstrBuilder()
#
# read and reset the current exception
@@ -487,7 +484,7 @@
# Check that we don't get NULL; if we do, we always interrupt the
# current loop, as a "good enough" approximation (same as
# emit_call_malloc_gc()).
- self.propagate_memoryerror_if_r2_is_null(True)
+ self.propagate_memoryerror_if_reg_is_null(r.r2, True)
self._pop_core_regs_from_jitframe(mc, saved_regs)
self._pop_fp_regs_from_jitframe(mc)
@@ -797,12 +794,12 @@
self.mc.BRC(condition, l.imm(off)) # branch over XGR
self.mc.XGR(result_loc, result_loc)
- def propagate_memoryerror_if_r2_is_null(self, pop_one_stackframe=False):
+ def propagate_memoryerror_if_reg_is_null(self, reg,
pop_one_stackframe=False):
# if self.propagate_exception_path == 0 (tests), this may jump to 0
# and segfaults. too bad. the alternative is to continue anyway
- # with r2==0, but that will segfault too.
+ # with reg==0, but that will segfault too.
jmp_pos = self.mc.get_relative_pos()
- # bails to propagate exception path if r2 != 0
+ # bails to propagate exception path if reg != 0
self.mc.reserve_cond_jump()
self.mc.load_imm(r.RETURN, self.propagate_exception_path)
@@ -812,7 +809,7 @@
curpos = self.mc.currpos()
pmc = OverwritingBuilder(self.mc, jmp_pos, 1)
- pmc.CGIJ(r.r2, l.imm(0), c.NE, l.imm(curpos - jmp_pos))
+ pmc.CGIJ(reg, l.imm(0), c.NE, l.imm(curpos - jmp_pos))
pmc.overwrite()
def regalloc_push(self, loc, already_pushed):
diff --git a/rpython/jit/backend/zarch/opassembler.py
b/rpython/jit/backend/zarch/opassembler.py
--- a/rpython/jit/backend/zarch/opassembler.py
+++ b/rpython/jit/backend/zarch/opassembler.py
@@ -421,9 +421,8 @@
class AllocOpAssembler(object):
_mixin_ = True
- def emit_call_malloc_gc(self, op, arglocs, regalloc):
- self._emit_call(op, arglocs)
- self.propagate_memoryerror_if_r2_is_null()
+ def emit_check_memory_error(self, op, arglocs, regalloc):
+ self.propagate_memoryerror_if_reg_is_null(arglocs[0])
def emit_call_malloc_nursery(self, op, arglocs, regalloc):
# registers r.RES and r.RSZ are allocated for this call
diff --git a/rpython/jit/backend/zarch/regalloc.py
b/rpython/jit/backend/zarch/regalloc.py
--- a/rpython/jit/backend/zarch/regalloc.py
+++ b/rpython/jit/backend/zarch/regalloc.py
@@ -828,8 +828,9 @@
prepare_call_f = _prepare_call
prepare_call_n = _prepare_call
- def prepare_call_malloc_gc(self, op):
- return self._prepare_call_default(op)
+ def prepare_check_memory_error(self, op):
+ loc = self.ensure_reg(op.getarg(0))
+ return [loc]
def prepare_call_malloc_nursery(self, op):
self.rm.force_allocate_reg(op, selected_reg=r.RES)
diff --git a/rpython/jit/backend/zarch/test/test_pool.py
b/rpython/jit/backend/zarch/test/test_pool.py
--- a/rpython/jit/backend/zarch/test/test_pool.py
+++ b/rpython/jit/backend/zarch/test/test_pool.py
@@ -40,7 +40,7 @@
def test_constant_in_call_malloc(self):
c = ConstPtr(rffi.cast(llmemory.GCREF, 0xdeadbeef1234))
- self.ensure_can_hold(rop.CALL_MALLOC_GC, [c], descr=self.calldescr)
+ self.ensure_can_hold(rop.COND_CALL, [c], descr=self.calldescr)
assert self.const_in_pool(c)
assert self.const_in_pool(ConstPtr(rffi.cast(llmemory.GCREF,
0xdeadbeef1234)))
diff --git a/rpython/rlib/rvmprof/src/vmprof_config.h
b/rpython/rlib/rvmprof/src/vmprof_config.h
--- a/rpython/rlib/rvmprof/src/vmprof_config.h
+++ b/rpython/rlib/rvmprof/src/vmprof_config.h
@@ -4,7 +4,7 @@
# define HAVE_SIGNAL_H
#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ||
defined(__DragonFly__)
#ifdef __i386__
#define PC_FROM_UCONTEXT uc_mcontext.mc_eip
#else
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit