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

ruby-changes:58029

From: Jeremy <ko1@a...>
Date: Mon, 30 Sep 2019 08:48:37 +0900 (JST)
Subject: [ruby-changes:58029] 6fdd701472 (master): Remove VM_NO_KEYWORDS, replace with RB_NO_KEYWORDS

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

From 6fdd701472af5355562cb2394167b26a4c3a2a97 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Sun, 29 Sep 2019 16:41:00 -0700
Subject: Remove VM_NO_KEYWORDS, replace with RB_NO_KEYWORDS

VM_NO_KEYWORDS was introduced first in vm_core.h, but it is best
to only use a single definition for this.

diff --git a/proc.c b/proc.c
index 91e9f98..667b86a 100644
--- a/proc.c
+++ b/proc.c
@@ -960,7 +960,7 @@ rb_proc_call(VALUE self, VALUE args) https://github.com/ruby/ruby/blob/trunk/proc.c#L960
     GetProcPtr(self, proc);
     vret = rb_vm_invoke_proc(GET_EC(), proc,
 			     check_argc(RARRAY_LEN(args)), RARRAY_CONST_PTR(args),
-                             VM_NO_KEYWORDS, VM_BLOCK_HANDLER_NONE);
+                             RB_NO_KEYWORDS, VM_BLOCK_HANDLER_NONE);
     RB_GC_GUARD(self);
     RB_GC_GUARD(args);
     return vret;
@@ -993,7 +993,7 @@ rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE passed_pr https://github.com/ruby/ruby/blob/trunk/proc.c#L993
     VALUE vret;
     rb_proc_t *proc;
     GetProcPtr(self, proc);
-    vret = rb_vm_invoke_proc(ec, proc, argc, argv, VM_NO_KEYWORDS, proc_to_block_handler(passed_procval));
+    vret = rb_vm_invoke_proc(ec, proc, argc, argv, RB_NO_KEYWORDS, proc_to_block_handler(passed_procval));
     RB_GC_GUARD(self);
     return vret;
 }
diff --git a/vm.c b/vm.c
index a442e9f..e104688 100644
--- a/vm.c
+++ b/vm.c
@@ -1191,7 +1191,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/vm.c#L1191
 vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args)
 {
     return invoke_block_from_c_bh(ec, check_block_handler(ec), 1, &args,
-                                  VM_NO_KEYWORDS, VM_BLOCK_HANDLER_NONE, NULL, FALSE, TRUE);
+                                  RB_NO_KEYWORDS, VM_BLOCK_HANDLER_NONE, NULL, FALSE, TRUE);
 }
 
 ALWAYS_INLINE(static VALUE
diff --git a/vm_args.c b/vm_args.c
index 3e90e8a..92deef5 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -1064,7 +1064,7 @@ vm_to_proc(VALUE proc) https://github.com/ruby/ruby/blob/trunk/vm_args.c#L1064
 	    rb_callable_method_entry_with_refinements(CLASS_OF(proc), idTo_proc, NULL);
 
 	if (me) {
-            b = rb_vm_call0(GET_EC(), proc, idTo_proc, 0, NULL, me, VM_NO_KEYWORDS);
+            b = rb_vm_call0(GET_EC(), proc, idTo_proc, 0, NULL, me, RB_NO_KEYWORDS);
 	}
 	else {
 	    /* NOTE: calling method_missing */
diff --git a/vm_core.h b/vm_core.h
index f1e7443..8eb1555 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1281,7 +1281,6 @@ VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp) https://github.com/ruby/ruby/blob/trunk/vm_core.h#L1281
 
 #define VM_GUARDED_PREV_EP(ep)         GC_GUARDED_PTR(ep)
 #define VM_BLOCK_HANDLER_NONE 0
-#define VM_NO_KEYWORDS 0
 
 static inline int
 VM_ENV_LOCAL_P(const VALUE *ep)
diff --git a/vm_eval.c b/vm_eval.c
index 04a1315..f6a1cc0 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -267,7 +267,7 @@ rb_adjust_argv_kw_splat(int *argc, const VALUE **argv, int *kw_splat) https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L267
 VALUE
 rb_vm_call(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me)
 {
-    return rb_vm_call0(ec, recv, id, argc, argv, me, VM_NO_KEYWORDS);
+    return rb_vm_call0(ec, recv, id, argc, argv, me, RB_NO_KEYWORDS);
 }
 
 MJIT_FUNC_EXPORTED VALUE
@@ -371,7 +371,7 @@ rb_call0(rb_execution_context_t *ec, https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L371
     const rb_callable_method_entry_t *me;
     enum method_missing_reason call_status;
     call_type scope = call_scope;
-    int kw_splat = VM_NO_KEYWORDS;
+    int kw_splat = RB_NO_KEYWORDS;
 
     switch(scope) {
       case(CALL_PUBLIC_KW):
@@ -1012,7 +1012,7 @@ rb_funcallv_with_cc(struct rb_call_cache_and_mid *cc, VALUE recv, ID mid, int ar https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1012
                     Qundef,
                     recv,
                     argc,
-                    VM_NO_KEYWORDS,
+                    RB_NO_KEYWORDS,
                 },
                 &ci,
                 &cc->cc,
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 4375a48..54142b8 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1625,7 +1625,7 @@ check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_che https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1625
 	const rb_callable_method_entry_t *me =
 	    rb_callable_method_entry_with_refinements(CLASS_OF(pattern), idEqq, NULL);
 	if (me) {
-            return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, VM_NO_KEYWORDS);
+            return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, RB_NO_KEYWORDS);
 	}
 	else {
 	    /* fallback to funcall (e.g. method_missing) */
-- 
cgit v0.10.2


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

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