[#81999] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — ko1@...
Issue #13737 has been updated by ko1 (Koichi Sasada).
4 messages
2017/07/11
[#82005] [Ruby trunk Bug#13737] "can't modify frozen String" when installing bundled gems — nobu@...
Issue #13737 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/07/12
[#82102] Re: register_fstring_tainted:FL_TEST_RAW(str, RSTRING_FSTR) — Eric Wong <normalperson@...>
Koichi Sasada <ko1@atdot.net> wrote:
4 messages
2017/07/18
[#82151] [Ruby trunk Feature#13637] [PATCH] tool/runruby.rb: test with smallest possible machine stack — Rei.Odaira@...
Issue #13637 has been updated by ReiOdaira (Rei Odaira).
3 messages
2017/07/24
[ruby-core:82027] Re: [Ruby trunk Feature#13715] [PATCH] avoid garbage from Symbol#to_s in interpolation
From:
Eric Wong <normalperson@...>
Date:
2017-07-13 08:10:09 UTC
List:
ruby-core #82027
ko1@atdot.net wrote:
> > VALUE rb_vm_call0_body(rb_thread_t *th, struct rb_calling_info *calling,
>
> You don't need to expose `vm_call0_body()` because ` vm_eval.c` and ` vm_insnhelper.c` are included in `vm.c`.
Ah, thanks. I just added a prototype for vm_call0_body.
> ```
> if (RB_TYPE_P(recv, T_SYMBOL)) {
> vm_search_method(ci, cc, recv);
> ```
>
> It seems we can use `vm_method_cfunc_is()`.
Right, I expanded the function in my original patch it since I
wanted to make it obvious that cc is populated regardless of
function match. I am using a comment instead, now.
> ```
> calling.block_handler = VM_BLOCK_HANDLER_NONE;
> calling.argc = 0;
> calling.recv = recv;
> val = rb_vm_call0_body(th, &calling, ci, cc, 0);
> return RB_TYPE_P(val, T_STRING) ? val : rb_any_to_s(recv);
> ```
>
> How about to call `rb_obj_as_string()` directly? I understand that you want to reuse method search results, but code will be simplified.
I think the >10% improvement for non-symbol dstr benchmarks
is worth the complexity, especially since we populate cc for
vm_method_cfunc_is anyways.
> Or make new function to call method with given ci, cc?
I'm not sure what you mean, vm_call0_body is insufficient?
Anyways, v2 patch here:
https://80x24.org/spew/20170713075445.25252-1-e@80x24.org/raw
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>