Commit 7dffeb62 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1612 from h2so5/node-case

fix codegen bug in NODE_CASE
parents d7a34b62 61ac9ff2
...@@ -1409,10 +1409,13 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1409,10 +1409,13 @@ codegen(codegen_scope *s, node *tree, int val)
tree = tree->cdr; tree = tree->cdr;
} }
if (val) { if (val) {
int pos = cursp();
genop(s, MKOP_A(OP_LOADNIL, cursp())); genop(s, MKOP_A(OP_LOADNIL, cursp()));
if (pos3) dispatch_linked(s, pos3);
pop();
genop(s, MKOP_AB(OP_MOVE, cursp(), pos));
push(); push();
} }
if (pos3) dispatch_linked(s, pos3);
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment