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

ruby-changes:48395

From: ko1 <ko1@a...>
Date: Sat, 28 Oct 2017 19:55:40 +0900 (JST)
Subject: [ruby-changes:48395] ko1:r60509 (trunk): `th` -> `ec` for some functions.

ko1	2017-10-28 19:55:35 +0900 (Sat, 28 Oct 2017)

  New Revision: 60509

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60509

  Log:
    `th` -> `ec` for some functions.
    
    * vm.c: `th` -> `ec` for the following functions:
      * vm_normal_frame
      * vm_cfp_svar_get
      * vm_cfp_svar_set

  Modified files:
    trunk/vm.c
Index: vm.c
===================================================================
--- vm.c	(revision 60508)
+++ vm.c	(revision 60509)
@@ -1189,11 +1189,11 @@ rb_vm_invoke_proc(rb_execution_context_t https://github.com/ruby/ruby/blob/trunk/vm.c#L1189
 /* special variable */
 
 static rb_control_frame_t *
-vm_normal_frame(rb_thread_t *th, rb_control_frame_t *cfp)
+vm_normal_frame(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
 {
     while (cfp->pc == 0) {
 	cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
-	if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th->ec, cfp)) {
+	if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
 	    return 0;
 	}
     }
@@ -1201,31 +1201,31 @@ vm_normal_frame(rb_thread_t *th, rb_cont https://github.com/ruby/ruby/blob/trunk/vm.c#L1201
 }
 
 static VALUE
-vm_cfp_svar_get(rb_thread_t *th, rb_control_frame_t *cfp, VALUE key)
+vm_cfp_svar_get(const rb_execution_context_t *ec, rb_control_frame_t *cfp, VALUE key)
 {
-    cfp = vm_normal_frame(th, cfp);
-    return lep_svar_get(th->ec, cfp ? VM_CF_LEP(cfp) : 0, key);
+    cfp = vm_normal_frame(ec, cfp);
+    return lep_svar_get(ec, cfp ? VM_CF_LEP(cfp) : 0, key);
 }
 
 static void
-vm_cfp_svar_set(rb_thread_t *th, rb_control_frame_t *cfp, VALUE key, const VALUE val)
+vm_cfp_svar_set(const rb_execution_context_t *ec, rb_control_frame_t *cfp, VALUE key, const VALUE val)
 {
-    cfp = vm_normal_frame(th, cfp);
-    lep_svar_set(th->ec, cfp ? VM_CF_LEP(cfp) : 0, key, val);
+    cfp = vm_normal_frame(ec, cfp);
+    lep_svar_set(ec, cfp ? VM_CF_LEP(cfp) : 0, key, val);
 }
 
 static VALUE
 vm_svar_get(VALUE key)
 {
-    rb_thread_t *th = GET_THREAD();
-    return vm_cfp_svar_get(th, th->ec->cfp, key);
+    const rb_execution_context_t *ec = GET_EC();
+    return vm_cfp_svar_get(ec, ec->cfp, key);
 }
 
 static void
 vm_svar_set(VALUE key, VALUE val)
 {
-    rb_thread_t *th = GET_THREAD();
-    vm_cfp_svar_set(th, th->ec->cfp, key, val);
+    const rb_execution_context_t *ec = GET_EC();
+    vm_cfp_svar_set(ec, ec->cfp, key, val);
 }
 
 VALUE

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

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