summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-12-06 15:41:21 +0900
committerKoichi Sasada <ko1@atdot.net>2020-12-07 08:28:36 +0900
commit344ec26a99e09c2d2f756fa6384e75ffa48f415f (patch)
tree71aeb66c03bad047e36de3b7a5ab74962139f789 /internal
parent59ddb88da6bf483eeec7b85b8a85cf3719edf440 (diff)
tuning trial: newobj with current ec
Passing current ec can improve performance of newobj. This patch tries it for Array and String literals ([] and '').
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3842
Diffstat (limited to 'internal')
-rw-r--r--internal/array.h3
-rw-r--r--internal/string.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/internal/array.h b/internal/array.h
index a7bf6d3868..44c0efbbc1 100644
--- a/internal/array.h
+++ b/internal/array.h
@@ -48,6 +48,9 @@ VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
VALUE rb_check_to_array(VALUE ary);
VALUE rb_ary_behead(VALUE, long);
VALUE rb_ary_aref1(VALUE ary, VALUE i);
+
+struct rb_execution_context_struct;
+VALUE rb_ec_ary_new_from_values(struct rb_execution_context_struct *ec, long n, const VALUE *elts);
MJIT_SYMBOL_EXPORT_END
static inline VALUE
diff --git a/internal/string.h b/internal/string.h
index 091035d92c..8907a1a6e6 100644
--- a/internal/string.h
+++ b/internal/string.h
@@ -69,6 +69,9 @@ VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
VALUE rb_str_eql(VALUE str1, VALUE str2);
VALUE rb_id_quote_unprintable(ID);
VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
+
+struct rb_execution_context_struct;
+VALUE rb_ec_str_resurrect(struct rb_execution_context_struct *ec, VALUE str);
MJIT_SYMBOL_EXPORT_END
#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))