aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0f27c9ee23..b6059a4554 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -774,7 +774,7 @@ vm_search_const_defined_class(const VALUE cbase, ID id)
#define USE_IC_FOR_IVAR 1
#endif
-static inline VALUE
+static VALUE
vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
{
#if USE_IC_FOR_IVAR
@@ -824,7 +824,7 @@ vm_getivar(VALUE obj, ID id, IC ic, struct rb_call_cache *cc, int is_attr)
return rb_ivar_get(obj, id);
}
-static inline VALUE
+static VALUE
vm_setivar(VALUE obj, ID id, VALUE val, IC ic, struct rb_call_cache *cc, int is_attr)
{
#if USE_IC_FOR_IVAR
@@ -1733,17 +1733,16 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp, struct rb_calling_in
static VALUE
vm_call_ivar(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
{
- VALUE val = vm_getivar(calling->recv, cc->me->def->body.attr.id, NULL, cc, 1);
cfp->sp -= 1;
- return val;
+ return vm_getivar(calling->recv, cc->me->def->body.attr.id, NULL, cc, 1);
}
static VALUE
vm_call_attrset(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
{
- VALUE val = vm_setivar(calling->recv, cc->me->def->body.attr.id, *(cfp->sp - 1), NULL, cc, 1);
+ VALUE val = *(cfp->sp - 1);
cfp->sp -= 2;
- return val;
+ return vm_setivar(calling->recv, cc->me->def->body.attr.id, val, NULL, cc, 1);
}
static inline VALUE