summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2007-05-21 21:02:50 +0000
committerDave Mitchell <davem@fdisolutions.com>2007-05-21 21:02:50 +0000
commit670a9cb260d5f37076650f3eb5aa6c305796b0f7 (patch)
treeb046c644553ddb33cff4c97acbf31e31461fdc15
parent8d8376c624c0059bc9da5e4cfa799a20c1846647 (diff)
downloadperl-670a9cb260d5f37076650f3eb5aa6c305796b0f7.tar.gz
move PL_multi_end into the PL_parser struct
p4raw-id: //depot/perl@31254
-rw-r--r--embedvar.h2
-rw-r--r--intrpvar.h2
-rw-r--r--op.c4
-rw-r--r--parser.h2
-rw-r--r--perlapi.h2
-rw-r--r--sv.c3
-rw-r--r--toke.c1
7 files changed, 6 insertions, 10 deletions
diff --git a/embedvar.h b/embedvar.h
index 1272bfcf2b..b02de5e06d 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -206,7 +206,6 @@
#define PL_minus_p (vTHX->Iminus_p)
#define PL_modcount (vTHX->Imodcount)
#define PL_modglobal (vTHX->Imodglobal)
-#define PL_multi_end (vTHX->Imulti_end)
#define PL_my_cxt_keys (vTHX->Imy_cxt_keys)
#define PL_my_cxt_list (vTHX->Imy_cxt_list)
#define PL_my_cxt_size (vTHX->Imy_cxt_size)
@@ -527,7 +526,6 @@
#define PL_Iminus_p PL_minus_p
#define PL_Imodcount PL_modcount
#define PL_Imodglobal PL_modglobal
-#define PL_Imulti_end PL_multi_end
#define PL_Imy_cxt_keys PL_my_cxt_keys
#define PL_Imy_cxt_list PL_my_cxt_list
#define PL_Imy_cxt_size PL_my_cxt_size
diff --git a/intrpvar.h b/intrpvar.h
index 77e455fcfd..20e1c97900 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -655,8 +655,6 @@ PERLVARI(Irehash_seed, UV, 0) /* 582 hash initializer */
PERLVARI(Idumper_fd, int, -1)
#endif
-PERLVAR(Imulti_end, I32) /* last line of multi-line string */
-
#ifdef PERL_IMPLICIT_CONTEXT
PERLVARI(Imy_cxt_size, int, 0) /* size of PL_my_cxt_list */
PERLVARI(Imy_cxt_list, void **, NULL) /* per-module array of MY_CXT pointers */
diff --git a/op.c b/op.c
index ba5e200a6a..5445e31d16 100644
--- a/op.c
+++ b/op.c
@@ -3494,8 +3494,8 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg)
OP *curop;
if (pm->op_pmflags & PMf_EVAL) {
curop = NULL;
- if (CopLINE(PL_curcop) < (line_t)PL_multi_end)
- CopLINE_set(PL_curcop, (line_t)PL_multi_end);
+ if (CopLINE(PL_curcop) < (line_t)PL_parser->multi_end)
+ CopLINE_set(PL_curcop, (line_t)PL_parser->multi_end);
}
else if (repl->op_type == OP_CONST)
curop = repl;
diff --git a/parser.h b/parser.h
index 271d35a20b..7e42c8041a 100644
--- a/parser.h
+++ b/parser.h
@@ -55,10 +55,12 @@ typedef struct yy_parser {
I32 lex_starts; /* how many interps done on level */
SV *lex_stuff; /* runtime pattern from m// or s/// */
I32 multi_start; /* 1st line of multi-line string */
+ I32 multi_end; /* last line of multi-line string */
char multi_open; /* delimiter of said string */
char multi_close; /* delimiter of said string */
char pending_ident; /* pending identifier lookup */
bool preambled;
+ /* XXX I32 space */
SUBLEXINFO sublex_info;
SV *linestr; /* current chunk of src text */
char *bufptr;
diff --git a/perlapi.h b/perlapi.h
index a45571c349..4585f5ed54 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -448,8 +448,6 @@ END_EXTERN_C
#define PL_modcount (*Perl_Imodcount_ptr(aTHX))
#undef PL_modglobal
#define PL_modglobal (*Perl_Imodglobal_ptr(aTHX))
-#undef PL_multi_end
-#define PL_multi_end (*Perl_Imulti_end_ptr(aTHX))
#undef PL_my_cxt_keys
#define PL_my_cxt_keys (*Perl_Imy_cxt_keys_ptr(aTHX))
#undef PL_my_cxt_list
diff --git a/sv.c b/sv.c
index c614632bf2..d1d67028e3 100644
--- a/sv.c
+++ b/sv.c
@@ -9572,6 +9572,7 @@ Perl_parser_dup(pTHX_ const yy_parser *proto, CLONE_PARAMS* param)
parser->multi_close = proto->multi_close;
parser->multi_open = proto->multi_open;
parser->multi_start = proto->multi_start;
+ parser->multi_end = proto->multi_end;
parser->pending_ident = proto->pending_ident;
parser->preambled = proto->preambled;
parser->sublex_info = proto->sublex_info; /* XXX not quite right */
@@ -11266,8 +11267,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_parser = parser_dup(proto_perl->Iparser, param);
- PL_multi_end = proto_perl->Imulti_end;
-
PL_error_count = proto_perl->Ierror_count;
PL_subline = proto_perl->Isubline;
PL_subname = sv_dup_inc(proto_perl->Isubname, param);
diff --git a/toke.c b/toke.c
index ef1c6a50ce..f59372bc64 100644
--- a/toke.c
+++ b/toke.c
@@ -66,6 +66,7 @@
#define PL_in_my (PL_parser->in_my)
#define PL_in_my_stash (PL_parser->in_my_stash)
#define PL_tokenbuf (PL_parser->tokenbuf)
+#define PL_multi_end (PL_parser->multi_end)
#ifdef PERL_MAD
# define PL_endwhite (PL_parser->endwhite)