* 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:
naruse 2016-05-25 04:21:32 +00:00
Родитель 8c2ddab57a
Коммит 599f054fe6
2 изменённых файлов: 13 добавлений и 16 удалений

Просмотреть файл

@ -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>
* regcomp.c (compile_length_tree): return error code immediately

Просмотреть файл

@ -134,12 +134,6 @@ bitset_is_empty(BitSetRef bs)
}
#ifdef ONIG_DEBUG
static int
onig_is_prelude(void)
{
return !rb_const_defined(rb_cThread, rb_intern_const("MUTEX_FOR_THREAD_EXCLUSIVE"));
}
static int
bitset_on_num(BitSetRef bs)
{
@ -5270,7 +5264,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
default:
#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));
#endif
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 (!onig_is_prelude()) print_optimize_info(stderr, reg);
print_optimize_info(stderr, reg);
#endif
return r;
}
@ -5717,7 +5711,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
reg->state = ONIG_STATE_COMPILING;
#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
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
# if 0
fprintf(stderr, "ORIGINAL PARSE TREE:\n");
if (!onig_is_prelude()) {
print_tree(stderr, root);
}
print_tree(stderr, root);
# endif
#endif
@ -5786,7 +5778,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
if (r != 0) goto err_unset;
#ifdef ONIG_DEBUG_PARSE_TREE
if (!onig_is_prelude()) print_tree(stderr, root);
print_tree(stderr, root);
#endif
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 USE_NAMED_GROUP
if (!onig_is_prelude()) onig_print_names(stderr, reg);
onig_print_names(stderr, reg);
#endif
if (!onig_is_prelude()) print_compiled_byte_code_list(stderr, reg);
print_compiled_byte_code_list(stderr, reg);
#endif
end:
@ -6064,7 +6056,7 @@ onig_end(void)
exec_end_call_list();
#ifdef ONIG_DEBUG_STATISTICS
if (!onig_is_prelude()) onig_print_statistics(stderr);
onig_print_statistics(stderr);
#endif
#ifdef USE_SHARED_CCLASS_TABLE