ruby-changes:39456
From: normal <ko1@a...>
Date: Wed, 12 Aug 2015 05:35:33 +0900 (JST)
Subject: [ruby-changes:39456] normal:r51537 (trunk): rb_parser_compile_*: remove volatile arg
normal 2015-08-12 05:35:12 +0900 (Wed, 12 Aug 2015) New Revision: 51537 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51537 Log: rb_parser_compile_*: remove volatile arg RB_GC_GUARD is sufficient to prevent tail call optimization from making the object invisible from GC., and we don't need to encourage more volatile usage. * parse.y (rb_parser_compile_cstr): remove volatile arg (rb_parser_compile_string): ditto (rb_parser_compile_file): ditto (rb_parser_compile_string_path): ditto (rb_parser_compile_file_path): ditto [ruby-core:70323] [Misc #11431] Modified files: trunk/ChangeLog trunk/node.h trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 51536) +++ ChangeLog (revision 51537) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 12 05:19:11 2015 Eric Wong <e@8...> + + * parse.y (rb_parser_compile_cstr): remove volatile arg + (rb_parser_compile_string): ditto + (rb_parser_compile_file): ditto + (rb_parser_compile_string_path): ditto + (rb_parser_compile_file_path): ditto + [ruby-core:70323] [Misc #11431] + Tue Aug 11 22:59:57 2015 Tanaka Akira <akr@f...> * numeric.c (Init_Numeric): Fix document for Float::MIN and Index: parse.y =================================================================== --- parse.y (revision 51536) +++ parse.y (revision 51537) @@ -5580,7 +5580,7 @@ static const rb_data_type_t parser_data_ https://github.com/ruby/ruby/blob/trunk/parse.y#L5580 #ifndef RIPPER static NODE* -parser_compile_string(volatile VALUE vparser, VALUE fname, VALUE s, int line) +parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line) { struct parser_params *parser; NODE *node; @@ -5606,13 +5606,13 @@ rb_compile_string(const char *f, VALUE s https://github.com/ruby/ruby/blob/trunk/parse.y#L5606 } NODE* -rb_parser_compile_string(volatile VALUE vparser, const char *f, VALUE s, int line) +rb_parser_compile_string(VALUE vparser, const char *f, VALUE s, int line) { return rb_parser_compile_string_path(vparser, rb_filesystem_str_new_cstr(f), s, line); } NODE* -rb_parser_compile_string_path(volatile VALUE vparser, VALUE f, VALUE s, int line) +rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line) { must_be_ascii_compatible(s); return parser_compile_string(vparser, f, s, line); @@ -5626,7 +5626,7 @@ rb_compile_cstr(const char *f, const cha https://github.com/ruby/ruby/blob/trunk/parse.y#L5626 } NODE* -rb_parser_compile_cstr(volatile VALUE vparser, const char *f, const char *s, int len, int line) +rb_parser_compile_cstr(VALUE vparser, const char *f, const char *s, int len, int line) { VALUE str = rb_str_new(s, len); return parser_compile_string(vparser, rb_filesystem_str_new_cstr(f), str, line); @@ -5641,19 +5641,19 @@ lex_io_gets(struct parser_params *parser https://github.com/ruby/ruby/blob/trunk/parse.y#L5641 NODE* rb_compile_file(const char *f, VALUE file, int start) { - VALUE volatile vparser = rb_parser_new(); + VALUE vparser = rb_parser_new(); return rb_parser_compile_file(vparser, f, file, start); } NODE* -rb_parser_compile_file(volatile VALUE vparser, const char *f, VALUE file, int start) +rb_parser_compile_file(VALUE vparser, const char *f, VALUE file, int start) { return rb_parser_compile_file_path(vparser, rb_filesystem_str_new_cstr(f), file, start); } NODE* -rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE file, int start) +rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start) { struct parser_params *parser; NODE *node; Index: node.h =================================================================== --- node.h (revision 51536) +++ node.h (revision 51537) @@ -465,11 +465,11 @@ VALUE rb_parser_dump_tree(NODE *node, in https://github.com/ruby/ruby/blob/trunk/node.h#L465 NODE *rb_parser_append_print(VALUE, NODE *); NODE *rb_parser_while_loop(VALUE, NODE *, int, int); -NODE *rb_parser_compile_cstr(volatile VALUE, const char*, const char*, int, int); -NODE *rb_parser_compile_string(volatile VALUE, const char*, VALUE, int); -NODE *rb_parser_compile_file(volatile VALUE, const char*, VALUE, int); -NODE *rb_parser_compile_string_path(volatile VALUE vparser, VALUE fname, VALUE src, int line); -NODE *rb_parser_compile_file_path(volatile VALUE vparser, VALUE fname, VALUE input, int line); +NODE *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int); +NODE *rb_parser_compile_string(VALUE, const char*, VALUE, int); +NODE *rb_parser_compile_file(VALUE, const char*, VALUE, int); +NODE *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line); +NODE *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line); NODE *rb_compile_cstr(const char*, const char*, int, int); NODE *rb_compile_string(const char*, VALUE, int); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/