From c9ffe751d126a302d0e7e53e645e44084e339dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 13 Nov 2019 12:41:39 +0900 Subject: 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. --- variable.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index b0f87923d4..afa633151d 100644 --- a/variable.c +++ b/variable.c @@ -2418,12 +2418,6 @@ rb_public_const_get_from(VALUE klass, ID id) return rb_const_get_0(klass, id, TRUE, TRUE, TRUE); } -VALUE -rb_public_const_get(VALUE klass, ID id) -{ - return rb_const_get_0(klass, id, FALSE, TRUE, TRUE); -} - MJIT_FUNC_EXPORTED VALUE rb_public_const_get_at(VALUE klass, ID id) { @@ -2476,12 +2470,6 @@ rb_const_location(VALUE klass, ID id, int exclude, int recurse, int visibility) return rb_const_location_from(rb_cObject, id, FALSE, recurse, visibility); } -VALUE -rb_const_source_location_from(VALUE klass, ID id) -{ - return rb_const_location(klass, id, TRUE, TRUE, FALSE); -} - VALUE rb_const_source_location(VALUE klass, ID id) { @@ -2725,18 +2713,6 @@ rb_public_const_defined_from(VALUE klass, ID id) return rb_const_defined_0(klass, id, TRUE, TRUE, TRUE); } -int -rb_public_const_defined(VALUE klass, ID id) -{ - return rb_const_defined_0(klass, id, FALSE, TRUE, TRUE); -} - -int -rb_public_const_defined_at(VALUE klass, ID id) -{ - return rb_const_defined_0(klass, id, TRUE, FALSE, TRUE); -} - static void check_before_mod_set(VALUE klass, ID id, VALUE val, const char *dest) { -- cgit v1.2.3