diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-11-05 05:26:22 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-05 08:37:14 -0800 |
commit | ff48fc9f274e69e433a1c3957a5a38a84acebf2c (patch) | |
tree | 6aa33bcac1482ffa80d72a494552be934dddb867 /toke.c | |
parent | 3e3c2fa4690dc7f4b30ef890b67e5d326a2650b2 (diff) | |
download | perl-ff48fc9f274e69e433a1c3957a5a38a84acebf2c.tar.gz |
toke.c: Allocate __SUB__ as a baseop if possible
__SUB__ is a baseop, but it gets converted to a const op (a svop)
later if the sub is not clonable. Since a svop is bigger, we allo-
cate it as a larger size initially. But if we already know that
the sub is clonable by the time we see __SUB__, we can go with the
smaller op size.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -6946,7 +6946,9 @@ Perl_yylex(pTHX) } case KEY___SUB__: - FUN0OP(newPVOP(OP_RUNCV,0,NULL)); + FUN0OP(CvCLONE(PL_compcv) + ? newOP(OP_RUNCV, 0) + : newPVOP(OP_RUNCV,0,NULL)); case KEY_AUTOLOAD: case KEY_DESTROY: |