[pypy-commit] pypy s390x-backend: jump location was off, shift by parameter of sradi is weird (but it works now)
Author: Richard Plangger Branch: s390x-backend Changeset: r82874:78f8d539bef6 Date: 2016-03-08 09:25 +0100 http://bitbucket.org/pypy/pypy/changeset/78f8d539bef6/ Log:jump location was off, shift by parameter of sradi is weird (but it works now) diff --git a/rpython/jit/backend/ppc/opassembler.py b/rpython/jit/backend/ppc/opassembler.py --- a/rpython/jit/backend/ppc/opassembler.py +++ b/rpython/jit/backend/ppc/opassembler.py @@ -905,7 +905,7 @@ jlt_location = self.mc.currpos() self.mc.trap() -self.mc.sradi(r.SCRATCH.value, length_loc.value, shift_by, 31) +self.mc.sradi(r.SCRATCH.value, length_loc.value, 0, shift_by) self.mc.mtctr(r.SCRATCH.value) # store the length in count register self.mc.li(r.SCRATCH.value, 0) @@ -949,9 +949,9 @@ self.mc.subi(ofs_loc.value, ofs_loc.value, 1) -loop_position = self.mc.currpos() +loop_location = self.mc.currpos() self.eza_stXu(r.SCRATCH.value, ofs_loc.value, 1, 1) -self.mc.bdnz(self.mc.currpos() - loop_location) +self.mc.bdnz(loop_location - self.mc.currpos()) pmc = OverwritingBuilder(self.mc, jle_location, 1) pmc.ble(self.mc.currpos() - jle_location)# !GT ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy jit-leaner-frontend: fix the order of resumedata rebuild
Author: fijal Branch: jit-leaner-frontend Changeset: r82875:e48b95c1467b Date: 2016-03-08 11:42 +0200 http://bitbucket.org/pypy/pypy/changeset/e48b95c1467b/ Log:fix the order of resumedata rebuild diff --git a/rpython/jit/metainterp/history.py b/rpython/jit/metainterp/history.py --- a/rpython/jit/metainterp/history.py +++ b/rpython/jit/metainterp/history.py @@ -657,6 +657,12 @@ def length(self): return self.trace._count +def get_cut_position(self): +return len(self.trace._ops) + +def cut(self, cut_at): +self.trace.cut_at(cut_at) + def any_operation(self): return self.trace._count > 0 diff --git a/rpython/jit/metainterp/opencoder.py b/rpython/jit/metainterp/opencoder.py --- a/rpython/jit/metainterp/opencoder.py +++ b/rpython/jit/metainterp/opencoder.py @@ -139,6 +139,9 @@ def length(self): return len(self._ops) +def cut_at(self, end): +self._ops = self._ops[:end] + def _encode(self, box): if isinstance(box, Const): if (isinstance(box, ConstInt) and diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py b/rpython/jit/metainterp/optimizeopt/unroll.py --- a/rpython/jit/metainterp/optimizeopt/unroll.py +++ b/rpython/jit/metainterp/optimizeopt/unroll.py @@ -253,10 +253,9 @@ else: debug_print("Retrace count reached, jumping to preamble") return self.jump_to_preamble(cell_token, jump_op, info) -xxx -exported_state = self.export_state(start_label, - operations[-1].getarglist(), - info.inputargs, box_names_memo) +exported_state = self.export_state(info.jump_op.getarglist(), + info.inputargs, runtime_boxes, + box_names_memo) exported_state.quasi_immutable_deps = self.optimizer.quasi_immutable_deps self.optimizer._clean_optimization_info(self.optimizer._newoperations) return exported_state, self.optimizer._newoperations diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py --- a/rpython/jit/metainterp/pyjitpl.py +++ b/rpython/jit/metainterp/pyjitpl.py @@ -1918,7 +1918,7 @@ def retrace_needed(self, trace, exported_state): self.partial_trace = trace -self.retracing_from = len(self.history.operations) - 1 +self.retracing_from = self.history.length() self.exported_state = exported_state self.heapcache.reset() @@ -2245,7 +2245,7 @@ jd_sd.warmstate.get_location_str(greenkey), self.staticdata.logger_ops._make_log_operations( self.box_names_memo), -self.history.operations) +self.history.trace) if self.aborted_tracing_jitdriver is not None: jd_sd = self.aborted_tracing_jitdriver greenkey = self.aborted_tracing_greenkey @@ -2454,7 +2454,7 @@ self.staticdata.log('cancelled, tracing more...') # Otherwise, no loop found so far, so continue tracing. -start = len(self.history.operations) +start = self.history.get_cut_position() self.current_merge_points.append((live_arg_boxes, start)) def _unpack_boxes(self, boxes, start, stop): @@ -2606,18 +2606,18 @@ if not target_jitcell_token: return +cut_at = self.history.get_cut_position() self.history.record(rop.JUMP, live_arg_boxes[num_green_args:], None, descr=target_jitcell_token) self.history.ends_with_jump = True try: target_token = compile.compile_trace(self, self.resumekey) finally: - +self.history.cut(cut_at) # pop the jump if target_token is not None: # raise if it *worked* correctly assert isinstance(target_token, TargetToken) jitcell_token = target_token.targeting_jitcell_token self.raise_continue_running_normally(live_arg_boxes, jitcell_token) - # remove the jump op and continue tracing def compile_done_with_this_frame(self, exitbox): # temporarily put a JUMP to a pseudo-loop diff --git a/rpython/jit/metainterp/resume.py b/rpython/jit/metainterp/resume.py --- a/rpython/jit/metainterp/resume.py +++ b/rpython/jit/metainterp/resume.py @@ -1094,7 +1094,6 @@ f.setup_resume_at_op(pc) resumereader.consume_boxes(f.get_current_position_info(), f.registers_i, f.registers_r, f.registers_f) -metainterp.framestack.reverse() return resumereader.liveboxes, virtualizable_boxes, virtualref_boxes @@ -1368,22 +1367,16 @@ # by the positions in the numbering. The first one we get must be # the bottom one, i.e. the last one in the chain, in order to make
[pypy-commit] pypy jit-leaner-frontend: fix
Author: fijal Branch: jit-leaner-frontend Changeset: r82876:7d2ffc440da7 Date: 2016-03-08 12:17 +0200 http://bitbucket.org/pypy/pypy/changeset/7d2ffc440da7/ Log:fix diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py b/rpython/jit/metainterp/optimizeopt/unroll.py --- a/rpython/jit/metainterp/optimizeopt/unroll.py +++ b/rpython/jit/metainterp/optimizeopt/unroll.py @@ -228,7 +228,7 @@ inline_short_preamble, box_names_memo): self._check_no_forwarding([trace.inputargs]) info, ops = self.optimizer.propagate_all_forward(trace.get_iter(), -call_pure_results) +call_pure_results, False) jump_op = info.jump_op cell_token = jump_op.getdescr() assert isinstance(cell_token, JitCellToken) ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: an attempt to fix OS X 32bit
Author: fijal Branch: Changeset: r82878:455ba7f390b8 Date: 2016-03-08 12:36 +0200 http://bitbucket.org/pypy/pypy/changeset/455ba7f390b8/ Log:an attempt to fix OS X 32bit diff --git a/rpython/rlib/rvmprof/src/vmprof_getpc.h b/rpython/rlib/rvmprof/src/vmprof_getpc.h --- a/rpython/rlib/rvmprof/src/vmprof_getpc.h +++ b/rpython/rlib/rvmprof/src/vmprof_getpc.h @@ -54,6 +54,7 @@ // It will cause problems for FreeBSD though!, because it turns off // the needed __BSD_VISIBLE. #ifdef __APPLE__ +#include #define _XOPEN_SOURCE 500 #endif @@ -144,7 +145,11 @@ #else intptr_t GetPC(ucontext_t *signal_ucontext) { #ifdef __APPLE__ +#if ((ULONG_MAX) == (UINT_MAX)) + return (signal_ucontext->uc_mcontext->__ss.__eip); +#else return (signal_ucontext->uc_mcontext->__ss.__rip); +#endif #else return signal_ucontext->PC_FROM_UCONTEXT; // defined in config.h #endif ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy jit-leaner-frontend: progress
Author: fijal Branch: jit-leaner-frontend Changeset: r82877:0be62192045f Date: 2016-03-08 12:31 +0200 http://bitbucket.org/pypy/pypy/changeset/0be62192045f/ Log:progress diff --git a/rpython/jit/metainterp/compile.py b/rpython/jit/metainterp/compile.py --- a/rpython/jit/metainterp/compile.py +++ b/rpython/jit/metainterp/compile.py @@ -1007,7 +1007,7 @@ metainterp_sd.stats.add_jitcell_token(jitcell_token) -def compile_trace(metainterp, resumekey): +def compile_trace(metainterp, resumekey, runtime_boxes): """Try to compile a new bridge leading from the beginning of the history to some existing place. """ @@ -1034,7 +1034,7 @@ call_pure_results = metainterp.call_pure_results if metainterp.history.ends_with_jump: -data = BridgeCompileData(trace, inputargs, +data = BridgeCompileData(trace, runtime_boxes, call_pure_results=call_pure_results, enable_opts=enable_opts, inline_short_preamble=inline_short_preamble) diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py --- a/rpython/jit/metainterp/pyjitpl.py +++ b/rpython/jit/metainterp/pyjitpl.py @@ -2611,7 +2611,8 @@ descr=target_jitcell_token) self.history.ends_with_jump = True try: -target_token = compile.compile_trace(self, self.resumekey) +target_token = compile.compile_trace(self, self.resumekey, +live_arg_boxes[num_green_args:]) finally: self.history.cut(cut_at) # pop the jump if target_token is not None: # raise if it *worked* correctly @@ -2643,7 +2644,7 @@ # FIXME: can we call compile_trace? token = loop_tokens[0].finishdescr self.history.record(rop.FINISH, exits, None, descr=token) -target_token = compile.compile_trace(self, self.resumekey) +target_token = compile.compile_trace(self, self.resumekey, exits) if target_token is not token: compile.giveup() ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: merge
Author: fijal Branch: Changeset: r82879:e1352ae844c0 Date: 2016-03-08 12:37 +0200 http://bitbucket.org/pypy/pypy/changeset/e1352ae844c0/ Log:merge diff --git a/LICENSE b/LICENSE --- a/LICENSE +++ b/LICENSE @@ -240,6 +240,7 @@ Kristjan Valur Jonsson David Lievens Neil Blakey-Milner + Sergey Matyunin Lutz Paelike Lucio Torre Lars Wassermann @@ -271,6 +272,7 @@ Aaron Tubbs Ben Darnell Roberto De Ioris + Logan Chien Juan Francisco Cantero Hurtado Ruochen Huang Jeong YunWon diff --git a/pypy/doc/contributor.rst b/pypy/doc/contributor.rst --- a/pypy/doc/contributor.rst +++ b/pypy/doc/contributor.rst @@ -210,6 +210,7 @@ Kristjan Valur Jonsson David Lievens Neil Blakey-Milner + Sergey Matyunin Lutz Paelike Lucio Torre Lars Wassermann @@ -241,6 +242,7 @@ Aaron Tubbs Ben Darnell Roberto De Ioris + Logan Chien Juan Francisco Cantero Hurtado Ruochen Huang Jeong YunWon diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -12,11 +12,11 @@ We also merged a major upgrade to our C-API layer (cpyext), simplifying the interaction between c-level objects and PyPy interpreter level objects. As a result, lxml with its cython compiled component `passes all tests`_ on PyPy +and the new cpyext is a lot faster than the previous one. -Users who have gotten used to vmprof_ on Linux, and those on other platforms -who have not yet tried its awesomeness, will be happy to hear that vmprof -now just works on MacOS and Windows too, in both PyPy (built-in support) and -CPython (as an installed module). +vmprof_ has been a go-to profiler for PyPy on linux for a few releases +and we're happy to announce that thanks to commercial cooperation, vmprof +now works on Linux, OS X and Windows on both PyPy and CPython. You can download the PyPy 5.0 release here: @@ -36,7 +36,7 @@ While not applicable only to PyPy, `cffi`_ is arguably our most significant contribution to the python ecosystem. PyPy 5.0 ships with -`cffi-1.5.2`_ which now allows embedding PyPy (or cpython) in a c program. +`cffi-1.5.2`_ which now allows embedding PyPy (or cpython) in a C program. .. _`PyPy`: http://doc.pypy.org .. _`RPython`: https://rpython.readthedocs.org @@ -52,18 +52,18 @@ = PyPy is a very compliant Python interpreter, almost a drop-in replacement for -CPython 2.7. It's fast (`pypy and cpython 2.7.x`_ performance comparison) +CPython 2.7. It's fast (`PyPy and CPython 2.7.x`_ performance comparison) due to its integrated tracing JIT compiler. We also welcome developers of other `dynamic languages`_ to see what RPython can do for them. This release supports **x86** machines on most common operating systems -(Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, freebsd), +(Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD), newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux, and the -big- and little-endian variants of **ppc64** running Linux. +big- and little-endian variants of **PPC64** running Linux. -.. _`pypy and cpython 2.7.x`: http://speed.pypy.org +.. _`PyPy and CPython 2.7.x`: http://speed.pypy.org .. _`dynamic languages`: http://pypyjs.org Other Highlights (since 4.0.1 released in November 2015) @@ -103,7 +103,7 @@ * More completely support datetime, optimize timedelta creation - * Fix for issue 2185 which caused an inconsistent list of operations to be + * Fix for issue #2185 which caused an inconsistent list of operations to be generated by the unroller, appeared in a complicated DJango app * Fix an elusive issue with stacklets on shadowstack which showed up when diff --git a/pypy/tool/release/repackage.sh b/pypy/tool/release/repackage.sh --- a/pypy/tool/release/repackage.sh +++ b/pypy/tool/release/repackage.sh @@ -1,7 +1,7 @@ # Edit these appropriately before running this script -maj=4 +maj=5 min=0 -rev=1 +rev=0 # This script will download latest builds from the buildmaster, rename the top # level directory, and repackage ready to be uploaded to bitbucket. It will also # download source, assuming a tag for the release already exists, and repackage them. diff --git a/rpython/translator/c/test/test_genc.py b/rpython/translator/c/test/test_genc.py --- a/rpython/translator/c/test/test_genc.py +++ b/rpython/translator/c/test/test_genc.py @@ -596,7 +596,7 @@ t.context._graphof(foobar_fn).inhibit_tail_call = True t.source_c() lines = t.driver.cbuilder.c_source_filename.join('..', - 'rpython_translator_c_test_test_genc.c').readlines() + 'rpython_translator_c_test.c').readlines() for i, line in enumerate(lines): if '= pypy_g_foobar_fn' in line: break ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: remove bugfix that didn't make it into the release
Author: mattip Branch: Changeset: r82880:b96f63e5e9fd Date: 2016-03-08 13:39 +0200 http://bitbucket.org/pypy/pypy/changeset/b96f63e5e9fd/ Log:remove bugfix that didn't make it into the release diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -128,9 +128,6 @@ * Fix for corner case (likely shown by Krakatau) for consecutive guards with interdependencies - * Fix applevel bare class method comparisons which should fix pretty printing -in IPython - * Issues reported with our previous release were resolved_ after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy werat/fix-typo-in-documentation-1457447122290: Fix typo in documentation
Author: werat Branch: werat/fix-typo-in-documentation-1457447122290 Changeset: r82881:33c65ef7faf9 Date: 2016-03-08 14:29 + http://bitbucket.org/pypy/pypy/changeset/33c65ef7faf9/ Log:Fix typo in documentation diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -265,7 +265,7 @@ return False def evil(y): -d = {x(): 1} +d = {X(): 1} X.__eq__ = __evil_eq__ d[y] # might trigger a call to __eq__? ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: Merged in werat/pypy/werat/fix-typo-in-documentation-1457447122290 (pull request #412)
Author: Maciej Fijalkowski Branch: Changeset: r82882:72e2c0d9368a Date: 2016-03-08 16:37 +0200 http://bitbucket.org/pypy/pypy/changeset/72e2c0d9368a/ Log:Merged in werat/pypy/werat/fix-typo-in-documentation-1457447122290 (pull request #412) Fix typo in documentation diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -265,7 +265,7 @@ return False def evil(y): -d = {x(): 1} +d = {X(): 1} X.__eq__ = __evil_eq__ d[y] # might trigger a call to __eq__? ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: ugh, export that
Author: fijal Branch: Changeset: r82883:70bd51df3fe6 Date: 2016-03-08 17:11 +0200 http://bitbucket.org/pypy/pypy/changeset/70bd51df3fe6/ Log:ugh, export that diff --git a/rpython/translator/c/src/entrypoint.c b/rpython/translator/c/src/entrypoint.c --- a/rpython/translator/c/src/entrypoint.c +++ b/rpython/translator/c/src/entrypoint.c @@ -37,6 +37,7 @@ # include #endif +RPY_EXTERN void rpython_startup_code(void) { #ifdef RPY_WITH_GIL ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: merge
Author: fijal Branch: Changeset: r82884:9f7abe836d20 Date: 2016-03-08 17:12 +0200 http://bitbucket.org/pypy/pypy/changeset/9f7abe836d20/ Log:merge diff --git a/LICENSE b/LICENSE --- a/LICENSE +++ b/LICENSE @@ -240,6 +240,7 @@ Kristjan Valur Jonsson David Lievens Neil Blakey-Milner + Sergey Matyunin Lutz Paelike Lucio Torre Lars Wassermann @@ -271,6 +272,7 @@ Aaron Tubbs Ben Darnell Roberto De Ioris + Logan Chien Juan Francisco Cantero Hurtado Ruochen Huang Jeong YunWon diff --git a/pypy/doc/contributor.rst b/pypy/doc/contributor.rst --- a/pypy/doc/contributor.rst +++ b/pypy/doc/contributor.rst @@ -210,6 +210,7 @@ Kristjan Valur Jonsson David Lievens Neil Blakey-Milner + Sergey Matyunin Lutz Paelike Lucio Torre Lars Wassermann @@ -241,6 +242,7 @@ Aaron Tubbs Ben Darnell Roberto De Ioris + Logan Chien Juan Francisco Cantero Hurtado Ruochen Huang Jeong YunWon diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -265,7 +265,7 @@ return False def evil(y): -d = {x(): 1} +d = {X(): 1} X.__eq__ = __evil_eq__ d[y] # might trigger a call to __eq__? diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -12,11 +12,11 @@ We also merged a major upgrade to our C-API layer (cpyext), simplifying the interaction between c-level objects and PyPy interpreter level objects. As a result, lxml with its cython compiled component `passes all tests`_ on PyPy +and the new cpyext is a lot faster than the previous one. -Users who have gotten used to vmprof_ on Linux, and those on other platforms -who have not yet tried its awesomeness, will be happy to hear that vmprof -now just works on MacOS and Windows too, in both PyPy (built-in support) and -CPython (as an installed module). +vmprof_ has been a go-to profiler for PyPy on linux for a few releases +and we're happy to announce that thanks to commercial cooperation, vmprof +now works on Linux, OS X and Windows on both PyPy and CPython. You can download the PyPy 5.0 release here: @@ -36,7 +36,7 @@ While not applicable only to PyPy, `cffi`_ is arguably our most significant contribution to the python ecosystem. PyPy 5.0 ships with -`cffi-1.5.2`_ which now allows embedding PyPy (or cpython) in a c program. +`cffi-1.5.2`_ which now allows embedding PyPy (or cpython) in a C program. .. _`PyPy`: http://doc.pypy.org .. _`RPython`: https://rpython.readthedocs.org @@ -52,18 +52,18 @@ = PyPy is a very compliant Python interpreter, almost a drop-in replacement for -CPython 2.7. It's fast (`pypy and cpython 2.7.x`_ performance comparison) +CPython 2.7. It's fast (`PyPy and CPython 2.7.x`_ performance comparison) due to its integrated tracing JIT compiler. We also welcome developers of other `dynamic languages`_ to see what RPython can do for them. This release supports **x86** machines on most common operating systems -(Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, freebsd), +(Linux 32/64, Mac OS X 64, Windows 32, OpenBSD, FreeBSD), newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux, and the -big- and little-endian variants of **ppc64** running Linux. +big- and little-endian variants of **PPC64** running Linux. -.. _`pypy and cpython 2.7.x`: http://speed.pypy.org +.. _`PyPy and CPython 2.7.x`: http://speed.pypy.org .. _`dynamic languages`: http://pypyjs.org Other Highlights (since 4.0.1 released in November 2015) @@ -103,7 +103,7 @@ * More completely support datetime, optimize timedelta creation - * Fix for issue 2185 which caused an inconsistent list of operations to be + * Fix for issue #2185 which caused an inconsistent list of operations to be generated by the unroller, appeared in a complicated DJango app * Fix an elusive issue with stacklets on shadowstack which showed up when @@ -128,9 +128,6 @@ * Fix for corner case (likely shown by Krakatau) for consecutive guards with interdependencies - * Fix applevel bare class method comparisons which should fix pretty printing -in IPython - * Issues reported with our previous release were resolved_ after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy diff --git a/pypy/tool/release/repackage.sh b/pypy/tool/release/repackage.sh --- a/pypy/tool/release/repackage.sh +++ b/pypy/tool/release/repackage.sh @@ -1,7 +1,7 @@ # Edit these appropriately before running this script -maj=4 +maj=5 min=0 -rev=1 +rev=0 # This script will download latest builds from the buildmaster, rename the top # level directory, and repackage ready to be uploaded to bitbucket. It will also # download source, assuming a tag for the release already exists, and repackage them. diff --git a/r
[pypy-commit] pypy default: Test for rpython_startup_code being exported. And fix: it was using the
Author: Armin Rigo Branch: Changeset: r82885:62a5b8816876 Date: 2016-03-08 16:46 +0100 http://bitbucket.org/pypy/pypy/changeset/62a5b8816876/ Log:Test for rpython_startup_code being exported. And fix: it was using the wrong macro anyway... diff --git a/rpython/translator/c/src/entrypoint.c b/rpython/translator/c/src/entrypoint.c --- a/rpython/translator/c/src/entrypoint.c +++ b/rpython/translator/c/src/entrypoint.c @@ -37,7 +37,7 @@ # include #endif -RPY_EXTERN +RPY_EXPORTED void rpython_startup_code(void) { #ifdef RPY_WITH_GIL diff --git a/rpython/translator/c/test/test_standalone.py b/rpython/translator/c/test/test_standalone.py --- a/rpython/translator/c/test/test_standalone.py +++ b/rpython/translator/c/test/test_standalone.py @@ -81,7 +81,7 @@ # # verify that the executable re-export symbols, but not too many if sys.platform.startswith('linux') and not kwds.get('shared', False): -seen_main = False +seen = set() g = os.popen("objdump -T '%s'" % builder.executable_name, 'r') for line in g: if not line.strip(): @@ -91,8 +91,8 @@ name = line.split()[-1] if name.startswith('__'): continue +seen.add(name) if name == 'main': -seen_main = True continue if name == 'pypy_debug_file': # ok to export this one continue @@ -104,7 +104,9 @@ "declaration of this C function or global variable" % (name,)) g.close() -assert seen_main, "did not see 'main' exported" +# list of symbols that we *want* to be exported: +for name in ['main', 'pypy_debug_file', 'rpython_startup_code']: +assert name in seen, "did not see '%r' exported" % name # return t, builder ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: try to fix html titles (thanks Pim van der Eijk)w
Author: mattip Branch: Changeset: r82886:181dc3529afd Date: 2016-03-08 18:12 +0200 http://bitbucket.org/pypy/pypy/changeset/181dc3529afd/ Log:try to fix html titles (thanks Pim van der Eijk)w diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py --- a/pypy/doc/conf.py +++ b/pypy/doc/conf.py @@ -123,7 +123,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = 'PyPy documentation' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None diff --git a/rpython/doc/conf.py b/rpython/doc/conf.py --- a/rpython/doc/conf.py +++ b/rpython/doc/conf.py @@ -59,7 +59,7 @@ # General information about the project. project = u'RPython' -copyright = u'2015, The PyPy Project' +copyright = u'2016, The PyPy Project' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -121,7 +121,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = RPython Documentation # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: more precise wording
Author: mattip Branch: Changeset: r82888:774aa4687a6f Date: 2016-03-08 18:33 +0200 http://bitbucket.org/pypy/pypy/changeset/774aa4687a6f/ Log:more precise wording diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -11,8 +11,8 @@ We also merged a major upgrade to our C-API layer (cpyext), simplifying the interaction between c-level objects and PyPy interpreter level objects. As a -result, lxml with its cython compiled component `passes all tests`_ on PyPy -and the new cpyext is a lot faster than the previous one. +result, lxml (prerelease) with its cython compiled component +`passes all tests`_ on PyPy. The new cpyext is also much faster. vmprof_ has been a go-to profiler for PyPy on linux for a few releases and we're happy to announce that thanks to commercial cooperation, vmprof ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy release-5.x: merge default into release
Author: mattip Branch: release-5.x Changeset: r82889:8c3942dc33cf Date: 2016-03-08 18:34 +0200 http://bitbucket.org/pypy/pypy/changeset/8c3942dc33cf/ Log:merge default into release diff --git a/pypy/doc/conf.py b/pypy/doc/conf.py --- a/pypy/doc/conf.py +++ b/pypy/doc/conf.py @@ -123,7 +123,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = 'PyPy documentation' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None diff --git a/pypy/doc/cpython_differences.rst b/pypy/doc/cpython_differences.rst --- a/pypy/doc/cpython_differences.rst +++ b/pypy/doc/cpython_differences.rst @@ -265,7 +265,7 @@ return False def evil(y): -d = {x(): 1} +d = {X(): 1} X.__eq__ = __evil_eq__ d[y] # might trigger a call to __eq__? diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -11,8 +11,8 @@ We also merged a major upgrade to our C-API layer (cpyext), simplifying the interaction between c-level objects and PyPy interpreter level objects. As a -result, lxml with its cython compiled component `passes all tests`_ on PyPy -and the new cpyext is a lot faster than the previous one. +result, lxml (prerelease) with its cython compiled component +`passes all tests`_ on PyPy. The new cpyext is also much faster. vmprof_ has been a go-to profiler for PyPy on linux for a few releases and we're happy to announce that thanks to commercial cooperation, vmprof @@ -128,9 +128,6 @@ * Fix for corner case (likely shown by Krakatau) for consecutive guards with interdependencies - * Fix applevel bare class method comparisons which should fix pretty printing -in IPython - * Issues reported with our previous release were resolved_ after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy diff --git a/rpython/doc/conf.py b/rpython/doc/conf.py --- a/rpython/doc/conf.py +++ b/rpython/doc/conf.py @@ -59,7 +59,7 @@ # General information about the project. project = u'RPython' -copyright = u'2015, The PyPy Project' +copyright = u'2016, The PyPy Project' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -121,7 +121,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -#html_title = None +html_title = 'RPython Documentation' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None diff --git a/rpython/rlib/rvmprof/src/vmprof_getpc.h b/rpython/rlib/rvmprof/src/vmprof_getpc.h --- a/rpython/rlib/rvmprof/src/vmprof_getpc.h +++ b/rpython/rlib/rvmprof/src/vmprof_getpc.h @@ -54,6 +54,7 @@ // It will cause problems for FreeBSD though!, because it turns off // the needed __BSD_VISIBLE. #ifdef __APPLE__ +#include #define _XOPEN_SOURCE 500 #endif @@ -144,7 +145,11 @@ #else intptr_t GetPC(ucontext_t *signal_ucontext) { #ifdef __APPLE__ +#if ((ULONG_MAX) == (UINT_MAX)) + return (signal_ucontext->uc_mcontext->__ss.__eip); +#else return (signal_ucontext->uc_mcontext->__ss.__rip); +#endif #else return signal_ucontext->PC_FROM_UCONTEXT; // defined in config.h #endif diff --git a/rpython/translator/c/src/entrypoint.c b/rpython/translator/c/src/entrypoint.c --- a/rpython/translator/c/src/entrypoint.c +++ b/rpython/translator/c/src/entrypoint.c @@ -37,6 +37,7 @@ # include #endif +RPY_EXPORTED void rpython_startup_code(void) { #ifdef RPY_WITH_GIL diff --git a/rpython/translator/c/test/test_standalone.py b/rpython/translator/c/test/test_standalone.py --- a/rpython/translator/c/test/test_standalone.py +++ b/rpython/translator/c/test/test_standalone.py @@ -81,7 +81,7 @@ # # verify that the executable re-export symbols, but not too many if sys.platform.startswith('linux') and not kwds.get('shared', False): -seen_main = False +seen = set() g = os.popen("objdump -T '%s'" % builder.executable_name, 'r') for line in g: if not line.strip(): @@ -91,8 +91,8 @@ name = line.split()[-1] if name.startswith('__'): continue +seen.add(name) if name == 'main': -seen_main = True continue if name == 'pypy_debug_file': # ok to export this one continue @@ -104,7 +104,9 @@ "declaration of this C function or global variable" % (name,)) g.close() -assert seen_main, "did not see 'main' exported" +# list of symbols that we *want* to be exported: +fo
[pypy-commit] pypy default: typo
Author: mattip Branch: Changeset: r82887:169da91b21a2 Date: 2016-03-08 18:16 +0200 http://bitbucket.org/pypy/pypy/changeset/169da91b21a2/ Log:typo diff --git a/rpython/doc/conf.py b/rpython/doc/conf.py --- a/rpython/doc/conf.py +++ b/rpython/doc/conf.py @@ -121,7 +121,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -html_title = RPython Documentation +html_title = 'RPython Documentation' # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: mention jetbrains
Author: fijal Branch: Changeset: r82890:9c4299dc2d60 Date: 2016-03-08 21:28 +0200 http://bitbucket.org/pypy/pypy/changeset/9c4299dc2d60/ Log:mention jetbrains diff --git a/pypy/doc/release-5.0.0.rst b/pypy/doc/release-5.0.0.rst --- a/pypy/doc/release-5.0.0.rst +++ b/pypy/doc/release-5.0.0.rst @@ -15,8 +15,8 @@ `passes all tests`_ on PyPy. The new cpyext is also much faster. vmprof_ has been a go-to profiler for PyPy on linux for a few releases -and we're happy to announce that thanks to commercial cooperation, vmprof -now works on Linux, OS X and Windows on both PyPy and CPython. +and we're happy to announce that thanks to the cooperation with jetbrains, +vmprof now works on Linux, OS X and Windows on both PyPy and CPython. You can download the PyPy 5.0 release here: ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: disable the warning - it always shows (until we can find a better solution)
Author: fijal Branch: Changeset: r82891:e4cbd702822c Date: 2016-03-08 21:54 +0200 http://bitbucket.org/pypy/pypy/changeset/e4cbd702822c/ Log:disable the warning - it always shows (until we can find a better solution) diff --git a/pypy/module/_vmprof/interp_vmprof.py b/pypy/module/_vmprof/interp_vmprof.py --- a/pypy/module/_vmprof/interp_vmprof.py +++ b/pypy/module/_vmprof/interp_vmprof.py @@ -60,10 +60,10 @@ Must be smaller than 1.0 """ w_modules = space.sys.get('modules') -if space.contains_w(w_modules, space.wrap('_continuation')): -space.warn(space.wrap("Using _continuation/greenlet/stacklet together " - "with vmprof will crash"), - space.w_RuntimeWarning) +#if space.contains_w(w_modules, space.wrap('_continuation')): +#space.warn(space.wrap("Using _continuation/greenlet/stacklet together " +# "with vmprof will crash"), +# space.w_RuntimeWarning) try: rvmprof.enable(fileno, period) except rvmprof.VMProfError, e: ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: Automated merge with ssh://bitbucket.org/pypy/pypy
Author: Tobias Pape Branch: Changeset: r82895:7395989c4270 Date: 2016-03-08 20:58 +0100 http://bitbucket.org/pypy/pypy/changeset/7395989c4270/ Log:Automated merge with ssh://bitbucket.org/pypy/pypy diff --git a/rpython/jit/tool/traceviewer.py b/rpython/jit/tool/traceviewer.py --- a/rpython/jit/tool/traceviewer.py +++ b/rpython/jit/tool/traceviewer.py @@ -103,9 +103,9 @@ self.last_guard = -1 else: # guards can be out of order nowadays -groups = sorted(groups) -self.first_guard = guard_number(groups[0]) -self.last_guard = guard_number(groups[-1]) +groups = sorted(map(guard_number, groups)) +self.first_guard = groups[0] +self.last_guard = groups[-1] content = property(get_content, set_content) ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: revert tiny refactoring to retain reversedness
Author: Tobias Pape Branch: Changeset: r82894:13d96e945b0b Date: 2016-03-08 20:57 +0100 http://bitbucket.org/pypy/pypy/changeset/13d96e945b0b/ Log:revert tiny refactoring to retain reversedness diff --git a/rpython/jit/tool/traceviewer.py b/rpython/jit/tool/traceviewer.py --- a/rpython/jit/tool/traceviewer.py +++ b/rpython/jit/tool/traceviewer.py @@ -156,7 +156,8 @@ dotgen.emit_edge(self.name(), self.right.name()) def split_one_loop(real_loops, guard_s, guard_content, lineno, no, allloops): -for i, loop in enumerate(allloops): +for i in range(len(allloops) - 1, -1, -1): +loop = allloops[i] if no < loop.first_guard or no > loop.last_guard: continue content = loop.content ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: Automated merge with ssh://bitbucket.org/pypy/pypy
Author: Tobias Pape Branch: Changeset: r82893:c49a7c2adcb7 Date: 2016-03-08 20:49 +0100 http://bitbucket.org/pypy/pypy/changeset/c49a7c2adcb7/ Log:Automated merge with ssh://bitbucket.org/pypy/pypy diff --git a/rpython/jit/tool/traceviewer.py b/rpython/jit/tool/traceviewer.py --- a/rpython/jit/tool/traceviewer.py +++ b/rpython/jit/tool/traceviewer.py @@ -103,9 +103,9 @@ self.last_guard = -1 else: # guards can be out of order nowadays -groups = sorted(groups) -self.first_guard = guard_number(groups[0]) -self.last_guard = guard_number(groups[-1]) +groups = sorted(map(guard_number, groups)) +self.first_guard = groups[0] +self.last_guard = groups[-1] content = property(get_content, set_content) @@ -156,8 +156,7 @@ dotgen.emit_edge(self.name(), self.right.name()) def split_one_loop(real_loops, guard_s, guard_content, lineno, no, allloops): -for i in range(len(allloops) - 1, -1, -1): -loop = allloops[i] +for i, loop in enumerate(allloops): if no < loop.first_guard or no > loop.last_guard: continue content = loop.content ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: Fix guard sorting in trace viewer
Author: Tobias Pape Branch: Changeset: r82892:d86a5d5d083f Date: 2016-03-08 20:49 +0100 http://bitbucket.org/pypy/pypy/changeset/d86a5d5d083f/ Log:Fix guard sorting in trace viewer (previously sorted by string order, which does not work for hex) diff --git a/rpython/jit/tool/traceviewer.py b/rpython/jit/tool/traceviewer.py --- a/rpython/jit/tool/traceviewer.py +++ b/rpython/jit/tool/traceviewer.py @@ -103,9 +103,9 @@ self.last_guard = -1 else: # guards can be out of order nowadays -groups = sorted(groups) -self.first_guard = guard_number(groups[0]) -self.last_guard = guard_number(groups[-1]) +groups = sorted(map(guard_number, groups)) +self.first_guard = groups[0] +self.last_guard = groups[-1] content = property(get_content, set_content) @@ -156,8 +156,7 @@ dotgen.emit_edge(self.name(), self.right.name()) def split_one_loop(real_loops, guard_s, guard_content, lineno, no, allloops): -for i in range(len(allloops) - 1, -1, -1): -loop = allloops[i] +for i, loop in enumerate(allloops): if no < loop.first_guard or no > loop.last_guard: continue content = loop.content ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy traceviewer-common-merge-point-formats: (traceviewer) try to parse most common debug_merge_point formarts out there
Author: Tobias Pape Branch: traceviewer-common-merge-point-formats Changeset: r82896:00a68dd7adc9 Date: 2016-03-09 00:53 +0100 http://bitbucket.org/pypy/pypy/changeset/00a68dd7adc9/ Log:(traceviewer) try to parse most common debug_merge_point formarts out there Includes: - PyPy (clearly) - PyPy cffi callbacks - RSqueak - js - pycket - others (hippy, topaz) via fallback diff --git a/rpython/jit/tool/test/test_traceviewer.py b/rpython/jit/tool/test/test_traceviewer.py --- a/rpython/jit/tool/test/test_traceviewer.py +++ b/rpython/jit/tool/test/test_traceviewer.py @@ -1,7 +1,8 @@ import math import py from rpython.jit.tool.traceviewer import splitloops, FinalBlock, Block,\ - split_one_loop, postprocess, main, get_gradient_color, guard_number + split_one_loop, postprocess, main, get_gradient_color, guard_number,\ + find_name_key def test_gradient_color(): @@ -103,3 +104,46 @@ fname = py.path.local(__file__).join('..', 'f.pypylog.bz2') main(str(fname), False, view=False) # assert did not explode + +class TestMergPointStringExtraciton(object): + +def test_find_name_key(self): +def find(s): +return find_name_key(FinalBlock(s, None)) +assert find(r"debug_merge_point(0, 0, ' #63 GET_ITER')") \ +== (r"f5. file 'f.py'. line 34 #63 GET_ITER", r" #63 GET_ITER") +assert find(r"debug_merge_point(0, 0, ' ')") \ +== (r"f5. file 'f.py'. line 34 ", r" ") +assert find(r"debug_merge_point(0, 0, 'cffi_callback ')") \ +== (r"f5. file 'f.py'. line 34 (cffi_callback)", r"cffi_callback ") +assert find(r"debug_merge_point(0, 0, 'cffi_callback ')") \ +== (r"? (cffi_callback)", r"cffi_callback ") +assert find(r"debug_merge_point(0, 0, 'cffi_call_python somestr')") \ +== (r"somestr (cffi_call_python)", r"cffi_call_python somestr") +assert find(r"debug_merge_point(0, 0, '(SequenceableCollection >> #replaceFrom:to:with:startingAt:) [8]: <0x14>pushTemporaryVariableBytecode(4)')") \ +== (r"SequenceableCollection>>#replaceFrom:to:with:startingAt: @ 8 ", r"(SequenceableCollection >> #replaceFrom:to:with:startingAt:) [8]: <0x14>pushTemporaryVariableBytecode(4)") +assert find(r"debug_merge_point(1, 4, '(Magnitude >> #min:max:) [0]: <0x70>pushReceiverBytecode')") \ +== (r"Magnitude>>#min:max: @ 0 ", r"(Magnitude >> #min:max:) [0]: <0x70>pushReceiverBytecode") +assert find(r"debug_merge_point(0, 0, '(#DoIt) [0]: <0x70>pushReceiverBytecode')") \ +== (r"#DoIt @ 0 ", r"(#DoIt) [0]: <0x70>pushReceiverBytecode") + +assert find(r"debug_merge_point(0, 0, '54: LOAD LIST 4')") \ +== (r"? @ 54 ", r"54: LOAD LIST 4") +assert find(r"debug_merge_point(0, 0, '44: LOAD_MEMBER_DOT function: barfoo')") \ +== (r"barfoo @ 44 ", r"44: LOAD_MEMBER_DOT function: barfoo") +assert find(r"debug_merge_point(0, 0, '87: end of opcodes')") \ +== (r"? @ 87 ", r"87: end of opcodes") +assert find(r"debug_merge_point(0, 0, 'Green_Ast is None')") \ +== (r"Green_Ast is None", r"Green_Ast is None") +assert find(r"debug_merge_point(0, 0, 'Label(safe_return_multi_vals:pycket.interpreter:565)')") \ +== (r"Label(safe_return_multi_vals:pycket.interpreter:565)", r"Label(safe_return_multi_vals:pycket.interpreter:565)") +assert find(r"debug_merge_point(0, 0, '(*node2 item AppRand1_289 AppRand2_116)')") \ +== (r"(*node2 item AppRand1_289 AppRand2_116)", r"(*node2 item AppRand1_289 AppRand2_116)") +assert find(r"debug_merge_point(0, 0, '(let ([if_2417 (let ([AppRand0_2026 (* Zr Zr)][AppRand1_1531 (* Zi Zi)]) (let ([AppRand0_2027 (+ AppRand0_2026 AppRand1_1531)]) (> AppRand0_2027 LIMIT-SQR)))]) (if if_2417 0 (let ([if_2416 (= i ITERATIONS)]) (if if_2416 1 (let ([Zr199 (let ([AppRand0_2041 (* Zr Zr)][AppRand1_1540 (* Zi Zi)]) (let ([AppRand0_2042 (- AppRand0_2041 AppRand1_1540)]) (+ AppRand0_2042 Cr)))][Zi206 (let ([AppRand1_1541 (* Zr Zi)]) (let ([AppRand0_2043 (* 2.0 AppRand1_1541)]) (+ AppRand0_2043 Ci)))]) (let ([Zr211 (let ([AppRand0_2038 (* Zr199 Zr199)][AppRand1_1538 (* Zi206 Zi206)]) (let ([AppRand0_2039 (- AppRand0_2038 AppRand1_1538)]) (+ AppRand0_2039 Cr)))][Zi218 (let ([AppRand1_1539 (* Zr199 Zi206)]) (let ([AppRand0_2040 (* 2.0 AppRand1_1539)]) (+ AppRand0_2040 Ci)))]) (let ([Zr223 (let ([AppRand0_2035 (* Zr211 Zr211)][AppRand1_1536 (* Zi218 Zi218)]) (let ([AppRand0_2036 (- AppRand0_2035 AppRand1_1536)]) (+ AppRand0_2036 Cr)))][Zi230 (let ([AppRand1_1537 (* Zr211 Zi218)]) (let ([AppRand0_2037 (* 2.0 AppRand1_1537)]) (+ AppRand0_2037 Ci)))]) (let ([Zr235 (let ([AppRand0_2032 (* Zr223 Zr223)][AppRand1_1534 (* Zi230 Zi230)]) (let ([AppRand0_2033 (- AppRand0_2032 AppRand1_1534)]) (+ AppRand0_2033 Cr)))][Zi242 (let ([
[pypy-commit] pypy.org extradoc: update the values
Author: Armin Rigo Branch: extradoc Changeset: r715:60b977006d8b Date: 2016-03-09 02:54 +0100 http://bitbucket.org/pypy/pypy.org/changeset/60b977006d8b/ Log:update the values diff --git a/don1.html b/don1.html --- a/don1.html +++ b/don1.html @@ -15,7 +15,7 @@ - $63060 of $105000 (60.1%) + $63079 of $105000 (60.1%) @@ -23,7 +23,7 @@ This donation goes towards supporting Python 3 in PyPy. Current status: -we have $8205 left +we have $8222 left in the account. Read proposal ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit