summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 01:31:15 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 01:31:15 +0000
commit84e6a3d31c08d2302f8592ee07cc3bacb1f47d9d (patch)
tree45a51705f8ca9880fcebe596e4f599f6c7530a53 /vm_insnhelper.c
parent34ff953e37b9a96be57d73bb3c73d8c22c2ac98e (diff)
ec->th for vm_cref_push() and constify.
* vm_insnhelper.c (vm_cref_push): accepts `ec` instead of `th`. * vm_insnhelper.c: consitfy the first parameter (ec): * lep_svar * lep_svar_write * lep_svar_get * lep_svar_set * vm_getspecial and added vm_cref_push. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index de5e4f48b1..6d1b13b807 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -387,7 +387,7 @@ vm_svar_valid_p(VALUE svar)
#endif
static inline struct vm_svar *
-lep_svar(rb_execution_context_t *ec, const VALUE *lep)
+lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
{
VALUE svar;
@@ -404,7 +404,7 @@ lep_svar(rb_execution_context_t *ec, const VALUE *lep)
}
static inline void
-lep_svar_write(rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
+lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
{
VM_ASSERT(vm_svar_valid_p((VALUE)svar));
@@ -417,7 +417,7 @@ lep_svar_write(rb_execution_context_t *ec, const VALUE *lep, const struct vm_sva
}
static VALUE
-lep_svar_get(rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
+lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
{
const struct vm_svar *svar = lep_svar(ec, lep);
@@ -448,7 +448,7 @@ svar_new(VALUE obj)
}
static void
-lep_svar_set(rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
+lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
{
struct vm_svar *svar = lep_svar(ec, lep);
@@ -475,7 +475,7 @@ lep_svar_set(rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE v
}
static inline VALUE
-vm_getspecial(rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
+vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
{
VALUE val;
@@ -734,7 +734,7 @@ rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t
}
static rb_cref_t *
-vm_cref_push(rb_thread_t *th, VALUE klass, const VALUE *ep, int pushed_by_eval)
+vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
{
rb_cref_t *prev_cref = NULL;
@@ -742,7 +742,7 @@ vm_cref_push(rb_thread_t *th, VALUE klass, const VALUE *ep, int pushed_by_eval)
prev_cref = vm_env_cref(ep);
}
else {
- rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th->ec, th->ec->cfp);
+ rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
if (cfp) {
prev_cref = vm_env_cref(cfp->ep);