[前][次][番号順一覧][スレッド一覧]

ruby-changes:61625

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 9 Jun 2020 09:53:24 +0900 (JST)
Subject: [ruby-changes:61625] fb3f1f95e8 (master): vm_call_refined: no call vm_cc_fill

https://git.ruby-lang.org/ruby.git/commit/?id=fb3f1f95e8

From fb3f1f95e88218fed75593af4058bb8e65a7ffb7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Mon, 1 Jun 2020 14:16:55 +0900
Subject: vm_call_refined: no call vm_cc_fill

This changeset reduces the generated binary of vm_call_method_each_type
from 2,442 bytes to 2,378 bytes on my machine, accroding to nm(1).

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index c4d12aa..9a97c7d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3042,12 +3042,10 @@ vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_c https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3042
     const rb_callable_method_entry_t *cme = search_refined_method(ec, cfp, cd);
 
     if (cme != NULL) {
-        struct rb_callcache cc_body;
-        struct rb_call_data cd_body = {
+        return vm_call_method(ec, cfp, calling, &(struct rb_call_data) {
             .ci = cd->ci,
-            .cc = vm_cc_fill(&cc_body, Qundef, cme, 0),
-        };
-        return vm_call_method(ec, cfp, calling, &cd_body);
+            .cc = &VM_CC_ON_STACK(Qundef, vm_call_general, { 0 }, cme),
+        });
     }
     else {
         return vm_call_method_nome(ec, cfp, calling, cd);
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]