develooper Front page | perl.perl5.porters | Postings from March 2023

Re: PERL_RC_STACK branch: first cut

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 23, 2023 16:32
Subject:
Re: PERL_RC_STACK branch: first cut
Message ID:
ZBx/KyAnCZuE762g@iabyn.com
On Sun, Mar 19, 2023 at 05:08:59PM +0000, Zefram via perl5-porters wrote:
> >                     There is not yet an API to allow XS functions to be
> >  written in an RC-aware way.
> 
> Please add such a thing before merging.

I'll certainly add a new CV flag sometime soon to indicate this.
If I don't get time to do it right away, it may come a bit after merging,
since I'll want to merge this branch ASAP after 5.39 is open, due the
increasing difficulty of keeping it synced with blead.

> Eventually we'd want EU:PXS to have some syntax such as "RCPPCODE:"

Yeah. I haven't even begun to consider what the new XS API should look
like yet: I want to get the basic code working and merged first.

> >* Any XS code which includes a custom OP with its own PP function, or
> >   contains a PP function intended to override a core PP function ,won't
> >   work unmodified;.
> 
> As things stand, this kind of code would still compile fine, and just
> screw up the refcounting at runtime.

On debugging builds with DEBUG_LEAKING_SCALARS enabled, PUSHs() etc assert
that they are operating on a !AvREAL() stack (and vice-versa with
rpp_push_1() etc). I'm thinking of making those asserts present on all
PERL_RC_STACK+DEBUGGING builds, without DEBUG_LEAKING_SCALARS being
needed. (Initially I was worried about slowing down debugging builds too
much, but that doesn't seem to have happened).

That should be enough to catch such issues?`

-- 
"I used to be with it, but then they changed what ‘it’ was, and now what
I’m with isn’t it. And what’s ‘it’ seems weird and scary to me."
  -- Grandpa Simpson
(It will happen to you too.)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About