[pypy-dev] [pypy-commit] pypy default: investigate mark_opaque_ptr

Hakan Ardo hakan at debian.org
Mon Oct 13 13:10:01 CEST 2014


On Mon, Oct 13, 2014 at 12:24 PM, Armin Rigo <arigo at tunes.org> wrote:
>>
>> Yes as far as I can remember. You have ofcourse the exact same issue
>> with getarrayitem_* and friends...
>
> Ah, indeed.
>
> I'm thinking about a more involved fix, prompted by
> https://bitbucket.org/pypy/pypy/issue/1886 .  Would it work?  The idea
> would be to allow moving the getfield_gc, but in case it was on an
> opaque pointer, add a new "guard_gctype" operation in the short
> preamble.  This is possible (and easy) with our own GCs, but wouldn't
> work with Boehm, so it would be conditional...

Maybe. I cant see why not. If the opaque pointer shows up in the
VirtualState there might be some similar fixes needed there. I.e.
there is probably cases where VirtualState.generate_guards needs to
generate a guard_gctype aswell.

I think the problematic case is actually when mixing with arrays.
There will already be a guard_class protecting the getfiled in the
short preamble, but it crashes when operating on an array. Also, there
is no guard_arraytype. So mixing different types of arrays will crash.
There is logic to generate guards for the arraylen and place those in
short preamble.

>
> PS: you're still using pypy-dev at codespeak.net; I think this address
> stopped working by now.  I fixed it to pypy-dev at python.org.

Sorry (I got no bounce though).

-- 
Håkan Ardö


More information about the pypy-dev mailing list