summaryrefslogtreecommitdiff
path: root/embed.h
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.h
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.h')
-rw-r--r--embed.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.h b/embed.h
index d4b175225c..a6e3b9d182 100644
--- a/embed.h
+++ b/embed.h
@@ -1206,7 +1206,7 @@
#define nextargv(a) Perl_nextargv(aTHX_ a)
#define oopsAV(a) Perl_oopsAV(aTHX_ a)
#define oopsHV(a) Perl_oopsHV(aTHX_ a)
-#define op_const_sv(a) Perl_op_const_sv(aTHX_ a)
+#define op_const_sv(a,b) Perl_op_const_sv(aTHX_ a,b)
#define op_unscope(a) Perl_op_unscope(aTHX_ a)
#define package_version(a) Perl_package_version(aTHX_ a)
#define pad_block_start(a) Perl_pad_block_start(aTHX_ a)