From 5c0b9b703c9d1a08d7219b057b809bda4bc89f8a Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 20 May 2013 17:54:07 +0900 Subject: primary mruby fiber implementation --- src/variable.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/variable.c') diff --git a/src/variable.c b/src/variable.c index 9ffc2ac92..2610c5d7a 100644 --- a/src/variable.c +++ b/src/variable.c @@ -579,14 +579,14 @@ mrb_value mrb_vm_iv_get(mrb_state *mrb, mrb_sym sym) { /* get self */ - return mrb_iv_get(mrb, mrb->stack[0], sym); + return mrb_iv_get(mrb, mrb->c->stack[0], sym); } void mrb_vm_iv_set(mrb_state *mrb, mrb_sym sym, mrb_value v) { /* get self */ - mrb_iv_set(mrb, mrb->stack[0], sym, v); + mrb_iv_set(mrb, mrb->c->stack[0], sym, v); } static int @@ -763,9 +763,9 @@ mrb_cv_defined(mrb_state *mrb, mrb_value mod, mrb_sym sym) mrb_value mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym) { - struct RClass *c = mrb->ci->proc->target_class; + struct RClass *c = mrb->c->ci->proc->target_class; - if (!c) c = mrb->ci->target_class; + if (!c) c = mrb->c->ci->target_class; return mrb_mod_cv_get(mrb, c, sym); } @@ -773,9 +773,9 @@ mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym) void mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v) { - struct RClass *c = mrb->ci->proc->target_class; + struct RClass *c = mrb->c->ci->proc->target_class; - if (!c) c = mrb->ci->target_class; + if (!c) c = mrb->c->ci->target_class; while (c) { if (c->iv) { iv_tbl *t = c->iv; @@ -788,7 +788,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v) } c = c->super; } - c = mrb->ci->target_class; + c = mrb->c->ci->target_class; if (!c->iv) { c->iv = iv_new(mrb); } @@ -868,9 +868,9 @@ mrb_const_get(mrb_state *mrb, mrb_value mod, mrb_sym sym) mrb_value mrb_vm_const_get(mrb_state *mrb, mrb_sym sym) { - struct RClass *c = mrb->ci->proc->target_class; + struct RClass *c = mrb->c->ci->proc->target_class; - if (!c) c = mrb->ci->target_class; + if (!c) c = mrb->c->ci->target_class; if (c) { struct RClass *c2; mrb_value v; @@ -900,9 +900,9 @@ mrb_const_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v) void mrb_vm_const_set(mrb_state *mrb, mrb_sym sym, mrb_value v) { - struct RClass *c = mrb->ci->proc->target_class; + struct RClass *c = mrb->c->ci->proc->target_class; - if (!c) c = mrb->ci->target_class; + if (!c) c = mrb->c->ci->target_class; mrb_obj_iv_set(mrb, (struct RObject*)c, sym, v); } -- cgit v1.2.3