Re: [pypy-dev] [pypy-commit] pypy default: I *think* the inputargs should always contain InputArgXxx objects that

It might contain something else than InputArgXxx (because of e.g. not tracing from the start), but indeed the forwarded should be set to None by the time we reach the backend (maybe we forget it too late?) On Mon, Sep 14, 2015 at 7:31 PM, arigo <noreply@buildbot.pypy.org> wrote:
Author: Armin Rigo <arigo@tunes.org> Branch: Changeset: r79638:cfe5d8e88d3d Date: 2015-09-14 19:31 +0200 http://bitbucket.org/pypy/pypy/changeset/cfe5d8e88d3d/
Log: I *think* the inputargs should always contain InputArgXxx objects that are not forwarded. (Hitting the case from test_ll_random)
diff --git a/rpython/jit/backend/x86/regalloc.py b/rpython/jit/backend/x86/regalloc.py --- a/rpython/jit/backend/x86/regalloc.py +++ b/rpython/jit/backend/x86/regalloc.py @@ -134,6 +134,8 @@ self.final_jump_op = None
def _prepare(self, inputargs, operations, allgcrefs): + for box in inputargs: + assert box.get_forwarded() is None cpu = self.assembler.cpu self.fm = X86FrameManager(cpu.get_baseofs_of_frame_field()) operations = cpu.gc_ll_descr.rewrite_assembler(cpu, operations, _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit

Hi Maciej, On Tue, Sep 15, 2015 at 9:11 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
It might contain something else than InputArgXxx (because of e.g. not tracing from the start), but indeed the forwarded should be set to None by the time we reach the backend (maybe we forget it too late?)
No, I think it's only test_random.py that reuses operations from the main loop as fail_args when compiling a bridge, and these operations sometimes already have a get_forwarded() from the main loop's rewrite step. It should not occur outside this test. It took me a while to figure out what was wrong, though :-) A bientôt, Armin.

On Tue, Sep 15, 2015 at 10:49 AM, Armin Rigo <arigo@tunes.org> wrote:
Hi Maciej,
On Tue, Sep 15, 2015 at 9:11 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
It might contain something else than InputArgXxx (because of e.g. not tracing from the start), but indeed the forwarded should be set to None by the time we reach the backend (maybe we forget it too late?)
No, I think it's only test_random.py that reuses operations from the main loop as fail_args when compiling a bridge, and these operations sometimes already have a get_forwarded() from the main loop's rewrite step. It should not occur outside this test. It took me a while to figure out what was wrong, though :-)
A bientôt,
Armin.
Yes, forwarded has this problem that if you forget to clean it, there is a bit of trouble hard to debug :/ not sure what is the solution

Hi Fijal, On Tue, Sep 15, 2015 at 11:25 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
Yes, forwarded has this problem that if you forget to clean it, there is a bit of trouble hard to debug :/ not sure what is the solution
I think it's enough (or will become enough after one or two more such issues) to check in the next step that all operations and inputargs that you receive are not forwarded. That's what I did in this checkin. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Maciej Fijalkowski