]> Savannah Git Hosting - gnulib.git/commit
Simplify and regularize regex use of ‘assert’
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 11 Oct 2019 19:43:21 +0000 (12:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 11 Oct 2019 19:44:17 +0000 (12:44 -0700)
commit79f8ee4e389f8cb1339f8abed9a7d29816e2a2d4
tree09c6422a0bb61547613699b1c22a0ae3d9feb62f
parent4e02b30c761c76d04057fa5f6bba71401f9310cd
Simplify and regularize regex use of ‘assert’

Also, tell GCC about the asserts even when compiling without
debugging, to give it further optimization opportunities.
* lib/regex_internal.h (DEBUG_ASSERT): New macro.
* lib/regcomp.c (link_nfa_nodes, calc_eclosure)
(parse_expression, parse_bracket_exp):
* lib/regex_internal.c (build_wcs_buffer)
(build_wcs_upper_buffer, re_string_reconstruct)
(re_string_context_at):
* lib/regexec.c (re_search_stub, re_copy_regs)
(re_search_internal, prune_impossible_nodes, check_matching)
(check_halt_state_context, set_regs, sift_states_backward)
(build_sifted_states, transit_state_mb, transit_state_bkref)
(check_arrival_add_next_nodes, check_arrival_expand_ecl)
(match_ctx_add_subtop):
Use it instead of plain ‘assert’.
ChangeLog
lib/regcomp.c
lib/regex_internal.c
lib/regex_internal.h
lib/regexec.c