* regcomp.c: remove condition for debug output because prelude
doesn't use regexp now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8c2ddab57a
commit
599f054fe6
@ -1,3 +1,8 @@
|
|||||||
|
Wed May 25 13:13:37 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* regcomp.c: remove condition for debug output because prelude
|
||||||
|
doesn't use regexp now.
|
||||||
|
|
||||||
Wed May 25 13:10:30 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
Wed May 25 13:10:30 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* regcomp.c (compile_length_tree): return error code immediately
|
* regcomp.c (compile_length_tree): return error code immediately
|
||||||
|
24
regcomp.c
24
regcomp.c
@ -134,12 +134,6 @@ bitset_is_empty(BitSetRef bs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG
|
#ifdef ONIG_DEBUG
|
||||||
static int
|
|
||||||
onig_is_prelude(void)
|
|
||||||
{
|
|
||||||
return !rb_const_defined(rb_cThread, rb_intern_const("MUTEX_FOR_THREAD_EXCLUSIVE"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
bitset_on_num(BitSetRef bs)
|
bitset_on_num(BitSetRef bs)
|
||||||
{
|
{
|
||||||
@ -5270,7 +5264,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef ONIG_DEBUG
|
#ifdef ONIG_DEBUG
|
||||||
if (!onig_is_prelude()) fprintf(stderr, "optimize_node_left: undefined node type %d\n",
|
fprintf(stderr, "optimize_node_left: undefined node type %d\n",
|
||||||
NTYPE(node));
|
NTYPE(node));
|
||||||
#endif
|
#endif
|
||||||
r = ONIGERR_TYPE_BUG;
|
r = ONIGERR_TYPE_BUG;
|
||||||
@ -5416,7 +5410,7 @@ set_optimize_info_from_tree(Node* node, regex_t* reg, ScanEnv* scan_env)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
|
#if defined(ONIG_DEBUG_COMPILE) || defined(ONIG_DEBUG_MATCH)
|
||||||
if (!onig_is_prelude()) print_optimize_info(stderr, reg);
|
print_optimize_info(stderr, reg);
|
||||||
#endif
|
#endif
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -5717,7 +5711,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
|
|||||||
reg->state = ONIG_STATE_COMPILING;
|
reg->state = ONIG_STATE_COMPILING;
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG
|
#ifdef ONIG_DEBUG
|
||||||
if (!onig_is_prelude()) print_enc_string(stderr, reg->enc, pattern, pattern_end);
|
print_enc_string(stderr, reg->enc, pattern, pattern_end);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (reg->alloc == 0) {
|
if (reg->alloc == 0) {
|
||||||
@ -5744,9 +5738,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
|
|||||||
#ifdef ONIG_DEBUG_PARSE_TREE
|
#ifdef ONIG_DEBUG_PARSE_TREE
|
||||||
# if 0
|
# if 0
|
||||||
fprintf(stderr, "ORIGINAL PARSE TREE:\n");
|
fprintf(stderr, "ORIGINAL PARSE TREE:\n");
|
||||||
if (!onig_is_prelude()) {
|
print_tree(stderr, root);
|
||||||
print_tree(stderr, root);
|
|
||||||
}
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -5786,7 +5778,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
|
|||||||
if (r != 0) goto err_unset;
|
if (r != 0) goto err_unset;
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG_PARSE_TREE
|
#ifdef ONIG_DEBUG_PARSE_TREE
|
||||||
if (!onig_is_prelude()) print_tree(stderr, root);
|
print_tree(stderr, root);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
reg->capture_history = scan_env.capture_history;
|
reg->capture_history = scan_env.capture_history;
|
||||||
@ -5866,9 +5858,9 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
|
|||||||
|
|
||||||
#ifdef ONIG_DEBUG_COMPILE
|
#ifdef ONIG_DEBUG_COMPILE
|
||||||
#ifdef USE_NAMED_GROUP
|
#ifdef USE_NAMED_GROUP
|
||||||
if (!onig_is_prelude()) onig_print_names(stderr, reg);
|
onig_print_names(stderr, reg);
|
||||||
#endif
|
#endif
|
||||||
if (!onig_is_prelude()) print_compiled_byte_code_list(stderr, reg);
|
print_compiled_byte_code_list(stderr, reg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
end:
|
end:
|
||||||
@ -6064,7 +6056,7 @@ onig_end(void)
|
|||||||
exec_end_call_list();
|
exec_end_call_list();
|
||||||
|
|
||||||
#ifdef ONIG_DEBUG_STATISTICS
|
#ifdef ONIG_DEBUG_STATISTICS
|
||||||
if (!onig_is_prelude()) onig_print_statistics(stderr);
|
onig_print_statistics(stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SHARED_CCLASS_TABLE
|
#ifdef USE_SHARED_CCLASS_TABLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user