summaryrefslogtreecommitdiff
path: root/regen/opcodes
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-10-11 01:21:12 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-10-12 00:23:48 -0700
commit987c96916e35a543383e96eebb4ef8b2c8ef66d0 (patch)
tree2586dda189c5dba1004914e2247c8a8a705104ad /regen/opcodes
parentef7999f1f1914f1a33743bbfa196e39f7f041445 (diff)
downloadperl-987c96916e35a543383e96eebb4ef8b2c8ef66d0.tar.gz
Fold join to const or stringify where possible
Due to the exigencies of the implementation, "$_->$*" ends up with a join op (join $", $$_), which is unnecessary. This gave me the idea of folding it where possible (instead of trying to tackle it in toke.c), which would also make explicit joins benefit, too. If the arguments are a simple scalar or constant followed by a single-item list, then the join can become a stringify, and the sepa- rator can simply disappear. Further (and this is unrelated to "$_->$*"), if all of join’s argu- ments are constant, the whole thing can be folded to a const op.
Diffstat (limited to 'regen/opcodes')
-rw-r--r--regen/opcodes2
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/opcodes b/regen/opcodes
index c60e623276..d610d309e2 100644
--- a/regen/opcodes
+++ b/regen/opcodes
@@ -240,7 +240,7 @@ kvhslice key/value hash slice ck_null m@ H L
unpack unpack ck_fun u@ S S?
pack pack ck_fun fmst@ S L
split split ck_split t@ S S S
-join join or string ck_join mst@ S L
+join join or string ck_join fmst@ S L
# List operators.