path: root/string.c
diff options
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-10 06:34:24 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-10 06:34:24 (GMT)
commite8ba0b7b0437fbb62c09d2fb2cbf83aed2df6a65 (patch)
treec432ae2cf675aa4ab9c469090b7e2a2792e16b1d /string.c
parent1331f80a1e420a5d0644efb78559e1647e58ffb8 (diff)
* import a github pull request 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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 13f4ce4..fac0085 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};