summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2013-02-13 15:13:04 -0700
committerKarl Williamson <public@khwilliamson.com>2013-07-03 19:21:17 -0600
commit4b98096221966ea01c046f4f61b2dc4f60b534b9 (patch)
treec858cf62e8cc9e4897b18ef68684be9bfe3c5c00 /regcomp.c
parent2c3365de8c1168f115576a4976d067e3b911c490 (diff)
downloadperl-4b98096221966ea01c046f4f61b2dc4f60b534b9.tar.gz
regcomp.c: Remove unused data structure field
This removes a field that is set in the inversion list data structure and examined just once. And that sole examiner is the function that calls the function that does the set. In other words X calls Y passing it data D. Y puts D into a structure. Upon return from Y, X looks for D in the structure. No one else looks at D. X might just as well have looked at D directly, without involving Y, and without the structure needing a space for D.
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/regcomp.c b/regcomp.c
index 0ee7bc5b6b..fb54b83f09 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7225,7 +7225,6 @@ Perl__new_invlist(pTHX_ IV initial_size)
*(zero_addr + 1) = 0;
*get_invlist_previous_index_addr(new_list) = 0;
- *get_invlist_version_id_addr(new_list) = INVLIST_VERSION_ID;
#if HEADER_LENGTH != 6
# error Need to regenerate INVLIST_VERSION_ID by running perl -E 'say int(rand 2**31-1)', and then changing the #if to the new length
#endif
@@ -7251,7 +7250,7 @@ S__new_invlist_C_array(pTHX_ UV* list)
shouldn't touch it */
SvCUR_set(invlist, TO_INTERNAL_SIZE(_invlist_len(invlist)));
- if (*get_invlist_version_id_addr(invlist) != INVLIST_VERSION_ID) {
+ if (list[INVLIST_VERSION_ID_OFFSET] != INVLIST_VERSION_ID) {
Perl_croak(aTHX_ "panic: Incorrect version for previously generated inversion list");
}
invlist_set_len(invlist, list[INVLIST_LEN_OFFSET]);
@@ -8143,16 +8142,6 @@ S_get_invlist_iter_addr(pTHX_ SV* invlist)
return (UV *) (SvPVX(invlist) + (INVLIST_ITER_OFFSET * sizeof (UV)));
}
-PERL_STATIC_INLINE UV*
-S_get_invlist_version_id_addr(pTHX_ SV* invlist)
-{
- /* Return the address of the UV that contains the version id. */
-
- PERL_ARGS_ASSERT_GET_INVLIST_VERSION_ID_ADDR;
-
- return (UV *) (SvPVX(invlist) + (INVLIST_VERSION_ID_OFFSET * sizeof (UV)));
-}
-
PERL_STATIC_INLINE void
S_invlist_iterinit(pTHX_ SV* invlist) /* Initialize iterator for invlist */
{