summaryrefslogtreecommitdiff
path: root/eval_intern.h
diff options
context:
space:
mode:
-rw-r--r--eval_intern.h44
1 files changed, 22 insertions, 22 deletions
@@ -128,24 +128,24 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
rb_fiber_start(); \
} while (0)
-#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->ec->tag;
-#define TH_POP_TAG() \
- _th->ec->tag = _tag.prev; \
} while (0)
-#define TH_TMPPOP_TAG() \
- _th->ec->tag = _tag.prev
-#define TH_REPUSH_TAG() (void)(_th->ec->tag = &_tag)
-#define PUSH_TAG() TH_PUSH_TAG(GET_THREAD())
-#define POP_TAG() TH_POP_TAG()
#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8)
# define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var))
@@ -176,34 +176,34 @@ LONG WINAPI rb_w32_stack_overflow_handler(struct _EXCEPTION_POINTERS *);
/* 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->ec->tag->state;
- th->ec->tag->state = TAG_NONE;
return state;
}
-NORETURN(static inline void rb_threadptr_tag_jump(rb_thread_t *, enum ruby_tag_type st));
static inline void
-rb_threadptr_tag_jump(rb_thread_t *th, enum ruby_tag_type st)
{
- th->ec->tag->state = st;
- ruby_longjmp(th->ec->tag->buf, 1);
}
/*
setjmp() in assignment expression rhs is undefined behavior
[ISO/IEC 9899:1999] 7.13.1.1
*/
-#define TH_EXEC_TAG() \
- (ruby_setjmp(_tag.buf) ? rb_threadptr_tag_state(VAR_FROM_MEMORY(_th)) : (TH_REPUSH_TAG(), 0))
#define EXEC_TAG() \
- TH_EXEC_TAG()
-#define TH_JUMP_TAG(th, st) rb_threadptr_tag_jump(th, st)
-#define JUMP_TAG(st) TH_JUMP_TAG(GET_THREAD(), (st))
#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)