Skip to content

Commit

Permalink
phase 1 of somewhat major rearrangement of PERL_OBJECT stuff
Browse files Browse the repository at this point in the history
(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
Gurusamy Sarathy committed Oct 30, 1998
1 parent 854e644 commit 22c35a8
Show file tree
Hide file tree
Showing 65 changed files with 3,039 additions and 5,269 deletions.
4 changes: 2 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions av.c
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion bytecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions byterun.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ struct bytestream {
};
#endif /* INDIRECT_BGET_MACROS */

#ifndef PERL_OBJECT
void *bset_obj_store _((void *, I32));
#endif

enum {
INSN_RET, /* 0 */
Expand Down
4 changes: 2 additions & 2 deletions cop.h
Original file line number Diff line number Diff line change
Expand Up @@ -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--], \
Expand All @@ -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], \
Expand Down
8 changes: 4 additions & 4 deletions doio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion doop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down
Loading

0 comments on commit 22c35a8

Please sign in to comment.