From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: spew@80x24.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D32F868B01B for ; Wed, 5 Aug 2015 22:55:20 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH] rb_parser_compile_*: remove volatile Date: Wed, 5 Aug 2015 22:55:20 +0000 Message-Id: <1438815320-31099-1-git-send-email-e@80x24.org> List-Id: RB_GC_GUARD is sufficient to prevent tail call optimization from making the object invisible from GC. --- node.h | 10 +++++----- parse.y | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/node.h b/node.h index 8ae0205..c639176 100644 --- a/node.h +++ b/node.h @@ -465,11 +465,11 @@ VALUE rb_parser_dump_tree(NODE *node, int comment); 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); diff --git a/parse.y b/parse.y index fe62426..072cda5 100644 --- a/parse.y +++ b/parse.y @@ -5588,7 +5588,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; @@ -5614,13 +5614,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); @@ -5634,7 +5634,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); @@ -5649,19 +5649,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; -- EW