Permalink
Browse files

smoke

  • Loading branch information...
khwilliamson committed Oct 11, 2018
1 parent 8fd936b commit 826f8f3450cde90951925318558e69c9f508a833
Showing with 615 additions and 620 deletions.
  1. +5 −2 embed.fnc
  2. +1 −0 embed.h
  3. +1 −0 perl.h
  4. +4 −1 proto.h
  5. +584 −604 regcomp.c
  6. +0 −4 regcomp.h
  7. +12 −6 t/lib/warnings/regcomp
  8. +1 −0 t/op/svleak.t
  9. +1 −1 t/re/anyof.t
  10. +1 −0 t/re/re_tests
  11. +5 −2 t/re/reg_mesg.t
View
@@ -2368,6 +2368,7 @@ Es |regnode_offset|regnode_guts|NN RExC_state_t *pRExC_state \
|const U8 op \
|const STRLEN extra_len \
|NN const char* const name
Es |void |change_engine_size|NN RExC_state_t *pRExC_state|const Ptrdiff_t size
Es |regnode_offset|reganode|NN RExC_state_t *pRExC_state|U8 op \
|U32 arg
Es |regnode_offset|reg2Lanode|NN RExC_state_t *pRExC_state \
@@ -2422,14 +2423,16 @@ Es |regnode_offset|reg_node|NN RExC_state_t *pRExC_state|U8 op
Es |regnode_offset|regpiece|NN RExC_state_t *pRExC_state \
|NN I32 *flagp|U32 depth
Es |bool |grok_bslash_N |NN RExC_state_t *pRExC_state \
|NULLOK regnode_offset* nodep \
|NULLOK regnode_offset* nodep \
|NULLOK UV *code_point_p \
|NULLOK int* cp_count \
|NN I32 *flagp \
|const bool strict \
|const U32 depth
Es |void |reginsert |NN RExC_state_t *pRExC_state \
|U8 op|regnode_offset operand|U32 depth
|const U8 op \
|const regnode_offset operand \
|const U32 depth
Es |void |regtail |NN RExC_state_t * pRExC_state \
|NN const regnode_offset p \
|NN const regnode_offset val \
View
@@ -1179,6 +1179,7 @@
#define add_data S_add_data
#define add_multi_match(a,b,c) S_add_multi_match(aTHX_ a,b,c)
#define alloc_maybe_populate_EXACT(a,b,c,d,e,f) S_alloc_maybe_populate_EXACT(aTHX_ a,b,c,d,e,f)
#define change_engine_size(a,b) S_change_engine_size(aTHX_ a,b)
#define cntrl_to_mnemonic S_cntrl_to_mnemonic
#define compute_EXACTish S_compute_EXACTish
#define construct_ahocorasick_from_trie(a,b,c) S_construct_ahocorasick_from_trie(aTHX_ a,b,c)
View
1 perl.h
@@ -3685,6 +3685,7 @@ typedef struct regnode_charclass regnode_charclass;
/* A hopefully less confusing name. The sub-classes are all Posix classes only
* used under /l matching */
typedef struct regnode_charclass_posixl regnode_charclass_class;
typedef struct regnode_charclass_posixl regnode_charclass_posixl;
typedef struct regnode_ssc regnode_ssc;
typedef struct RExC_state_t RExC_state_t;
View
@@ -5394,6 +5394,9 @@ PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ RExC_state_t *pRExC_s
#define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT \
assert(pRExC_state); assert(node); assert(flagp)
#endif
STATIC void S_change_engine_size(pTHX_ RExC_state_t *pRExC_state, const Ptrdiff_t size);
#define PERL_ARGS_ASSERT_CHANGE_ENGINE_SIZE \
assert(pRExC_state)
STATIC const char * S_cntrl_to_mnemonic(const U8 c)
__attribute__warn_unused_result__;
@@ -5539,7 +5542,7 @@ STATIC regnode_offset S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U3
STATIC unsigned int S_regex_set_precedence(const U8 my_operator)
__attribute__warn_unused_result__;
STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode_offset operand, U32 depth);
STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, const U8 op, const regnode_offset operand, const U32 depth);
#define PERL_ARGS_ASSERT_REGINSERT \
assert(pRExC_state)
STATIC regnode_offset S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_len, const char* const name);
View
1,188 regcomp.c

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -381,10 +381,6 @@ struct regnode_ssc {
#define REG_MAGIC 0234
#define SIZE_ONLY RExC_pass1
#define PASS1 SIZE_ONLY
#define PASS2 (! SIZE_ONLY)
/* An ANYOF node is basically a bitmap with the index being a code point. If
* the bit for that code point is 1, the code point matches; if 0, it doesn't
* match (complemented if inverted). There is an additional mechanism to deal
View
@@ -56,24 +56,30 @@ Unmatched [ in regex; marked by <-- HERE in m/abc[ <-- HERE fi[.00./ at - line
########
# NAME perl qr/(?[[[:word]]])/ XXX Why is 'syntax' lc?
# OPTION fatal
use warnings;
no warnings 'experimental::regex_sets';
qr/(?[[[:word]]])/;
EXPECT
Assuming NOT a POSIX class since there is no terminating ':' in regex; marked by <-- HERE in m/(?[[[:word <-- HERE ]]])/ at - line 2.
Unexpected ']' with no following ')' in (?[... in regex; marked by <-- HERE in m/(?[[[:word]] <-- HERE ])/ at - line 2.
Assuming NOT a POSIX class since there is no terminating ':' in regex; marked by <-- HERE in m/(?[[[:word <-- HERE ]]])/ at - line 4.
Unexpected ']' with no following ')' in (?[... in regex; marked by <-- HERE in m/(?[[[:word]] <-- HERE ])/ at - line 4.
########
# NAME qr/(?[ [[:digit: ])/
# OPTION fatal
use warnings;
no warnings 'experimental::regex_sets';
qr/(?[[[:digit: ])/;
EXPECT
Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[[:digit: ] <-- HERE )/ at - line 2.
syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[[:digit: ]) <-- HERE / at - line 2.
Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[[:digit: ] <-- HERE )/ at - line 4.
syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[[:digit: ]) <-- HERE / at - line 4.
########
# NAME qr/(?[ [:digit: ])/
# OPTION fatal
use warnings;
no warnings 'experimental::regex_sets';
qr/(?[[:digit: ])/
EXPECT
Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[:digit: ] <-- HERE )/ at - line 2.
syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[:digit: ]) <-- HERE / at - line 2.
Assuming NOT a POSIX class since no blanks are allowed in one in regex; marked by <-- HERE in m/(?[[:digit: ] <-- HERE )/ at - line 4.
syntax error in (?[...]) in regex; marked by <-- HERE in m/(?[[:digit: ]) <-- HERE / at - line 4.
########
# NAME [perl #126141]
# OPTION fatal
View
@@ -15,6 +15,7 @@ BEGIN {
use Config;
skip_all(); # XXX
plan tests => 149;
# run some code N times. If the number of SVs at the end of loop N is
View
@@ -35,7 +35,7 @@ my @tests = (
'[^\S ]' => 'ANYOFD[\t\n\x0B\f\r{utf8}\x85\xA0][1680 2000-200A 2028-2029 202F 205F 3000]',
'[^\n\r]' => 'ANYOF[^\n\r][0100-INFINITY]',
'[^\/\|,\$\%%\@\ \%"\<\>\:\#\&\*\{\}\[\]\(\)]' => 'ANYOF[^ "#$%&()*,/:<>@\[\]\{|\}][0100-INFINITY]',
'[^[:^print:][:^ascii:]]' => 'ANYOF[\x20-\x7E]',
'[^[:^print:][:^ascii:]]' => 'POSIXA[:print:]',
'[ [:blank:]]' => 'ANYOFD[\t {utf8}\xA0][1680 2000-200A 202F 205F 3000]',
'[_[:^blank:]]' => 'ANYOFD[^\t {utf8}\xA0][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
'[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFINITY]',
View
@@ -1999,6 +1999,7 @@ AB\s+\x{100} AB \x{100}X y - -
(?il)\x{100}|\x{100}|\x{FE} \xFE y $& \xFE
\A([\x00-\x7F]+)(.*)\z \007\011\012 y $& \007\011\012 # [perl #133311]
(?:(?^:(?{1}))[^0-9]) : y $& : # [perl #133348]
#qr/\1a(b)/
# Keep these lines at the end of the file
# vim: softtabstop=0 noexpandtab
View
@@ -10,6 +10,7 @@ BEGIN {
}
skip_all_without_unicode_tables();
#skip_all();
use strict;
use open qw(:utf8 :std);
@@ -529,6 +530,7 @@ my @warning = (
'/(?=a)*/' => '(?=a)* matches null string many times {#} m/(?=a)*{#}/',
'my $x = \'\m\'; qr/a$x/' => 'Unrecognized escape \m passed through {#} m/a\m{#}/',
'/\q/' => 'Unrecognized escape \q passed through {#} m/\q{#}/',
'/\q\p{Any}/' => 'Unrecognized escape \q passed through {#} m/\q{#}\p{Any}/',
# These two tests do not include the marker, because regcomp.c no
# longer knows where it goes by the time this warning is emitted.
@@ -728,6 +730,7 @@ for my $strict ("", "use re 'strict';") {
no warnings 'experimental::regex_sets';
no warnings 'experimental::script_run';
no warnings 'experimental::re_strict';
no warnings 'experimental::alpha_assertions';
warning_is(sub {
my $meaning_of_life;
@@ -837,11 +840,11 @@ for my $strict ("", "no warnings 'experimental::re_strict'; use re 'strict';")
{
if (@got < @expect) {
$count = @got;
note "Expected warnings not gotten:\n\t" . join "\n\t",
diag "Expected warnings not gotten:\n\t" . join "\n\t",
@expect[$count .. $#expect];
}
else {
note "Unexpected warnings gotten:\n\t" . join("\n\t",
diag "Unexpected warnings gotten:\n\t" . join("\n\t",
@got[$count .. $#got]);
}
}

0 comments on commit 826f8f3

Please sign in to comment.