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

ruby-changes:62174

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 10 Jul 2020 12:24:02 +0900 (JST)
Subject: [ruby-changes:62174] db7f3496dd (master): nobody uses the return value of vm_push_frame

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

From db7f3496dd4485149c68912677f231dc434824b7 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, 6 Jul 2020 11:51:53 +0900
Subject: nobody uses the return value of vm_push_frame

Surprised to see such a waste of time in this super duper hot path.

diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index f2cab2f..c98dfa8 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -287,7 +287,7 @@ vm_check_canary(const rb_execution_context_t *ec, VALUE *sp) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L287
 #define vm_check_frame(a, b, c, d)
 #endif /* VM_CHECK_MODE > 0 */
 
-static inline rb_control_frame_t *
+static void
 vm_push_frame(rb_execution_context_t *ec,
 	      const rb_iseq_t *iseq,
 	      VALUE type,
@@ -370,8 +370,6 @@ vm_push_frame(rb_execution_context_t *ec, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L370
         }
     }
 #endif
-
-    return cfp;
 }
 
 /* return TRUE if the frame is finished */
-- 
cgit v0.10.2


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

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