summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-08-05 17:07:43 +0900
committerYukihiro Matsumoto <[email protected]>2012-08-05 17:07:43 +0900
commit7c4bd7fffd66aff4e2c119421f6673323ac777a1 (patch)
tree7e29392ab292ac05053469c6a3b5cb0b6799918d /src
parent472d214a71f69fe25e681d9fea6a04fa12e60fb0 (diff)
downloadmruby-7c4bd7fffd66aff4e2c119421f6673323ac777a1.tar.gz
mruby-7c4bd7fffd66aff4e2c119421f6673323ac777a1.zip
remove OP_MOVE just before OP_RETURN
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index 8d2313314..bf6fd0b3e 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -247,8 +247,7 @@ genop_peep(codegen_scope *s, mrb_code i, int val)
case OP_RETURN:
switch (c0) {
case OP_MOVE:
- s->iseq[s->pc-1] = MKOP_AB(OP_MOVE, 0, GETARG_B(i0));
- genop(s, MKOP_AB(OP_RETURN, 0, OP_R_NORMAL));
+ s->iseq[s->pc-1] = MKOP_AB(OP_RETURN, GETARG_B(i0), OP_R_NORMAL);
return;
case OP_LOADI:
s->iseq[s->pc-1] = MKOP_AsBx(OP_LOADI, 0, GETARG_sBx(i0));