develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #129916] CV symbol table optimization only works in main::

Thread Previous | Thread Next
Father Chrysostomos via RT
September 24, 2017 21:37
[perl #129916] CV symbol table optimization only works in main::
Message ID:
On Thu, 21 Sep 2017 15:52:42 -0700, atoomic wrote:
> Hi Father Chrysostomos, Todd R. and I checked your branch sprout/cv-
> in-stash and had a look at the issue from the extract from
> t/op/local.t, which is failing.

Thank you.

I forgot to mention that I had already gotten local.t to pass, by passing CV refs straight to save_gp if they occur inside stashes.  I did not touch multideref, though.

> Hope this patch could help, but looks like the OP multideref is not
> calling the Perl_mro_method_changed_in via a regular save_gp call.

Your does still fail for me.  So now I do not know why multideref is not kicking in for me in local.t, whereas it is for you.  So I need to dig into that, since I do not feel comfortably committing a change I cannot test properly.

> We came with this lazy solution (view attached patch) which force to
> upgrade the RV/CV to a GV.

I still need to look into it, but I think your patch forces the upgrade even when localising the entry of a regular hash.  We don’t want this to do save_gp on *baz:

    %foo = (bar => \&baz);
    local $foo{bar};

> As these cases are probably uncommon, I think it's a solution we could
> consider when using local on a CV.

I think it is acceptable to force the upgrade.


Father Chrysostomos

via perlbug:  queue: perl5 status: open

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About