ruby-changes:32769
From: nobu <ko1@a...>
Date: Thu, 6 Feb 2014 00:32:41 +0900 (JST)
Subject: [ruby-changes:32769] nobu:r44848 (trunk): eval_intern.h: use TH_TMPPOP_TAG and TH_REPUSH_TAG
nobu 2014-02-06 00:32:35 +0900 (Thu, 06 Feb 2014) New Revision: 44848 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44848 Log: eval_intern.h: use TH_TMPPOP_TAG and TH_REPUSH_TAG * eval_intern.h (TH_TMPPOP_TAG, TH_REPUSH_TAG): instead of TAG2 names. * eval_intern.h (TH_REPUSH_TAG): suppress unused-value warning. Modified files: trunk/eval_intern.h trunk/vm.c Index: eval_intern.h =================================================================== --- eval_intern.h (revision 44847) +++ eval_intern.h (revision 44848) @@ -120,14 +120,10 @@ extern int select_large_fdset(int, fd_se https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L120 _th->tag = _tag.prev; \ } while (0) -#define TH_POP_TAG2() \ +#define TH_TMPPOP_TAG() \ _th->tag = _tag.prev -#define TH_PUSH_TAG2() (_th->tag = &_tag, 0) - -#define TH_TMPPOP_TAG() TH_POP_TAG2() - -#define TH_REPUSH_TAG() TH_PUSH_TAG2() +#define TH_REPUSH_TAG() (void)(_th->tag = &_tag) #define PUSH_TAG() TH_PUSH_TAG(GET_THREAD()) #define POP_TAG() TH_POP_TAG() @@ -153,7 +149,7 @@ rb_threadptr_tag_jump(rb_thread_t *th, i https://github.com/ruby/ruby/blob/trunk/eval_intern.h#L149 [ISO/IEC 9899:1999] 7.13.1.1 */ #define TH_EXEC_TAG() \ - (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(_th) : TH_PUSH_TAG2()) + (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(_th) : (TH_REPUSH_TAG(), 0)) #define EXEC_TAG() \ TH_EXEC_TAG() Index: vm.c =================================================================== --- vm.c (revision 44847) +++ vm.c (revision 44848) @@ -1543,7 +1543,7 @@ vm_exec(rb_thread_t *th) https://github.com/ruby/ruby/blob/trunk/vm.c#L1543 if (VM_FRAME_TYPE_FINISH_P(th->cfp)) { vm_pop_frame(th); th->errinfo = err; - TH_POP_TAG2(); + TH_TMPPOP_TAG(); JUMP_TAG(state); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/