summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-02-01 10:43:49 -0700
committerKarl Williamson <public@khwilliamson.com>2011-02-02 16:31:22 -0700
commitd764b54e5a93ff224d371bad25b14285e5a543cd (patch)
treeba3d3af8037bece8de968852c49ca8aa2516b34c /embed.fnc
parent2f833f5208e26b208886e51e09e2c072b5eabb46 (diff)
downloadperl-d764b54e5a93ff224d371bad25b14285e5a543cd.tar.gz
Add initial inversion list object
Going forward the intent is to convert from swashes to the better-suited inversion list data structure. This adds rudimentary inversion lists that have only the functionality needed for 5.14. As a result, they are as much as possible static to one file. What's necessary for 5.14 is enough to allow folding of ANYOF nodes to be moved from regexec to regcomp. Why they are needed for that is to generate as compact as possible class definitions; otherwise, very long linear lists might be generated. (They still may be, but that's inherent in the problem domain; this generates as compact as possible, combining overlapping ranges, etc.) The only two non-trivial methods in this object are from published algorithms.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc19
1 files changed, 18 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 822d3ef03a..c225de1864 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1284,7 +1284,24 @@ Apd |void |sv_vsetpvfn |NN SV *const sv|NN const char *const pat|const STRLEN pa
ApR |NV |str_to_version |NN SV *sv
Ap |SV* |swash_init |NN const char* pkg|NN const char* name|NN SV* listsv|I32 minbits|I32 none
Ap |UV |swash_fetch |NN SV *swash|NN const U8 *ptr|bool do_utf8
-EMpRX |HV* |_swash_inversion_hash |NN SV *swash
+EMpRX |HV* |_swash_inversion_hash |NN SV* const swash
+EMpR |HV* |_new_invlist |const IV initial_size
+EMpR |HV* |_swash_to_invlist |NN SV* const swash
+EMp |void |_append_range_to_invlist |NN HV* const invlist|const UV start|const UV end
+#ifdef PERL_IN_REGCOMP_C
+EsMR |HV* |add_range_to_invlist |NN HV* const invlist|const UV start|const UV end
+EiMR |UV* |invlist_array |NN HV* const invlist
+EiM |void |invlist_destroy |NN HV* const invlist
+EsM |void |invlist_extend |NN HV* const invlist|const UV len
+EsMR |HV* |invlist_intersection |NN HV* const a|NN HV* const b
+EiMR |UV |invlist_len |NN HV* const invlist
+EiMR |UV |invlist_max |NN HV* const invlist
+EiM |void |invlist_set_array |NN HV* const invlist|NN const UV* const array
+EiM |void |invlist_set_len |NN HV* const invlist|const UV len
+EiM |void |invlist_set_max |NN HV* const invlist|const UV max
+EiM |void |invlist_trim |NN HV* const invlist
+EsMR |HV* |invlist_union |NN HV* const a|NN HV* const b
+#endif
Ap |void |taint_env
Ap |void |taint_proper |NULLOK const char* f|NN const char *const s
Apd |UV |to_utf8_case |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp \