ruby-changes:40670
From: nobu <ko1@a...>
Date: Wed, 25 Nov 2015 17:02:41 +0900 (JST)
Subject: [ruby-changes:40670] nobu:r52749 (trunk): iseq.h: rename member
nobu 2015-11-25 17:02:29 +0900 (Wed, 25 Nov 2015) New Revision: 52749 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52749 Log: iseq.h: rename member * iseq.h (rb_compile_option_struct): rename the member frozen_string_literal_debug as debug_frozen_string_literal. [Feature #11725] * ruby.c (proc_options): do not set $DEBUG and $VERBOSE only if no arguments is given. Modified files: trunk/compile.c trunk/iseq.c trunk/iseq.h trunk/ruby.c trunk/vm_opts.h Index: iseq.c =================================================================== --- iseq.c (revision 52748) +++ iseq.c (revision 52749) @@ -349,7 +349,7 @@ static rb_compile_option_t COMPILE_OPTIO https://github.com/ruby/ruby/blob/trunk/iseq.c#L349 OPT_STACK_CACHING, /* int stack_caching; */ OPT_TRACE_INSTRUCTION, /* int trace_instruction */ OPT_FROZEN_STRING_LITERAL, - OPT_FROZEN_STRING_LITERAL_DEBUG + OPT_DEBUG_FROZEN_STRING_LITERAL, }; static const rb_compile_option_t COMPILE_OPTION_FALSE = {0}; @@ -375,7 +375,7 @@ set_compile_option_from_hash(rb_compile_ https://github.com/ruby/ruby/blob/trunk/iseq.c#L375 SET_COMPILE_OPTION(option, opt, stack_caching); SET_COMPILE_OPTION(option, opt, trace_instruction); SET_COMPILE_OPTION(option, opt, frozen_string_literal); - SET_COMPILE_OPTION(option, opt, frozen_string_literal_debug); + SET_COMPILE_OPTION(option, opt, debug_frozen_string_literal); SET_COMPILE_OPTION_NUM(option, opt, debug_level); #undef SET_COMPILE_OPTION #undef SET_COMPILE_OPTION_NUM @@ -429,7 +429,7 @@ make_compile_option_value(rb_compile_opt https://github.com/ruby/ruby/blob/trunk/iseq.c#L429 SET_COMPILE_OPTION(option, opt, stack_caching); SET_COMPILE_OPTION(option, opt, trace_instruction); SET_COMPILE_OPTION(option, opt, frozen_string_literal); - SET_COMPILE_OPTION(option, opt, frozen_string_literal_debug); + SET_COMPILE_OPTION(option, opt, debug_frozen_string_literal); SET_COMPILE_OPTION_NUM(option, opt, debug_level); } #undef SET_COMPILE_OPTION Index: iseq.h =================================================================== --- iseq.h (revision 52748) +++ iseq.h (revision 52749) @@ -67,7 +67,7 @@ struct rb_compile_option_struct { https://github.com/ruby/ruby/blob/trunk/iseq.h#L67 int stack_caching; int trace_instruction; int frozen_string_literal; - int frozen_string_literal_debug; + int debug_frozen_string_literal; int debug_level; }; Index: compile.c =================================================================== --- compile.c (revision 52748) +++ compile.c (revision 52749) @@ -5309,7 +5309,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ https://github.com/ruby/ruby/blob/trunk/compile.c#L5309 else { if (iseq->compile_data->option->frozen_string_literal) { VALUE debug_info = Qnil; - if (iseq->compile_data->option->frozen_string_literal_debug || RTEST(ruby_debug)) { + if (iseq->compile_data->option->debug_frozen_string_literal || RTEST(ruby_debug)) { debug_info = rb_ary_new_from_args(2, iseq->body->location.path, INT2FIX(line)); iseq_add_mark_object_compile_time(iseq, rb_obj_freeze(debug_info)); } Index: vm_opts.h =================================================================== --- vm_opts.h (revision 52748) +++ vm_opts.h (revision 52749) @@ -24,7 +24,7 @@ https://github.com/ruby/ruby/blob/trunk/vm_opts.h#L24 #define OPT_SPECIALISED_INSTRUCTION 1 #define OPT_INLINE_CONST_CACHE 1 #define OPT_FROZEN_STRING_LITERAL 0 -#define OPT_FROZEN_STRING_LITERAL_DEBUG 0 +#define OPT_DEBUG_FROZEN_STRING_LITERAL 0 /* Build Options. * You can't change these options at runtime. Index: ruby.c =================================================================== --- ruby.c (revision 52748) +++ ruby.c (revision 52749) @@ -69,10 +69,12 @@ enum feature_flag_bits { https://github.com/ruby/ruby/blob/trunk/ruby.c#L69 feature_did_you_mean, feature_rubyopt, feature_frozen_string_literal, - feature_frozen_string_literal_debug, + feature_debug_frozen_string_literal, feature_flag_count }; +#define DEBUG_BIT(bit) (1U << feature_debug_##bit) + #define DUMP_BIT(bit) (1U << dump_##bit) enum dump_flag_bits { dump_version, @@ -118,7 +120,7 @@ enum { https://github.com/ruby/ruby/blob/trunk/ruby.c#L120 COMPILATION_FEATURES = ( 0 | FEATURE_BIT(frozen_string_literal) - | FEATURE_BIT(frozen_string_literal_debug) + | FEATURE_BIT(debug_frozen_string_literal) ), DEFAULT_FEATURES = ( ~0U @@ -126,7 +128,7 @@ enum { https://github.com/ruby/ruby/blob/trunk/ruby.c#L128 & ~FEATURE_BIT(gems) #endif & ~FEATURE_BIT(frozen_string_literal) - & ~FEATURE_BIT(frozen_string_literal_debug) + & ~FEATURE_BIT(debug_frozen_string_literal) ) }; @@ -780,7 +782,7 @@ static void https://github.com/ruby/ruby/blob/trunk/ruby.c#L782 debug_option(const char *str, int len, void *arg) { #define SET_WHEN_DEBUG(t, bit) SET_WHEN(#bit, t##_BIT(bit), str, len) - SET_WHEN_DEBUG(FEATURE, frozen_string_literal_debug); + SET_WHEN_DEBUG(DEBUG, frozen_string_literal); rb_warn("unknown argument for --debug: `%.*s'", len, str); } @@ -1113,8 +1115,10 @@ proc_options(long argc, char **argv, str https://github.com/ruby/ruby/blob/trunk/ruby.c#L1115 if (s && *s) { ruby_each_words(s, debug_option, &opt->features); } - ruby_debug = Qtrue; - ruby_verbose = Qtrue; + else { + ruby_debug = Qtrue; + ruby_verbose = Qtrue; + } } else if (is_option_with_arg("enable", Qtrue, Qtrue)) { ruby_each_words(s, enable_option, &opt->features); @@ -1501,7 +1505,7 @@ process_options(int argc, char **argv, s https://github.com/ruby/ruby/blob/trunk/ruby.c#L1505 rb_hash_aset((h), ID2SYM(rb_intern_const(#name)), \ ((o)->features & FEATURE_BIT(name) ? Qtrue : Qfalse)); SET_COMPILE_OPTION(option, opt, frozen_string_literal); - SET_COMPILE_OPTION(option, opt, frozen_string_literal_debug); + SET_COMPILE_OPTION(option, opt, debug_frozen_string_literal); rb_funcallv(rb_cISeq, rb_intern_const("compile_option="), 1, &option); #undef SET_COMPILE_OPTION } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/