From f0ab9afb53ef594bb6fb8989153fbfba9762816f Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Mon, 26 Mar 2007 22:52:18 +0000 Subject: In struct regexp replace the two arrays of I32s accessed via startp and endp with a single array of struct regexp_paren_pair, which has 2 I32 members. PL_regstartp and PL_regendp are replaced with a pointer to regexp_paren_pair. The regexp swap structure now only has one member, so abolish it and store the pointer to the swap array directly. Hopefully keeping the corresponding start and end adjacent in memory will help with cache coherency. p4raw-id: //depot/perl@30769 --- universal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'universal.c') diff --git a/universal.c b/universal.c index 6fdf8b99be..adfddb5ae0 100644 --- a/universal.c +++ b/universal.c @@ -1209,8 +1209,8 @@ XS(XS_re_regnames) I32 *nums = (I32*)SvPVX(sv_dat); for ( i = 0; i < SvIVX(sv_dat); i++ ) { if ((I32)(re->lastcloseparen) >= nums[i] && - re->startp[nums[i]] != -1 && - re->endp[nums[i]] != -1) + re->offs[nums[i]].start != -1 && + re->offs[nums[i]].end != -1) { parno = nums[i]; break; @@ -1291,8 +1291,8 @@ XS(XS_re_regnames_iternext) I32 *nums = (I32*)SvPVX(sv_dat); for ( i = 0; i < SvIVX(sv_dat); i++ ) { if ((I32)(re->lastcloseparen) >= nums[i] && - re->startp[nums[i]] != -1 && - re->endp[nums[i]] != -1) + re->offs[nums[i]].start != -1 && + re->offs[nums[i]].end != -1) { parno = nums[i]; break; -- cgit v1.2.1