From 1939d097e650a60557eafbd89a6684f4626e0ad5 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 26 Jun 2017 07:56:44 +0000 Subject: move several fields from rb_thread_t to rb_execution_context_t. * vm_core.h (rb_thread_t): move several fields which are copied at cont.c to rb_execution_context_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval_intern.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'eval_intern.h') diff --git a/eval_intern.h b/eval_intern.h index 7a5dfa185c..fb28a31829 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -133,16 +133,16 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *); struct rb_vm_tag _tag; \ _tag.state = TAG_NONE; \ _tag.tag = Qundef; \ - _tag.prev = _th->tag; + _tag.prev = _th->ec.tag; #define TH_POP_TAG() \ - _th->tag = _tag.prev; \ + _th->ec.tag = _tag.prev; \ } while (0) #define TH_TMPPOP_TAG() \ - _th->tag = _tag.prev + _th->ec.tag = _tag.prev -#define TH_REPUSH_TAG() (void)(_th->tag = &_tag) +#define TH_REPUSH_TAG() (void)(_th->ec.tag = &_tag) #define PUSH_TAG() TH_PUSH_TAG(GET_THREAD()) #define POP_TAG() TH_POP_TAG() @@ -157,12 +157,12 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *); # define VAR_NOCLOBBERED(var) var #endif -/* clear th->tag->state, and return the value */ +/* clear th->ec.tag->state, and return the value */ static inline int rb_threadptr_tag_state(rb_thread_t *th) { - enum ruby_tag_type state = th->tag->state; - th->tag->state = TAG_NONE; + enum ruby_tag_type state = th->ec.tag->state; + th->ec.tag->state = TAG_NONE; return state; } @@ -170,8 +170,8 @@ NORETURN(static inline void rb_threadptr_tag_jump(rb_thread_t *, enum ruby_tag_t static inline void rb_threadptr_tag_jump(rb_thread_t *th, enum ruby_tag_type st) { - th->tag->state = st; - ruby_longjmp(th->tag->buf, 1); + th->ec.tag->state = st; + ruby_longjmp(th->ec.tag->buf, 1); } /* @@ -265,10 +265,10 @@ enum { }; int rb_threadptr_set_raised(rb_thread_t *th); int rb_threadptr_reset_raised(rb_thread_t *th); -#define rb_thread_raised_set(th, f) ((th)->raised_flag |= (f)) -#define rb_thread_raised_reset(th, f) ((th)->raised_flag &= ~(f)) -#define rb_thread_raised_p(th, f) (((th)->raised_flag & (f)) != 0) -#define rb_thread_raised_clear(th) ((th)->raised_flag = 0) +#define rb_thread_raised_set(th, f) ((th)->ec.raised_flag |= (f)) +#define rb_thread_raised_reset(th, f) ((th)->ec.raised_flag &= ~(f)) +#define rb_thread_raised_p(th, f) (((th)->ec.raised_flag & (f)) != 0) +#define rb_thread_raised_clear(th) ((th)->ec.raised_flag = 0) int rb_threadptr_stack_check(rb_thread_t *th); VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self); -- cgit v1.2.1