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

ruby-changes:48360

From: ko1 <ko1@a...>
Date: Fri, 27 Oct 2017 14:33:38 +0900 (JST)
Subject: [ruby-changes:48360] ko1:r60474 (trunk): `ec` -> `th`

ko1	2017-10-27 14:33:33 +0900 (Fri, 27 Oct 2017)

  New Revision: 60474

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

  Log:
    `ec` -> `th`
    
    * vm_exec.h (VM_SP_CNT): accepts `ec` instead of `th`.
    
    * vm_insnhelper.c (vm_stack_consistency_error): ditto.

  Modified files:
    trunk/insns.def
    trunk/vm_exec.h
    trunk/vm_insnhelper.c
Index: insns.def
===================================================================
--- insns.def	(revision 60473)
+++ insns.def	(revision 60474)
@@ -990,7 +990,7 @@ leave https://github.com/ruby/ruby/blob/trunk/insns.def#L990
     if (OPT_CHECKED_RUN) {
 	const VALUE *const bp = vm_base_ptr(reg_cfp);
 	if (reg_cfp->sp != bp) {
-	    vm_stack_consistency_error(th, reg_cfp, bp);
+	    vm_stack_consistency_error(th->ec, reg_cfp, bp);
 	}
     }
 
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 60473)
+++ vm_insnhelper.c	(revision 60474)
@@ -3326,16 +3326,16 @@ vm_case_dispatch(CDHASH hash, OFFSET els https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L3326
 }
 
 NORETURN(static void
-	 vm_stack_consistency_error(rb_thread_t *,
+	 vm_stack_consistency_error(const rb_execution_context_t *ec,
 				    const rb_control_frame_t *,
 				    const VALUE *));
 static void
-vm_stack_consistency_error(rb_thread_t *th,
+vm_stack_consistency_error(const rb_execution_context_t *ec,
 			   const rb_control_frame_t *cfp,
 			   const VALUE *bp)
 {
-    const ptrdiff_t nsp = VM_SP_CNT(th, cfp->sp);
-    const ptrdiff_t nbp = VM_SP_CNT(th, bp);
+    const ptrdiff_t nsp = VM_SP_CNT(ec, cfp->sp);
+    const ptrdiff_t nbp = VM_SP_CNT(ec, bp);
     static const char stack_consistency_error[] =
 	"Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")";
 #if defined RUBY_DEVEL
Index: vm_exec.h
===================================================================
--- vm_exec.h	(revision 60473)
+++ vm_exec.h	(revision 60474)
@@ -157,7 +157,7 @@ default:                        \ https://github.com/ruby/ruby/blob/trunk/vm_exec.h#L157
 
 #endif
 
-#define VM_SP_CNT(th, sp) ((sp) - (th)->ec->vm_stack)
+#define VM_SP_CNT(ec, sp) ((sp) - (ec)->vm_stack)
 
 #if OPT_CALL_THREADED_CODE
 #define THROW_EXCEPTION(exc) do { \

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

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