Re: [pypy-dev] [pypy-commit] pypy default: Hack to ensure that ll_arraycopy gets a proper effectinfo.write_descrs_arrays

Hi, is there a better way to fix this? The same kind of issue might arise elsewhere?
-- Håkan Ardö

On Fri, Sep 30, 2011 at 6:15 PM, Hakan Ardo <hakan@debian.org> wrote:
Hi, is there a better way to fix this? The same kind of issue might arise elsewhere?
Make sure that raw_memcopy has the correct effect on analyzer?

On Fri, Sep 30, 2011 at 11:17 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
What effect would that be? Setting extraeffect=EF_RANDOM_EFFECTS as it can write anywhere? Can I then somehow give ll_arraycopy a more restrictive effectinfo? -- Håkan Ardö

On Sat, Oct 1, 2011 at 1:27 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
Yes that improves the hack. However it still makes me concerned about any other (potential future) usages of raw_memcopy. Wont they have the same issue? How about we set extraeffect=EF_RANDOM_EFFECTS in the effectinfo of raw_memcopy and introduces a decorator that would allow us to lessen the effect inhertited by a function calling it. Something like: def raw_memcopy_effect_in_arraycopy(source, dest, source_start, dest_start, length): dest[dest_start] = source[source_start] @replace_inherited_effect_of(raw_memcopy, with=raw_memcopy_effect_in_arraycopy) def ll_arraycopy(source, dest, source_start, dest_start, length): ... raw_memcopy(...) -- Håkan Ardö

On Fri, Sep 30, 2011 at 6:15 PM, Hakan Ardo <hakan@debian.org> wrote:
Hi, is there a better way to fix this? The same kind of issue might arise elsewhere?
Make sure that raw_memcopy has the correct effect on analyzer?

On Fri, Sep 30, 2011 at 11:17 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
What effect would that be? Setting extraeffect=EF_RANDOM_EFFECTS as it can write anywhere? Can I then somehow give ll_arraycopy a more restrictive effectinfo? -- Håkan Ardö

On Sat, Oct 1, 2011 at 1:27 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
Yes that improves the hack. However it still makes me concerned about any other (potential future) usages of raw_memcopy. Wont they have the same issue? How about we set extraeffect=EF_RANDOM_EFFECTS in the effectinfo of raw_memcopy and introduces a decorator that would allow us to lessen the effect inhertited by a function calling it. Something like: def raw_memcopy_effect_in_arraycopy(source, dest, source_start, dest_start, length): dest[dest_start] = source[source_start] @replace_inherited_effect_of(raw_memcopy, with=raw_memcopy_effect_in_arraycopy) def ll_arraycopy(source, dest, source_start, dest_start, length): ... raw_memcopy(...) -- Håkan Ardö
participants (2)
-
Hakan Ardo
-
Maciej Fijalkowski