summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-08-26 23:05:16 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-08-28 13:04:17 -0700
commitb54c5e14b7fb9ecbcf34d74dd140de12cb73ff78 (patch)
tree9ccbd5504fa7696c60ca2cfe7530d383b525a71c /intrpvar.h
parent8ce2f624198802e520eba6523c32ad6429463198 (diff)
downloadperl-b54c5e14b7fb9ecbcf34d74dd140de12cb73ff78.tar.gz
Split PL_padix into two variables
PL_padix keeps track of the position in the pad when pad_alloc has to start scanning for an available slot. The availability of a slot is determined differently for targets (which may reuse slots that are already targets from previous state- ments, at least when pad_reset is enabled) and constants (which may not reuse targets). Having the same index for both may require scanning the entire pad for allocating a constant or GV. t/re/uniprops.t was running far too slowly under USE_BROKEN_PAD_RESET because of this. pad_reset would reset PL_padix to point to the beginning of a pad with a few hundred thousand entries. pad_alloc would then have to scan the entire pad before adding a GV to the end. It is still too slow, even with this commit, but for other reasons. (This is just a partial fix.)
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h
index db763adb36..06194d9588 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -533,6 +533,7 @@ PERLVAR(I, min_intro_pending, I32) /* start of vars to introduce */
PERLVAR(I, max_intro_pending, I32) /* end of vars to introduce */
PERLVAR(I, padix, I32) /* lowest unused index - 1
in current "register" pad */
+PERLVAR(I, constpadix, I32) /* lowest unused for constants */
PERLVAR(I, padix_floor, I32) /* how low may inner block reset padix */