From dd9a6ccfcb1b5e26680c14c1663ea9fac4480690 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 13 Jul 2012 18:10:38 -0700 Subject: [perl #113470] Constant folding for pack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This takes the pessimistic approach of skipping it for any first argu- ment that is not a plain non-magical PV, just in case there is a 'p' or 'P' in the stringified form. Otherwise it scans the PV for 'p' or 'P' and skips the folding if either is present. Then it falls through to the usual op-filtering logic. I nearly made ‘pack;’ crash, so I added a test to bproto.t. --- opcode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opcode.h') diff --git a/opcode.h b/opcode.h index 217cb56481..2c7db8383a 100644 --- a/opcode.h +++ b/opcode.h @@ -1847,7 +1847,7 @@ EXTCONST U32 PL_opargs[] = { 0x00024401, /* hslice */ 0x00004b00, /* boolkeys */ 0x00091480, /* unpack */ - 0x0002140d, /* pack */ + 0x0002140f, /* pack */ 0x00111408, /* split */ 0x0002140d, /* join */ 0x00002401, /* list */ -- cgit v1.2.1