ruby-changes:43080
From: naruse <ko1@a...>
Date: Wed, 25 May 2016 13:21:42 +0900 (JST)
Subject: [ruby-changes:43080] naruse:r55155 (trunk): * regcomp.c: remove condition for debug output because prelude
naruse 2016-05-25 13:21:32 +0900 (Wed, 25 May 2016) New Revision: 55155 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55155 Log: * regcomp.c: remove condition for debug output because prelude doesn't use regexp now. Modified files: trunk/ChangeLog trunk/regcomp.c Index: regcomp.c =================================================================== --- regcomp.c (revision 55154) +++ regcomp.c (revision 55155) @@ -135,12 +135,6 @@ bitset_is_empty(BitSetRef bs) https://github.com/ruby/ruby/blob/trunk/regcomp.c#L135 #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) { int i, n; @@ -5270,7 +5264,7 @@ optimize_node_left(Node* node, NodeOptIn https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5264 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, https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5410 } #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* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5711 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* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5738 #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* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5778 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* https://github.com/ruby/ruby/blob/trunk/regcomp.c#L5858 #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) https://github.com/ruby/ruby/blob/trunk/regcomp.c#L6056 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 Index: ChangeLog =================================================================== --- ChangeLog (revision 55154) +++ ChangeLog (revision 55155) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed May 25 13:13:37 2016 NARUSE, Yui <naruse@r...> + + * regcomp.c: remove condition for debug output because prelude + doesn't use regexp now. + Wed May 25 13:10:30 2016 NARUSE, Yui <naruse@r...> * regcomp.c (compile_length_tree): return error code immediately -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/