Permalink
Browse files

move PL_multi_end into the PL_parser struct

p4raw-id: //depot/perl@31254
  • Loading branch information...
Dave Mitchell
Dave Mitchell committed May 21, 2007
1 parent 8d8376c commit 670a9cb260d5f37076650f3eb5aa6c305796b0f7
Showing with 6 additions and 10 deletions.
  1. +0 −2 embedvar.h
  2. +0 −2 intrpvar.h
  3. +2 −2 op.c
  4. +2 −0 parser.h
  5. +0 −2 perlapi.h
  6. +1 −2 sv.c
  7. +1 −0 toke.c
View
@@ -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
View
@@ -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 */
View
4 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;
View
@@ -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;
View
@@ -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
View
3 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);
View
1 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)

0 comments on commit 670a9cb

Please sign in to comment.