diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-02 21:14:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 09:17:46 +0900 |
| commit | 5e469d2b924a70617be75b0c765da73497d3927c (patch) | |
| tree | 1643c0bd62a6a1d53a9ca663778fb4781ce9e2c0 | |
| parent | c88fd32713e980abe5613ae06f46d9ceaa0c063b (diff) | |
| download | mruby-5e469d2b924a70617be75b0c765da73497d3927c.tar.gz mruby-5e469d2b924a70617be75b0c765da73497d3927c.zip | |
Remove utility functions: `mrb_vm_iv_{get,set}`.
| -rw-r--r-- | include/mruby/variable.h | 2 | ||||
| -rw-r--r-- | src/variable.c | 14 | ||||
| -rw-r--r-- | src/vm.c | 3 |
3 files changed, 1 insertions, 18 deletions
diff --git a/include/mruby/variable.h b/include/mruby/variable.h index 5fef83faf..a4394fbd3 100644 --- a/include/mruby/variable.h +++ b/include/mruby/variable.h @@ -31,8 +31,6 @@ struct global_entry { mrb_value mrb_vm_special_get(mrb_state*, mrb_sym); void mrb_vm_special_set(mrb_state*, mrb_sym, mrb_value); -mrb_value mrb_vm_iv_get(mrb_state*, mrb_sym); -void mrb_vm_iv_set(mrb_state*, mrb_sym, mrb_value); mrb_value mrb_vm_cv_get(mrb_state*, mrb_sym); void mrb_vm_cv_set(mrb_state*, mrb_sym, mrb_value); mrb_value mrb_vm_const_get(mrb_state*, mrb_sym); diff --git a/src/variable.c b/src/variable.c index cbfdb2f2d..6612c186f 100644 --- a/src/variable.c +++ b/src/variable.c @@ -498,20 +498,6 @@ mrb_iv_remove(mrb_state *mrb, mrb_value obj, mrb_sym sym) return mrb_undef_value(); } -mrb_value -mrb_vm_iv_get(mrb_state *mrb, mrb_sym sym) -{ - /* get self */ - 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->c->stack[0], sym, v); -} - static int iv_i(mrb_state *mrb, mrb_sym sym, mrb_value v, void *p) { @@ -1131,8 +1131,7 @@ RETRY_TRY_BLOCK: } CASE(OP_GETIV, BB) { - mrb_value val = mrb_vm_iv_get(mrb, syms[b]); - regs[a] = val; + regs[a] = mrb_vm_iv_get(mrb, syms[b]); NEXT; } |
