From 28f5e12c24edda376c863090c09406185373167b Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 8 May 2016 17:44:51 +0000 Subject: * configure.in: check function attirbute const and pure, and define CONSTFUNC and PUREFUNC if available. Note that I don't add those options as default because it still shows many false-positive (it seems not to consider longjmp). * vm_eval.c (stack_check): get rb_thread_t* as an argument to avoid duplicate call of GET_THREAD(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index edc3f20602..907eddc774 100644 --- a/vm.c +++ b/vm.c @@ -25,6 +25,7 @@ VALUE rb_str_concat_literals(size_t, const VALUE*); +PUREFUNC(static inline VALUE *VM_EP_LEP(VALUE *)); static inline VALUE * VM_EP_LEP(VALUE *ep) { @@ -60,6 +61,7 @@ rb_vm_ep_local_ep(VALUE *ep) return VM_EP_LEP(ep); } +PUREFUNC(static inline VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp)); static inline VALUE * VM_CF_LEP(const rb_control_frame_t * const cfp) { @@ -72,6 +74,7 @@ VM_CF_PREV_EP(const rb_control_frame_t * const cfp) return VM_EP_PREV_EP(cfp->ep); } +PUREFUNC(static inline rb_block_t *VM_CF_BLOCK_PTR(const rb_control_frame_t * const cfp)); static inline rb_block_t * VM_CF_BLOCK_PTR(const rb_control_frame_t * const cfp) { -- cgit v1.2.3