summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 17:44:51 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-08 17:44:51 +0000
commit28f5e12c24edda376c863090c09406185373167b (patch)
treed37adb13ec69829960f21d187cbd689d780338eb /vm.c
parent94419c16dc6e34875f923bdf1e72c0c926cd5126 (diff)
* 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
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 3 insertions, 0 deletions
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)
{