diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-08 17:44:51 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-08 17:44:51 +0000 |
commit | 51af3690dd225e1e3bf6f5c687d2e05cd9c85fce (patch) | |
tree | d37adb13ec69829960f21d187cbd689d780338eb /vm_insnhelper.c | |
parent | 735b11cd170935199f7970c039c46176ef7b2c9a (diff) | |
download | ruby-51af3690dd225e1e3bf6f5c687d2e05cd9c85fce.tar.gz |
* 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_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 9359e2726c..8655b85680 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -374,6 +374,7 @@ vm_getspecial(rb_thread_t *th, VALUE *lep, rb_num_t key, rb_num_t type) return val; } +PUREFUNC(static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar)); static rb_callable_method_entry_t * check_method_entry(VALUE obj, int can_be_svar) { @@ -425,6 +426,9 @@ method_entry_cref(rb_callable_method_entry_t *me) } } +#if VM_CHECK_MODE == 0 +PUREFUNC(static rb_cref_t *check_cref(VALUE, int)); +#endif static rb_cref_t * check_cref(VALUE obj, int can_be_svar) { @@ -1925,6 +1929,7 @@ find_refinement(VALUE refinements, VALUE klass) return rb_hash_lookup(refinements, klass); } +PUREFUNC(static rb_control_frame_t * current_method_entry(rb_thread_t *th, rb_control_frame_t *cfp)); static rb_control_frame_t * current_method_entry(rb_thread_t *th, rb_control_frame_t *cfp) { |