Permalink
Browse files

phase 1 of somewhat major rearrangement of PERL_OBJECT stuff

(objpp.h is gone, embed.pl now does some of that); objXSUB.h
should soon be automated also; the global variables that
escaped the PL_foo conversion are now reined in; renamed
MAGIC in regcomp.h to REG_MAGIC to avoid collision with the
type of same name; duplicated lists of pp_things in various
places is now gone; result has only been tested on win32

p4raw-id: //depot/perl@2133
  • Loading branch information...
1 parent 854e644 commit 22c35a8c2392967a5ba6b5370695be464bd7012c Gurusamy Sarathy committed Oct 30, 1998
Showing with 3,039 additions and 5,269 deletions.
  1. +2 −2 MANIFEST
  2. +6 −3 Makefile.SH
  3. +6 −6 av.c
  4. +1 −1 bytecode.h
  5. +2 −0 byterun.h
  6. +2 −2 cop.h
  7. +4 −4 doio.c
  8. +1 −1 doop.c
  9. +2 −2 dump.c
  10. +1,186 −160 embed.h
  11. +256 −35 embed.pl
  12. +7 −15 embedvar.h
  13. +11 −11 ext/B/B.xs
  14. +0 −2 ext/POSIX/POSIX.xs
  15. +1 −1 ext/Thread/Thread.xs
  16. +15 −506 global.sym
  17. +8 −1,406 globals.c
  18. +68 −0 globvar.sym
  19. +14 −14 gv.c
  20. +1 −1 malloc.c
  21. +26 −26 mg.c
  22. +11 −1 objXSUB.h
  23. +0 −1,611 objpp.h
  24. +102 −98 op.c
  25. +16 −394 opcode.h
  26. +39 −24 opcode.pl
  27. +7 −10 perl.c
  28. +127 −134 perl.h
  29. +3 −5 perl_exp.SH
  30. +1 −5 perlvars.h
  31. +11 −11 perly.c
  32. +1 −1 pod/perlguts.pod
  33. +17 −14 pp.c
  34. +1 −4 pp.h
  35. +344 −0 pp.sym
  36. +11 −11 pp_ctl.c
  37. +14 −14 pp_hot.c
  38. +378 −344 pp_proto.h
  39. +86 −86 pp_sys.c
  40. +10 −43 proto.h
  41. +32 −32 regcomp.c
  42. +6 −6 regcomp.h
  43. +2 −2 regcomp.pl
  44. +4 −4 regcomp.sym
  45. +20 −21 regexec.c
  46. +10 −10 regnodes.h
  47. +8 −11 run.c
  48. +3 −3 scope.c
  49. +54 −58 sv.c
  50. +9 −2 t/op/filetest.t
  51. +2 −0 taint.c
  52. +4 −1 thrdvar.h
  53. +0 −1 thread.sym
  54. +7 −9 toke.c
  55. +23 −40 util.c
  56. +2 −2 win32/Makefile
  57. +2 −1 win32/config.bc
  58. +2 −1 win32/config.gc
  59. +2 −1 win32/config.vc
  60. +5 −5 win32/config_H.bc
  61. +6 −6 win32/config_H.gc
  62. +5 −5 win32/config_H.vc
  63. +21 −30 win32/makedef.pl
  64. +6 −4 win32/makefile.mk
  65. +6 −6 win32/perlhost.h
View
@@ -346,6 +346,7 @@ fakethr.h Fake threads header
form.h Public declarations for the above
global.sym Symbols that need hiding when embedded
globals.c File to declare global symbols (for shared library)
+globvar.sym Global variables that need hiding when embedded
gv.c Glob value code
gv.h Glob value header
h2pl/README How to turn .ph files into .pl files
@@ -777,7 +778,6 @@ mpeix/relink MPE/iX port
mv-if-diff Script to mv a file if it changed
myconfig Prints summary of the current configuration
nostdio.h Cause compile error on stdio calls
-objpp.h Scoping macros for Perl Object
op.c Opcode syntax tree code
op.h Opcode syntax tree header
opcode.h Automatically generated opcode header
@@ -920,6 +920,7 @@ pod/splitman Splits perlfunc into multiple man pages
pod/splitpod Splits perlfunc into multiple pod pages
pp.c Push/Pop code
pp.h Push/Pop code defs
+pp.sym Push/Pop code symbols
pp_ctl.c Push/Pop code for control flow
pp_hot.c Push/Pop code for heavily used opcodes
pp_proto.h C++ definitions for Push/Pop code
@@ -1165,7 +1166,6 @@ t/pragma/warning.t See if warning controls work
taint.c Tainting code
thrdvar.h Per-thread variables
thread.h Threading header
-thread.sym Symbols for threads
toke.c The tokener
universal.c The default UNIVERSAL package methods
unixish.h Defines that are assumed on Unix
View
@@ -451,14 +451,17 @@ perly.h: perly.y
# No compat3.sym here since and including the 5.004_50.
# No interp.sym since 5.005_03.
-SYM = global.sym perlio.sym thread.sym
+SYM = global.sym globvar.sym perlio.sym pp.sym
-SYMH = perlvars.h thrdvar.h
+SYMH = perlvars.h intrpvar.h thrdvar.h
# The following files are generated automatically
# keywords.h: keywords.pl
# opcode.h: opcode.pl
-# embed.h: embed.pl global.sym interp.sym
+# pp_proto.h: opcode.pl
+# pp.sym: opcode.pl
+# embed.h: embed.pl [* needs pp.sym generated by opcode.pl! *]
+# embedvar.h: embed.pl [* needs pp.sym generated by opcode.pl! *]
# byterun.h: bytecode.pl
# byterun.c: bytecode.pl
# lib/B/Asmdata.pm: bytecode.pl
View
12 av.c
@@ -217,7 +217,7 @@ av_store(register AV *av, I32 key, SV *val)
}
if (SvREADONLY(av) && key >= AvFILL(av))
- croak(no_modify);
+ croak(PL_no_modify);
if (SvRMAGICAL(av)) {
if (mg_find((SV*)av,'P')) {
@@ -336,7 +336,7 @@ av_clear(register AV *av)
/*SUPPRESS 560*/
if (SvREADONLY(av))
- croak(no_modify);
+ croak(PL_no_modify);
/* Give any tie a chance to cleanup first */
if (SvRMAGICAL(av))
@@ -396,7 +396,7 @@ av_push(register AV *av, SV *val)
if (!av)
return;
if (SvREADONLY(av))
- croak(no_modify);
+ croak(PL_no_modify);
if (mg = SvTIED_mg((SV*)av, 'P')) {
dSP;
@@ -424,7 +424,7 @@ av_pop(register AV *av)
if (!av || AvFILL(av) < 0)
return &PL_sv_undef;
if (SvREADONLY(av))
- croak(no_modify);
+ croak(PL_no_modify);
if (mg = SvTIED_mg((SV*)av, 'P')) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
@@ -458,7 +458,7 @@ av_unshift(register AV *av, register I32 num)
if (!av || num <= 0)
return;
if (SvREADONLY(av))
- croak(no_modify);
+ croak(PL_no_modify);
if (mg = SvTIED_mg((SV*)av, 'P')) {
dSP;
@@ -510,7 +510,7 @@ av_shift(register AV *av)
if (!av || AvFILL(av) < 0)
return &PL_sv_undef;
if (SvREADONLY(av))
- croak(no_modify);
+ croak(PL_no_modify);
if (mg = SvTIED_mg((SV*)av, 'P')) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
View
@@ -151,7 +151,7 @@ typedef IV IV64;
o->op_type = arg; \
if (arg == OP_MAPSTART) \
arg = OP_GREPSTART; \
- o->op_ppaddr = ppaddr[arg]; \
+ o->op_ppaddr = PL_ppaddr[arg]; \
} STMT_END
#define BSET_op_ppaddr(o, arg) croak("op_ppaddr not yet implemented")
#define BSET_curpad(pad, arg) pad = AvARRAY(arg)
View
@@ -17,7 +17,9 @@ struct bytestream {
};
#endif /* INDIRECT_BGET_MACROS */
+#ifndef PERL_OBJECT
void *bset_obj_store _((void *, I32));
+#endif
enum {
INSN_RET, /* 0 */
View
4 cop.h
@@ -187,7 +187,7 @@ struct block {
cx->blk_oldpm = PL_curpm, \
cx->blk_gimme = gimme; \
DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Entering block %ld, type %s\n", \
- (long)cxstack_ix, block_type[t]); )
+ (long)cxstack_ix, PL_block_type[t]); )
/* Exit a block (RETURN and LAST). */
#define POPBLOCK(cx,pm) cx = &cxstack[cxstack_ix--], \
@@ -199,7 +199,7 @@ struct block {
pm = cx->blk_oldpm, \
gimme = cx->blk_gimme; \
DEBUG_l( PerlIO_printf(PerlIO_stderr(), "Leaving block %ld, type %s\n", \
- (long)cxstack_ix+1,block_type[CxTYPE(cx)]); )
+ (long)cxstack_ix+1,PL_block_type[CxTYPE(cx)]); )
/* Continue a block elsewhere (NEXT and REDO). */
#define TOPBLOCK(cx) cx = &cxstack[cxstack_ix], \
View
8 doio.c
@@ -306,7 +306,7 @@ do_open(GV *gv, register char *name, I32 len, int as_raw, int rawmode, int rawpe
if (!fp) {
dTHR;
if (ckWARN(WARN_NEWLINE) && IoTYPE(io) == '<' && strchr(name, '\n'))
- warner(WARN_NEWLINE, warn_nl, "open");
+ warner(WARN_NEWLINE, PL_warn_nl, "open");
goto say_false;
}
if (IoTYPE(io) &&
@@ -889,7 +889,7 @@ do_print(register SV *sv, PerlIO *fp)
{
dTHR;
if (ckWARN(WARN_UNINITIALIZED))
- warner(WARN_UNINITIALIZED, warn_uninit);
+ warner(WARN_UNINITIALIZED, PL_warn_uninit);
}
return TRUE;
case SVt_IV:
@@ -957,7 +957,7 @@ my_stat(ARGSproto)
PL_laststype = OP_STAT;
PL_laststatval = PerlLIO_stat(s, &PL_statcache);
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(s, '\n'))
- warner(WARN_NEWLINE, warn_nl, "stat");
+ warner(WARN_NEWLINE, PL_warn_nl, "stat");
return PL_laststatval;
}
}
@@ -988,7 +988,7 @@ my_lstat(ARGSproto)
PL_laststatval = PerlLIO_stat(SvPV(sv, PL_na),&PL_statcache);
#endif
if (PL_laststatval < 0 && ckWARN(WARN_NEWLINE) && strchr(SvPV(sv, PL_na), '\n'))
- warner(WARN_NEWLINE, warn_nl, "lstat");
+ warner(WARN_NEWLINE, PL_warn_nl, "lstat");
return PL_laststatval;
}
View
2 doop.c
@@ -597,7 +597,7 @@ do_trans(SV *sv)
STRLEN len;
if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL))
- croak(no_modify);
+ croak(PL_no_modify);
(void)SvPV(sv, len);
if (!len)
View
4 dump.c
@@ -110,7 +110,7 @@ dump_op(OP *o)
PerlIO_printf(Perl_debug_log, "%-4d", o->op_seq);
else
PerlIO_printf(Perl_debug_log, " ");
- dump("TYPE = %s ===> ", op_name[o->op_type]);
+ dump("TYPE = %s ===> ", PL_op_name[o->op_type]);
if (o->op_next) {
if (o->op_seq)
PerlIO_printf(Perl_debug_log, "%d\n", o->op_next->op_seq);
@@ -122,7 +122,7 @@ dump_op(OP *o)
PL_dumplvl++;
if (o->op_targ) {
if (o->op_type == OP_NULL)
- dump(" (was %s)\n", op_name[o->op_targ]);
+ dump(" (was %s)\n", PL_op_name[o->op_targ]);
else
dump("TARG = %d\n", o->op_targ);
}
Oops, something went wrong.

0 comments on commit 22c35a8

Please sign in to comment.