From e8ba0b7b0437fbb62c09d2fb2cbf83aed2df6a65 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 10 Oct 2015 06:34:24 +0000 Subject: * import a github pull request https://github.com/ruby/ruby/pull/1050 by Kazuho Oku . This pull request has the following commits. * gc.c: reduce # of args to 6 (max. of register args on x86-64) so that the `newobj_of_slowpass` can be called via TCO. * gc.c (newobj_of), string.c (str_duplicate): for performance, the hot functions must be inlined. * gc.c: for performance, preceding arguments of `.*newobj_of.*` must be same, so that the arg registers can be reused in case of TCO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 13f4ce4e0d..fac00856b3 100644 --- a/string.c +++ b/string.c @@ -1233,7 +1233,7 @@ str_replace(VALUE str, VALUE str2) return str; } -static VALUE +static inline VALUE str_duplicate(VALUE klass, VALUE str) { enum {embed_size = RSTRING_EMBED_LEN_MAX + 1}; -- cgit v1.2.3