aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 20:35:12 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 20:35:12 +0000
commit2c80c9495e4217d8449eb47deedd5adaf6374c0b (patch)
treebe22c66670dd507339b87b36892c74750b6b9758 /parse.y
parent11dde7770d8c9dcbe902e9176c2d2b09f00771d3 (diff)
downloadruby-2c80c9495e4217d8449eb47deedd5adaf6374c0b.tar.gz
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y14
1 files changed, 7 insertions, 7 deletions
diff --git a/parse.y b/parse.y
index 3975e513c3..820ea66f1c 100644
--- a/parse.y
+++ b/parse.y
@@ -5580,7 +5580,7 @@ static const rb_data_type_t parser_data_type;
#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, int line)
}
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 char *s, int len, int line)
}
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, VALUE io)
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;