Commit 8a902642 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #881 from masamitsu-murase/make_op_assign_faster

Make OP_ASGN faster.
parents a1f19dbd b55c6c55
......@@ -1492,6 +1492,12 @@ codegen(codegen_scope *s, node *tree, int val)
else if (len == 1 && name[0] == '-') {
genop_peep(s, MKOP_ABC(OP_SUB, cursp(), idx, 1), val);
}
else if (len == 1 && name[0] == '*') {
genop(s, MKOP_ABC(OP_MUL, cursp(), idx, 1));
}
else if (len == 1 && name[0] == '/') {
genop(s, MKOP_ABC(OP_DIV, cursp(), idx, 1));
}
else if (len == 1 && name[0] == '<') {
genop(s, MKOP_ABC(OP_LT, cursp(), idx, 1));
}
......
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