diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-11-13 12:41:39 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-11-14 20:35:48 +0900 |
commit | c9ffe751d126a302d0e7e53e645e44084e339dde (patch) | |
tree | 0393401c6f11ee528ef30fdd1d51fc96b7837a9c /parse.y | |
parent | 4d615a0c8f4759ce4f6b96b643ef957837bdf20e (diff) |
delete unused functions
Looking at the list of symbols inside of libruby-static.a, I found
hundreds of functions that are defined, but used from nowhere.
There can be reasons for each of them (e.g. some functions are
specific to some platform, some are useful when debugging, etc).
However it seems the functions deleted here exist for no reason.
This changeset reduces the size of ruby binary from 26,671,456
bytes to 26,592,864 bytes on my machine.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2677
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 37 |
1 files changed, 2 insertions, 35 deletions
@@ -6045,13 +6045,6 @@ parser_compile_string(VALUE vparser, VALUE fname, VALUE s, int line) } rb_ast_t* -rb_compile_string(const char *f, VALUE s, int line) -{ - must_be_ascii_compatible(s); - return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), s, line); -} - -rb_ast_t* 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); @@ -6064,20 +6057,6 @@ rb_parser_compile_string_path(VALUE vparser, VALUE f, VALUE s, int line) return parser_compile_string(vparser, f, s, line); } -rb_ast_t* -rb_compile_cstr(const char *f, const char *s, int len, int line) -{ - VALUE str = rb_str_new(s, len); - return parser_compile_string(rb_parser_new(), rb_filesystem_str_new_cstr(f), str, line); -} - -rb_ast_t* -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); -} - VALUE rb_io_gets_internal(VALUE io); static VALUE @@ -6087,20 +6066,6 @@ lex_io_gets(struct parser_params *p, VALUE io) } rb_ast_t* -rb_compile_file(const char *f, VALUE file, int start) -{ - VALUE vparser = rb_parser_new(); - - return rb_parser_compile_file(vparser, f, file, start); -} - -rb_ast_t* -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); -} - -rb_ast_t* rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE file, int start) { struct parser_params *p; @@ -12472,6 +12437,7 @@ rb_parser_encoding(VALUE vparser) return rb_enc_from_encoding(p->enc); } +#ifdef RIPPER /* * call-seq: * ripper.yydebug -> true or false @@ -12486,6 +12452,7 @@ rb_parser_get_yydebug(VALUE self) TypedData_Get_Struct(self, struct parser_params, &parser_data_type, p); return p->debug ? Qtrue : Qfalse; } +#endif /* * call-seq: |