summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avar@cpan.org>2014-05-07 12:09:40 +0000
committerRicardo Signes <rjbs@cpan.org>2014-05-12 11:02:11 -0400
commitd3f8a934ef964c0f488e9c692275435d8ea2e291 (patch)
treeed55053aa6f348e9bafa9b16832cacfd99e55f1a /embed.fnc
parentfe39f0d59b87549f2e6cb1df1dfeaa25215b19ab (diff)
downloadperl-d3f8a934ef964c0f488e9c692275435d8ea2e291.tar.gz
Revert "[perl #79908] Stop sub inlining from breaking closures"
This reverts commit 137da2b05b4b7628115049f343163bdaf2c30dbb. See the "How about having a recommended way to add constant subs dynamically?" thread on perl5-porters, specifically while it sucks that we have this bug, it's been documented to work this way since 5.003 in "Constant Functions" in perlsub: If the result after optimization and constant folding is either a constant or a lexically-scoped scalar which has no other references, then it will be used in place of function calls made without C<&> -- http://perldoc.perl.org/perlsub.html#Constant-Functions Since we've had this documented bug for a long time we should introduce this fix in a deprecation cycle rather than silently slowing down code that assumes it's going to be optimized by constant folding. I didn't revert the tests it t/op/sub.t, but turned them into TODO tests instead. Conflicts: t/op/sub.t
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 1545bd2caf..c78f345723 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -310,7 +310,7 @@ ApdR |SV* |gv_const_sv |NN GV* gv
ApdR |SV* |cv_const_sv |NULLOK const CV *const cv
pR |SV* |cv_const_sv_or_av|NULLOK const CV *const cv
: Used in pad.c
-pR |SV* |op_const_sv |NULLOK const OP* o
+pR |SV* |op_const_sv |NULLOK const OP* o|NULLOK CV* cv
Apd |void |cv_undef |NN CV* cv
p |void |cv_forget_slab |NN CV *cv
Ap |void |cx_dump |NN PERL_CONTEXT* cx