summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-10-30 08:56:44 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-11-13 04:49:36 -0800
commitf928b3395fa5dd08d171fbedbbe170f38de76272 (patch)
treece01f661c6c72207cce7bf3cfaef45724e08562e /pad.c
parent2575a0050170c409bc123a30901f3a711bd1802d (diff)
downloadperl-f928b3395fa5dd08d171fbedbbe170f38de76272.tar.gz
Update comments about sub(){$x} consting
It no longer has anything to do with constant.pm.
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pad.c b/pad.c
index cf47f92d26..1c88e9b08f 100644
--- a/pad.c
+++ b/pad.c
@@ -2241,7 +2241,7 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside)
);
if (CvCONST(cv)) {
- /* Constant sub () { $x } closing over $x - see lib/constant.pm:
+ /* Constant sub () { $x } closing over $x:
* The prototype was marked as a candiate for const-ization,
* so try to grab the current const value, and if successful,
* turn into a const sub:
@@ -2252,7 +2252,8 @@ S_cv_clone(pTHX_ CV *proto, CV *cv, CV *outside)
SvREFCNT_dec_NN(cv);
/* For this calling case, op_const_sv returns a *copy*, which we
donate to newCONSTSUB. Yes, this is ugly, and should be killed.
- Need to fix how lib/constant.pm works to eliminate this. */
+ We need to fix how we decide whether this optimisation is
+ possible to eliminate this. */
cv = newCONSTSUB(CvSTASH(proto), NULL, const_sv);
if (was_method)
CvMETHOD_on(cv);