summaryrefslogtreecommitdiff
path: root/opcode.h
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 /opcode.h
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 'opcode.h')
-rw-r--r--opcode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcode.h b/opcode.h
index 8117fd9f80..142c75e131 100644
--- a/opcode.h
+++ b/opcode.h
@@ -1888,7 +1888,7 @@ EXTCONST U32 PL_opargs[] = {
0x00091480, /* unpack */
0x0002140f, /* pack */
0x00111408, /* split */
- 0x0002140d, /* join */
+ 0x0002140f, /* join */
0x00002401, /* list */
0x00224200, /* lslice */
0x00002405, /* anonlist */