This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c:S_incline: avoid vivifying GV under threads
authorFather Chrysostomos <sprout@cpan.org>
Sat, 10 Aug 2013 01:00:22 +0000 (18:00 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 10 Aug 2013 02:44:13 +0000 (19:44 -0700)
commitd36ee5be0c1466cc557c9d9f328896dc96483962
tree17d6c2b4b02e40a1ccc90982caed1f4b47e385b2
parent1dc74fdba201402174cfbd293adc42f5a0bafc22
toke.c:S_incline: avoid vivifying GV under threads

Since c82ecf346 has been reverted by the previous commit, under
threads we are back to storing the name of the current file in the
cop, rather than a pointer to the GV.  This means the GV may not even
have been created, so CopFILEGV will autovivify it.  We can avoid
autovivifying it in those cases where we are not going to be copying
the lines anyway, which S_incline only does for string eval (when it
sees a #line directive).  Even if the GV already exists, this makes
the check faster, as we no longer have to look it up by name when
parsing a file.
toke.c