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

ruby-changes:49988

From: hsbt <ko1@a...>
Date: Tue, 30 Jan 2018 14:43:49 +0900 (JST)
Subject: [ruby-changes:49988] hsbt:r62106 (trunk): ia64: update ia64-specific code to use execution context

hsbt	2018-01-30 14:43:42 +0900 (Tue, 30 Jan 2018)

  New Revision: 62106

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

  Log:
    ia64: update ia64-specific code to use execution context
    
    This change follows commit 837fd5e494731d7d44786f29e7d6e8c27029806f
    in '#ifdef __ia64' branches.
    
    Noticed as a build failure by John Paul Adrian Glaubitz:
    
    ```
      cont.c:502:50: error: 'rb_thread_t {aka struct rb_thread_struct}'
        has no member named 'machine'
           size = cont->machine.register_stack_size =
               th->machine.register_stack_end - th->machine.register_stack_start;
                   ^~
    ```
    
    The change is trivial: update 'th->machine' usage to 'th->ec->machine'.
    Signed-off-by: Sergei Trofimovich <slyfox@g...>

  Modified files:
    trunk/cont.c
    trunk/thread.c
Index: cont.c
===================================================================
--- cont.c	(revision 62105)
+++ cont.c	(revision 62106)
@@ -475,7 +475,7 @@ cont_save_machine_stack(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/cont.c#L475
 
     SET_MACHINE_STACK_END(&th->ec->machine.stack_end);
 #ifdef __ia64
-    th->machine.register_stack_end = rb_ia64_bsp();
+    th->ec->machine.register_stack_end = rb_ia64_bsp();
 #endif
 
     if (th->ec->machine.stack_start > th->ec->machine.stack_end) {
@@ -499,8 +499,8 @@ cont_save_machine_stack(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/cont.c#L499
 
 #ifdef __ia64
     rb_ia64_flushrs();
-    size = cont->machine.register_stack_size = th->machine.register_stack_end - th->machine.register_stack_start;
-    cont->machine.register_stack_src = th->machine.register_stack_start;
+    size = cont->machine.register_stack_size = th->ec->machine.register_stack_end - th->ec->machine.register_stack_start;
+    cont->machine.register_stack_src = th->ec->machine.register_stack_start;
     if (cont->machine.register_stack) {
 	REALLOC_N(cont->machine.register_stack, VALUE, size);
     }
Index: thread.c
===================================================================
--- thread.c	(revision 62105)
+++ thread.c	(revision 62106)
@@ -133,7 +133,7 @@ static inline void blocking_region_end(r https://github.com/ruby/ruby/blob/trunk/thread.c#L133
 
 #ifdef __ia64
 #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th)          \
-    do{(th)->machine.register_stack_end = rb_ia64_bsp();}while(0)
+    do{(th)->ec->machine.register_stack_end = rb_ia64_bsp();}while(0)
 #else
 #define RB_GC_SAVE_MACHINE_REGISTER_STACK(th)
 #endif

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

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