aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-26 06:23:47 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-26 06:23:47 +0000
commit1282a4a89500f3c45f0cd56623d536f40abe9bb6 (patch)
tree949c6c2a2ed80f61fc9bc7e6a386fbb915b2cc48 /compile.c
parentf4ca0739ecf00e9c50aaca55e0ecc5e33dd49284 (diff)
downloadruby-1282a4a89500f3c45f0cd56623d536f40abe9bb6.tar.gz
fstring early for internal iseq
All of the strings created here eventually get converted to fstrings when they are frozen into the iseq. Prepare the fstring early so we may reduce a one or two objects. This is a very minor change, mainly for the '<main>' dedupe. * compile.c (caller_location): use rb_fstring_cstr for "<compiled>" (it is converted to fstring anyways inside rb_iseq_new_with_opt) * iseq.c (iseqw_s_compile): ditto * iseq.c (rb_iseq_new_main): use rb_fstring_cstr for "<main>" * vm.c (Init_VM): ditto, share with with above * iseq.c (iseqw_s_compile_file): rb_fstring before rb_io_t->pathv share "<main>" with above * vm.c (rb_binding_add_dynavars): fstring "<temp>" immediately git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index ea9b4905ad..aee1b4ed93 100644
--- a/compile.c
+++ b/compile.c
@@ -6748,7 +6748,7 @@ caller_location(VALUE *path, VALUE *absolute_path)
return line;
}
else {
- *path = rb_str_new2("<compiled>");
+ *path = rb_fstring_cstr("<compiled>");
*absolute_path = *path;
return 1;
}