summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 09:43:52 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-23 09:43:52 (GMT)
commit4a4627fb0d770269f876c711b642b7f7275b22d2 (patch)
treebf6fc088df929e6f1fadf9b6ee6eb16a81ae2632 /eval_intern.h
parenta64801c1e95e127ad47de1d6d8fdb3f3390a9687 (diff)
move "state" to rb_vm_tag.
* vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state". Lifetime of "state" should be same as current tag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
-rw-r--r--eval_intern.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/eval_intern.h b/eval_intern.h
index a9b259a..7a5dfa1 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -131,6 +131,7 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
#define TH_PUSH_TAG(th) do { \
rb_thread_t * const _th = (th); \
struct rb_vm_tag _tag; \
+ _tag.state = TAG_NONE; \
_tag.tag = Qundef; \
_tag.prev = _th->tag;
@@ -156,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->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->tag->state;
+ th->tag->state = TAG_NONE;
return state;
}
@@ -169,7 +170,7 @@ 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;
+ th->tag->state = st;
ruby_longjmp(th->tag->buf, 1);
}