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

ruby-changes:43361

From: nobu <ko1@a...>
Date: Sat, 18 Jun 2016 10:50:51 +0900 (JST)
Subject: [ruby-changes:43361] nobu:r55435 (trunk): Unnecessary volatile

nobu	2016-06-18 10:50:46 +0900 (Sat, 18 Jun 2016)

  New Revision: 55435

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

  Log:
    Unnecessary volatile
    
    * vm_eval.c (rb_yield_splat, eval_string_with_cref): remove
      unnecessary volatile outside PUSH_TAG/POP_TAG.

  Modified files:
    trunk/vm_eval.c
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 55434)
+++ vm_eval.c	(revision 55435)
@@ -1068,7 +1068,7 @@ VALUE https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1068
 rb_yield_splat(VALUE values)
 {
     VALUE tmp = rb_check_array_type(values);
-    volatile VALUE v;
+    VALUE v;
     if (NIL_P(tmp)) {
         rb_raise(rb_eArgError, "not an array");
     }
@@ -1298,11 +1298,8 @@ eval_string_with_cref(VALUE self, VALUE https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1298
     rb_thread_t *th = GET_THREAD();
     rb_env_t *env = NULL;
     rb_block_t block, *base_block;
-    volatile VALUE file;
-    volatile int line;
-
-    file = filename ? filename : rb_source_location(&lineno);
-    line = lineno;
+    VALUE file = filename ? filename : rb_source_location(&lineno);
+    int line = lineno;
 
     {
 	rb_cref_t *cref = cref_arg;

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

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