summaryrefslogtreecommitdiff
path: root/embedvar.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-09 18:03:01 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-09 18:03:01 +0000
commitcea2e8a9dd23747fd2b66edc86c58c64e9970321 (patch)
tree50e1ad203239e885681b4e804c46363e763ca432 /embedvar.h
parentf019efd000a9017df645fb6c4cce1e7401ac9445 (diff)
downloadperl-cea2e8a9dd23747fd2b66edc86c58c64e9970321.tar.gz
more complete support for implicit thread/interpreter pointer,
enabled via -DPERL_IMPLICIT_CONTEXT (all changes are noops without that enabled): - USE_THREADS now enables PERL_IMPLICIT_CONTEXT, so dTHR is a noop; tests pass on Solaris; should be faster now! - MULTIPLICITY has been tested with and without PERL_IMPLICIT_CONTEXT on Solaris - improved function database now merged with embed.pl - everything except the varargs functions have foo(a,b,c) macros to provide compatibility - varargs functions default to compatibility variants that get the context pointer using dTHX - there should be almost no source compatibility issues as a result of all this - dl_foo.xs changes other than dl_dlopen.xs untested - still needs documentation, fixups for win32 etc Next step: migrate most non-mutex variables from perlvars.h to intrpvar.h p4raw-id: //depot/perl@3524
Diffstat (limited to 'embedvar.h')
-rw-r--r--embedvar.h134
1 files changed, 133 insertions, 1 deletions
diff --git a/embedvar.h b/embedvar.h
index f9bd01166c..ed529ad515 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -1,5 +1,5 @@
/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- This file is built by embed.pl from global.sym, pp.sym, intrpvar.h,
+ This file is built by embed.pl from data in embed.pl, pp.sym, intrpvar.h,
perlvars.h and thrdvar.h. Any changes made here will be lost!
*/
@@ -12,6 +12,137 @@
#ifndef USE_THREADS
/* If we do not have threads then per-thread vars are per-interpreter */
+#ifdef PERL_IMPLICIT_CONTEXT
+
+/* everything has an implicit context pointer */
+
+#define PL_Sv (my_perl->TSv)
+#define PL_Xpv (my_perl->TXpv)
+#define PL_av_fetch_sv (my_perl->Tav_fetch_sv)
+#define PL_bodytarget (my_perl->Tbodytarget)
+#define PL_bostr (my_perl->Tbostr)
+#define PL_chopset (my_perl->Tchopset)
+#define PL_colors (my_perl->Tcolors)
+#define PL_colorset (my_perl->Tcolorset)
+#define PL_curcop (my_perl->Tcurcop)
+#define PL_curpad (my_perl->Tcurpad)
+#define PL_curpm (my_perl->Tcurpm)
+#define PL_curstack (my_perl->Tcurstack)
+#define PL_curstackinfo (my_perl->Tcurstackinfo)
+#define PL_curstash (my_perl->Tcurstash)
+#define PL_defoutgv (my_perl->Tdefoutgv)
+#define PL_defstash (my_perl->Tdefstash)
+#define PL_delaymagic (my_perl->Tdelaymagic)
+#define PL_dirty (my_perl->Tdirty)
+#define PL_dumpindent (my_perl->Tdumpindent)
+#define PL_extralen (my_perl->Textralen)
+#define PL_firstgv (my_perl->Tfirstgv)
+#define PL_formtarget (my_perl->Tformtarget)
+#define PL_hv_fetch_ent_mh (my_perl->Thv_fetch_ent_mh)
+#define PL_hv_fetch_sv (my_perl->Thv_fetch_sv)
+#define PL_in_eval (my_perl->Tin_eval)
+#define PL_last_in_gv (my_perl->Tlast_in_gv)
+#define PL_lastgotoprobe (my_perl->Tlastgotoprobe)
+#define PL_lastscream (my_perl->Tlastscream)
+#define PL_localizing (my_perl->Tlocalizing)
+#define PL_mainstack (my_perl->Tmainstack)
+#define PL_markstack (my_perl->Tmarkstack)
+#define PL_markstack_max (my_perl->Tmarkstack_max)
+#define PL_markstack_ptr (my_perl->Tmarkstack_ptr)
+#define PL_maxscream (my_perl->Tmaxscream)
+#define PL_modcount (my_perl->Tmodcount)
+#define PL_na (my_perl->Tna)
+#define PL_nrs (my_perl->Tnrs)
+#define PL_ofs (my_perl->Tofs)
+#define PL_ofslen (my_perl->Tofslen)
+#define PL_op (my_perl->Top)
+#define PL_opsave (my_perl->Topsave)
+#define PL_protect (my_perl->Tprotect)
+#define PL_reg_call_cc (my_perl->Treg_call_cc)
+#define PL_reg_curpm (my_perl->Treg_curpm)
+#define PL_reg_eval_set (my_perl->Treg_eval_set)
+#define PL_reg_flags (my_perl->Treg_flags)
+#define PL_reg_ganch (my_perl->Treg_ganch)
+#define PL_reg_magic (my_perl->Treg_magic)
+#define PL_reg_oldcurpm (my_perl->Treg_oldcurpm)
+#define PL_reg_oldpos (my_perl->Treg_oldpos)
+#define PL_reg_oldsaved (my_perl->Treg_oldsaved)
+#define PL_reg_oldsavedlen (my_perl->Treg_oldsavedlen)
+#define PL_reg_re (my_perl->Treg_re)
+#define PL_reg_start_tmp (my_perl->Treg_start_tmp)
+#define PL_reg_start_tmpl (my_perl->Treg_start_tmpl)
+#define PL_reg_starttry (my_perl->Treg_starttry)
+#define PL_reg_sv (my_perl->Treg_sv)
+#define PL_regbol (my_perl->Tregbol)
+#define PL_regcc (my_perl->Tregcc)
+#define PL_regcode (my_perl->Tregcode)
+#define PL_regcomp_parse (my_perl->Tregcomp_parse)
+#define PL_regcomp_rx (my_perl->Tregcomp_rx)
+#define PL_regcompp (my_perl->Tregcompp)
+#define PL_regdata (my_perl->Tregdata)
+#define PL_regdummy (my_perl->Tregdummy)
+#define PL_regendp (my_perl->Tregendp)
+#define PL_regeol (my_perl->Tregeol)
+#define PL_regexecp (my_perl->Tregexecp)
+#define PL_regflags (my_perl->Tregflags)
+#define PL_regindent (my_perl->Tregindent)
+#define PL_reginput (my_perl->Treginput)
+#define PL_reginterp_cnt (my_perl->Treginterp_cnt)
+#define PL_reglastparen (my_perl->Treglastparen)
+#define PL_regnarrate (my_perl->Tregnarrate)
+#define PL_regnaughty (my_perl->Tregnaughty)
+#define PL_regnpar (my_perl->Tregnpar)
+#define PL_regprecomp (my_perl->Tregprecomp)
+#define PL_regprev (my_perl->Tregprev)
+#define PL_regprogram (my_perl->Tregprogram)
+#define PL_regsawback (my_perl->Tregsawback)
+#define PL_regseen (my_perl->Tregseen)
+#define PL_regsize (my_perl->Tregsize)
+#define PL_regstartp (my_perl->Tregstartp)
+#define PL_regtill (my_perl->Tregtill)
+#define PL_regxend (my_perl->Tregxend)
+#define PL_restartop (my_perl->Trestartop)
+#define PL_retstack (my_perl->Tretstack)
+#define PL_retstack_ix (my_perl->Tretstack_ix)
+#define PL_retstack_max (my_perl->Tretstack_max)
+#define PL_rs (my_perl->Trs)
+#define PL_savestack (my_perl->Tsavestack)
+#define PL_savestack_ix (my_perl->Tsavestack_ix)
+#define PL_savestack_max (my_perl->Tsavestack_max)
+#define PL_scopestack (my_perl->Tscopestack)
+#define PL_scopestack_ix (my_perl->Tscopestack_ix)
+#define PL_scopestack_max (my_perl->Tscopestack_max)
+#define PL_screamfirst (my_perl->Tscreamfirst)
+#define PL_screamnext (my_perl->Tscreamnext)
+#define PL_secondgv (my_perl->Tsecondgv)
+#define PL_seen_evals (my_perl->Tseen_evals)
+#define PL_seen_zerolen (my_perl->Tseen_zerolen)
+#define PL_sortcop (my_perl->Tsortcop)
+#define PL_sortcxix (my_perl->Tsortcxix)
+#define PL_sortstash (my_perl->Tsortstash)
+#define PL_stack_base (my_perl->Tstack_base)
+#define PL_stack_max (my_perl->Tstack_max)
+#define PL_stack_sp (my_perl->Tstack_sp)
+#define PL_start_env (my_perl->Tstart_env)
+#define PL_statbuf (my_perl->Tstatbuf)
+#define PL_statcache (my_perl->Tstatcache)
+#define PL_statgv (my_perl->Tstatgv)
+#define PL_statname (my_perl->Tstatname)
+#define PL_tainted (my_perl->Ttainted)
+#define PL_timesbuf (my_perl->Ttimesbuf)
+#define PL_tmps_floor (my_perl->Ttmps_floor)
+#define PL_tmps_ix (my_perl->Ttmps_ix)
+#define PL_tmps_max (my_perl->Ttmps_max)
+#define PL_tmps_stack (my_perl->Ttmps_stack)
+#define PL_top_env (my_perl->Ttop_env)
+#define PL_toptarget (my_perl->Ttoptarget)
+#define PL_watchaddr (my_perl->Twatchaddr)
+#define PL_watchok (my_perl->Twatchok)
+
+#else /* !PERL_IMPLICIT_CONTEXT */
+
+/* traditional MULTIPLICITY (intepreter is in a global) */
+
#define PL_Sv (PL_curinterp->TSv)
#define PL_Xpv (PL_curinterp->TXpv)
#define PL_av_fetch_sv (PL_curinterp->Tav_fetch_sv)
@@ -135,6 +266,7 @@
#define PL_watchaddr (PL_curinterp->Twatchaddr)
#define PL_watchok (PL_curinterp->Twatchok)
+#endif /* !PERL_IMPLICIT_CONTEXT */
#endif /* !USE_THREADS */
/* These are always per-interpreter if there is more than one */