summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--compile.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b7a23bc1a..b19a9d2115 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Jul 7 16:47:30 2015 Eric Wong <e@80x24.org>
+
+ * compile.c (COMPILE_ERROR): reduce GET_THREAD() calls
+
Tue Jul 7 16:39:04 2015 Eric Wong <e@80x24.org>
* random.c (fill_random_bytes_syscall): return -1 for error
diff --git a/compile.c b/compile.c
index 6757ea3595..3249e9f2af 100644
--- a/compile.c
+++ b/compile.c
@@ -287,12 +287,13 @@ r_value(VALUE value)
/* error */
#define COMPILE_ERROR(strs) \
{ \
- VALUE tmp = GET_THREAD()->errinfo; \
+ rb_thread_t *th = GET_THREAD(); \
+ VALUE tmp = th->errinfo; \
if (compile_debug) rb_compile_bug strs; \
- GET_THREAD()->errinfo = iseq->compile_data->err_info; \
+ th->errinfo = iseq->compile_data->err_info; \
rb_compile_error strs; \
- RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, GET_THREAD()->errinfo); \
- GET_THREAD()->errinfo = tmp; \
+ RB_OBJ_WRITE(iseq->self, &iseq->compile_data->err_info, th->errinfo); \
+ th->errinfo = tmp; \
ret = 0; \
break; \
}