Paul "LeoNerd" Evans
da6c78e212
Allow multivariable foreach to use refaliases
...
As noted by https://github.com/Perl/perl5/issues/24027 , while multivar
foreach and refalias foreach have each been available separately for
some time now, it wasn't possible to combine the two until now.
This current implementation does have limits on the number of variables
in total are allowed in a multivariable foreach loop if any are
refaliases (no more than 256), and which ones can be refaliases (none
past the 24th) that are all to do with the way I am abusing the U32
`op_targ` field to store the variable count in the lower 8 bits, and a
bitmask of which vars are refaliases in the upper 24 bits. I decided to
do that as it means I don't have to make the `OP_ITER` op any larger -
such as by expanding it to an UNOP_AUX to give it that extra storage
space. In practice I don't imagine those limits will be a problem for
any practical use-case.
If in a future version we did want to expand on those limits, I think it
would be possible by moving the `refalias_mask` storage to a PV stored
in the UNOP_AUX vector, or somesuch.
2026-01-22 00:07:41 +00:00
..
2026-01-19 19:21:14 +01:00
2023-08-16 20:56:42 +01:00
2024-09-12 22:42:11 -06:00
2024-09-12 22:42:11 -06:00
2024-09-12 22:42:11 -06:00
2024-09-12 22:42:11 -06:00
2024-01-11 10:06:24 +00:00
2024-09-12 22:42:11 -06:00
2024-01-11 10:06:24 +00:00
2023-07-17 14:07:58 +10:00
2024-09-12 22:42:11 -06:00
2023-10-02 08:09:02 -04:00
2025-04-18 15:30:10 +03:00
2024-09-12 22:42:11 -06:00
2025-11-16 13:10:50 +01:00
2024-01-11 10:06:24 +00:00
2024-09-12 22:42:11 -06:00
2024-01-11 10:06:24 +00:00
2024-09-12 22:42:11 -06:00
2025-04-10 11:54:37 +02:00
2024-09-12 22:42:11 -06:00
2024-01-11 10:06:24 +00:00
2025-04-10 11:54:37 +02:00
2024-11-18 05:50:09 +01:00
2025-04-10 12:02:54 +02:00
2025-04-17 18:51:30 +02:00
2024-09-12 22:42:11 -06:00
2024-11-18 05:50:09 +01:00
2025-02-02 13:02:40 -07:00
2023-11-28 12:04:24 +00:00
2023-11-30 15:53:26 +00:00
2024-11-18 05:50:09 +01:00
2025-02-02 13:02:40 -07:00
2023-11-28 12:04:24 +00:00
2023-11-30 15:53:26 +00:00
2024-11-18 05:50:09 +01:00
2025-02-02 13:02:40 -07:00
2023-11-30 15:53:26 +00:00
2025-01-18 20:27:17 +00:00
2025-04-13 15:02:44 +01:00
2025-08-03 12:01:22 +01:00
2024-09-12 22:42:11 -06:00
2025-02-02 13:02:40 -07:00
2025-04-13 15:02:44 +01:00
2025-08-03 12:01:22 +01:00
2025-07-07 12:25:38 +02:00
2025-07-08 13:20:11 +02:00
2025-07-20 22:15:04 +00:00
2025-08-21 18:36:25 -07:00
2025-09-23 08:55:06 +02:00
2025-10-23 16:31:43 +00:00
2025-11-20 07:31:17 +01:00
2025-12-20 18:24:10 +00:00
2026-01-19 19:21:14 +01:00
2026-01-19 19:21:14 +01:00
2026-01-09 12:50:24 -07:00
2024-09-12 22:42:11 -06:00
2024-08-23 14:16:19 -06:00
2025-02-16 14:51:16 +01:00
2025-10-10 22:02:10 +01:00
2023-05-26 12:25:08 -06:00
2025-12-23 16:32:39 -05:00
2025-02-27 11:40:23 -07:00
2026-01-06 17:44:42 -07:00
2024-01-11 10:06:24 +00:00
2025-05-25 15:56:11 -06:00
2024-09-12 22:42:11 -06:00
2024-09-12 22:42:11 -06:00
2026-01-22 00:07:41 +00:00
2025-12-19 06:51:32 -05:00
2026-01-22 00:07:41 +00:00
2024-02-17 11:38:20 +01:00
2024-05-15 20:10:13 -04:00
2025-10-31 05:48:10 -06:00
2025-05-08 06:52:25 -06:00
2025-11-18 07:03:45 +01:00
2023-03-03 09:43:23 +01:00
2023-07-02 17:52:41 -06:00
2025-12-31 12:52:19 -05:00
2024-09-12 22:42:11 -06:00
2025-08-15 09:07:31 -07:00
2025-05-02 23:35:09 +02:00
2026-01-10 05:52:56 +11:00
2025-05-25 15:56:11 -06:00
2026-01-02 13:01:20 -07:00
2026-01-19 18:09:32 +01:00
2023-08-16 20:56:42 +01:00
2025-07-18 08:37:05 -04:00
2024-01-11 10:06:24 +00:00
2025-07-03 21:50:51 -06:00
2024-11-18 05:50:09 +01:00
2023-12-20 13:08:06 -07:00
2024-11-11 10:39:40 +11:00
2024-06-16 12:39:53 -06:00
2023-02-08 16:58:32 +08:00
2025-05-04 15:20:31 -06:00
2024-08-07 22:02:44 -04:00
2024-08-07 22:02:44 -04:00
2025-12-31 12:52:19 -05:00
2025-05-25 15:56:11 -06:00
2025-10-06 07:28:12 -04:00
2024-11-18 05:50:09 +01:00
2024-07-30 19:35:10 +01:00
2024-08-07 22:02:44 -04:00
2024-09-12 22:42:11 -06:00
2025-06-24 11:57:33 +02:00
2025-08-07 11:00:29 +01:00
2025-07-22 10:19:52 -06:00
2026-01-08 08:58:10 -07:00
2025-09-20 10:10:20 -06:00
2025-09-28 11:48:49 -06:00
2025-05-11 10:56:19 -06:00
2023-07-31 22:12:09 -04:00
2025-05-10 09:02:05 -06:00
2025-05-23 15:11:45 -06:00
2025-07-03 21:07:46 -06:00
2024-09-27 15:52:41 -06:00
2025-05-04 11:02:53 +00:00
2023-05-15 16:08:19 -06:00
2025-11-02 11:21:36 -07:00
2025-05-22 18:59:38 +02:00
2025-05-08 06:52:25 -06:00
2024-09-12 22:42:11 -06:00
2025-09-01 07:52:38 -06:00
2025-05-19 10:03:21 -06:00
2023-08-16 20:56:42 +01:00
2024-05-15 20:10:13 -04:00
2025-11-07 22:17:19 +01:00
2024-09-12 22:42:11 -06:00