summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-06 12:28:09 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-06 12:28:09 +0000
commita2e025a7d05047a75c749f64ea7819a4540bb3d3 (patch)
tree15ff527ef2510581d4f8f2129e6adee597c65453 /ChangeLog
parentf534bc2ed9777a9a9cee2c364003e9c6589fd3d0 (diff)
introduce rb_autoload_str to replace rb_autoload
rb_autoload_str may be safer by preventing premature GC. It can also be more efficient by passing a pre-frozen string that can be deduped using rb_fstring. Common autoload callers (e.g. rubygems, rdoc) already use string literals as the file argument. There seems to be no reason to expose rb_autoload_str to the public C API since autoload is not performance-critical. Applications may declare autoloads in Ruby code or via rb_funcall; so merely deprecate rb_autoload without exposing rb_autoload_str to new users. Running: valgrind -v ruby -rrdoc -rubygems -e exit shows a minor memory reduction (32-bit userspace) before: in use at exit: 1,600,621 bytes in 28,819 blocks total heap usage: 55,786 allocs, 26,967 frees, 6,693,790 bytes allocated after: in use at exit: 1,599,778 bytes in 28,789 blocks total heap usage: 55,739 allocs, 26,950 frees, 6,692,973 bytes allocated * include/ruby/intern.h (rb_autoload): deprecate * internal.h (rb_autoload_str): declare * load.c (rb_mod_autoload): use rb_autoload_str * variable.c (rb_autoload): become compatibility wrapper (rb_autoload_str): hoisted out from old rb_autoload [ruby-core:71369] [Feature #11664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog9
1 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 538aeb2efd..745c288aad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Dec 6 19:52:31 2015 Eric Wong <e@80x24.org>
+
+ * include/ruby/intern.h (rb_autoload): deprecate
+ * internal.h (rb_autoload_str): declare
+ * load.c (rb_mod_autoload): use rb_autoload_str
+ * variable.c (rb_autoload): become compatibility wrapper
+ (rb_autoload_str): hoisted out from old rb_autoload
+ [ruby-core:71369] [Feature #11664]
+
Sun Dec 6 19:02:55 2015 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* configure.in: add missing x.