* Ævar Arnfjörð Bjarmason <avarab@gmail.com> [2016-10-12 01:12]: > On Tue, Sep 27, 2016 at 3:47 PM, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote: > > $ perl -MO=Concise -e'Foo->import(1)' > > 8 <@> leave[1 ref] vKP/REFC ->(end) > > 1 <0> enter ->2 > > 2 <;> nextstate(main 1 -e:1) v:{ ->3 > > 7 <1> entersub[t1] vKS/TARG ->8 > > 3 <0> pushmark s ->4 > > 4 <$> const(PV "Foo") sM/BARE ->5 > > 5 <$> const(IV 1) sM ->6 > > 6 <$> method_named(PV "import") ->7 > > -e syntax OK > > > > If I read this right, the arguments are already on the stack by the time > > that Perl_gv_fetchmethod_pvn_flags gets called. > > I tried grepping around but couldn't find this, can you or anyone else > here point out what API I'm supposed to be using in > Perl_gv_fetchmethod_pvn_flags to get at these arguments? I’m not a guts hacker, so maybe I’m guessing+reading this completely wrong, but as far as I can tell, pp_entersub uses `SP - MARK` to find out how many things are on the stack when it goes to populate @_. Question is whether Perl_gv_fetchmethod_pvn_flags can expect to always be called in a context where the stack has been set up for an impending call, or does it also get called otherwise? If the latter, then maybe it’s pp_method_named that needs to look at the stack and pass a flag or something. Or at least my guess is that the op is more likely only used in impending-call contexts. Would be nice if someone who actually knows what they’re talking about could help you out in my stead, though. :-) Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>Thread Previous | Thread Next