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

ruby-changes:58450

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Sat, 26 Oct 2019 15:35:36 +0900 (JST)
Subject: [ruby-changes:58450] 5aacb30455 (master): refactor assign variables

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

From 5aacb304551aa29f86e4c59bef5136bf9d20726a 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: Sat, 26 Oct 2019 15:33:16 +0900
Subject: refactor assign variables

For readability.  Requested by ko1.

See: https://github.com/ruby/ruby/commit/356e203a3acd4d3d20ba12f956fd22e17b6363e9#r35661401

diff --git a/vm_eval.c b/vm_eval.c
index bad5170..230b96b 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -45,14 +45,11 @@ static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *c https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L45
 MJIT_FUNC_EXPORTED VALUE
 rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat)
 {
-    return vm_call0_body(
-        ec,
-        &(struct rb_calling_info) {
-            Qundef, recv, argc, kw_splat, },
-        &(struct rb_call_data) {
-            { 0, 0, me, me->def, vm_call_general, { 0, }, },
-            { id, (kw_splat ? VM_CALL_KW_SPLAT : 0), argc, }, },
-        argv);
+    struct rb_calling_info calling = { Qundef, recv, argc, kw_splat, };
+    struct rb_call_info ci = { id, (kw_splat ? VM_CALL_KW_SPLAT : 0), argc, };
+    struct rb_call_cache cc = { 0, 0, me, me->def, vm_call_general, { 0, }, };
+    struct rb_call_data cd = { cc, ci, };
+    return vm_call0_body(ec, &calling, &cd, argv);
 }
 
 static VALUE
-- 
cgit v0.10.2


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

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