diff options
author | Andy Lester <andy@petdance.com> | 2005-05-24 06:41:15 -0500 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-09-11 20:36:26 +0000 |
commit | 2a8de9e2b072198ab95fe172c035a7dd126f22d8 (patch) | |
tree | 2f846acdbea25d2c54565307284fefdced7b4282 /toke.c | |
parent | 302d52ba2bcdbaa1b0bd8d045c2a054a3cfb8604 (diff) | |
download | perl-2a8de9e2b072198ab95fe172c035a7dd126f22d8.tar.gz |
Integrate:
[ 24228]
Avoid taking a reference to SvIVX and putting that address on the
save stack
[ 24241]
Refactor the odd-one-out code before a Renew(SvPVX(...)...)
[ 24344]
Calling sv_backoff() on something that's about to be free()d will
memmov() memory that's about to be freed. Seems wasteful.
[ 24357]
Explode if anyone attempts to sv_upgrade PL_mess_sv.
Should this be a panic: ?
[ 24373]
PL_mess_sv is always >= SVt_PVMG, so no need for an if() test
[ 24418]
The idea is that when you find something, you stop looking.
( http://use.perl.org/comments.pl?sid=26369&cid=40183 )
[ 24419]
There's no need to set a reference count for the new SV heads, as it's
always set to 1 at uprooting time.
But set it to zero when DEBUGGING to make things clearer. Plus fix a
bug introduced by change 22945, where the last SV head had an
uninitialised reference count.
[ 24423]
Simplify S_hv_notallowed slightly by passing a prebuilt message
template. (Also slightly smaller object code)
[ 24438]
As we have the length of the string easily to hand, no reason not to
use it.
[ 24439]
s/sv_setpv(sv,"")/sv_setpvn(sv,"",0)/
plus a couple of 1 byte sv_setpv()s too.
[ 24626]
Subject: [PATCH] Teeny optimization in S_hv_magic_check
Date: Tue, 24 May 2005 11:41:15 -0500
Message-ID: <20050524164115.GA12027@petdance.com>
[ 24638]
Change the logic to avoid needing to set a variable during the loop
[ 24646]
Avoid updating a variable in the loop
[ 24648]
Avoid updating a variable in a loop.
Only calculate the number of links in a hash bucket chain if we really
need it.
[ 24669]
Subject: [PATCH] use lengths in sv_setpv() calls
From: Andy Lester <andy@petdance.com>
Date: Wed, 1 Jun 2005 23:16:56 -0500
Message-ID: <20050602041656.GA3000@petdance.com>
p4raw-link: @24669 on //depot/perl: 616d8c9c7dee8ffe0d25891708d3380cabc2db84
p4raw-link: @24648 on //depot/perl: 0298d7b92741692bcf2e34c418a564332bb034e6
p4raw-link: @24646 on //depot/perl: 9e720f71ce602dbb0ba425fccdc5b863b0188ec2
p4raw-link: @24638 on //depot/perl: 45d1cc86c04096be7208350f66eaf64f4ab1d6a1
p4raw-link: @24626 on //depot/perl: 4ab2a30b7819ac6edb69c69e044edaf44dd8119f
p4raw-link: @24439 on //depot/perl: c69006e4a4556d3b1d6e1a57c49a95b1d16efeb0
p4raw-link: @24438 on //depot/perl: ea6e9374082ba65411b39d56a62387c8a2bd2879
p4raw-link: @24423 on //depot/perl: c8cd64651f654f22b1bfc6e04141770a129de64d
p4raw-link: @24419 on //depot/perl: 03e367892efb7218f1a5ccab257a8ceaf34be0f3
p4raw-link: @24418 on //depot/perl: c0ff570e2e94389172145aa89c5c3840c2355167
p4raw-link: @24373 on //depot/perl: f350b448ae021c71a4662e0a5bb0b3454004be98
p4raw-link: @24357 on //depot/perl: 0ec50a73a7a3c090cf7ebd194989882969e47823
p4raw-link: @24344 on //depot/perl: 5228ca4e093950c8cd059c706dfbce052f74fa4d
p4raw-link: @24241 on //depot/perl: d5b5861bfad2c5081a544610aa6f33c0ea24ea2b
p4raw-link: @24228 on //depot/perl: f398eb67d321bfe2b4dd05cb57fa3c94a3337abc
p4raw-id: //depot/maint-5.8/perl@25385
p4raw-integrated: from //depot/perl@24669 'edit in' sv.c (@24665..)
'merge in' gv.c util.c (@24666..)
p4raw-integrated: from //depot/perl@24626 'edit in' hv.c (@24584..)
p4raw-integrated: from //depot/perl@24439 'edit in' op.c (@24438..)
'merge in' dump.c ext/B/B.xs (@24271..) doio.c (@24414..) mg.c
(@24420..) pp_sys.c toke.c (@24431..) ext/Storable/Storable.xs
(@24436..)
p4raw-integrated: from //depot/perl@24241 'edit in' pp_hot.c (@24239..)
p4raw-integrated: from //depot/perl@24228 'edit in' perl.c (@24170..)
pp_ctl.c (@24204..)
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2534,7 +2534,7 @@ Perl_yylex(pTHX) } PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_last_lop = PL_last_uni = Nullch; - sv_setpv(PL_linestr,""); + sv_setpvn(PL_linestr,"",0); TOKEN(';'); /* not infinite loop because rsfp is NULL now */ } /* If it looks like the start of a BOM or raw UTF-16, @@ -2575,7 +2575,7 @@ Perl_yylex(pTHX) if (PL_doextract) { /* Incest with pod. */ if (*s == '=' && strnEQ(s, "=cut", 4)) { - sv_setpv(PL_linestr, ""); + sv_setpvn(PL_linestr, "", 0); PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = Nullch; @@ -2760,7 +2760,7 @@ Perl_yylex(pTHX) /* if we have already added "LINE: while (<>) {", we must not do it again */ { - sv_setpv(PL_linestr, ""); + sv_setpvn(PL_linestr, "", 0); PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr); PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = Nullch; @@ -5050,7 +5050,7 @@ Perl_yylex(pTHX) Perl_croak(aTHX_ "Missing name in \"my sub\""); PL_expect = XTERMBLOCK; attrful = XATTRTERM; - sv_setpv(PL_subname,"?"); + sv_setpvn(PL_subname,"?",1); have_name = FALSE; } |