Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: what definition of Istack_sp

by dave_the_m (Monsignor)
on Jan 13, 2019 at 11:26 UTC ( #1228460=note: print w/replies, xml ) Need Help??


in reply to Re^2: what definition of Istack_sp
in thread what definition of Istack_sp

The perl binary has multiple ways in which it can be built. The simplest (and original) model just defines PL_stack_sp directly as a global variable. But when built with MULTIPLICITY (when for example building a threaded perl), then multiple interpreters are allowed, and (within the core), PL_stack_sp is defined as my_perl->Ispack_sp.

However in XS code (rather than in the core), it's more complex. At one point PL_stack_sp was defined as a function call, which would shield the XS code from changes in the interpreter struct layout across differing perl versions - so XS modules wouldn't have be to recompiled for each new perl release. However, this slowed XS code down a lot, and there were other things which also broke binary compatibility, so that was ditched and we just changed the binary guarantee to apply only across minor releases.

Dave.

Replies are listed 'Best First'.
Re^4: what definition of Istack_sp
by xiaoyafeng (Chaplain) on Jan 14, 2019 at 08:14 UTC
    Thanks for your detailed answer! By the way, as your replied on this , 5.30 will add named parameter. I'm curious if it would affect current mechanism of argument stack which you mentioned above?




    I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

      Thanks for your detailed answer! By the way, as your replied on this , 5.30 will add named parameter. I'm curious if it would affect current mechanism of argument stack which you mentioned above?
      That's no longer likely to happen for 5.30: I ran out of time. Named sub parameters will only affect the sub itself, not the caller; and named args will only apply to perl subs, not to XS subs.

      Dave.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1228460]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2019-05-25 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!