codegen.c: `limit` check was too restrictive in `gen_values()`.

That can create unnecessary arrays when more than 12 arguments are
given to a method.
parent 0849a288
......@@ -1551,7 +1551,7 @@ gen_values(codegen_scope *s, node *t, int val, int limit)
while (t) {
int is_splat = nint(t->car->car) == NODE_SPLAT;
if (is_splat || n >= limit-1 || cursp() >= slimit) { /* flush stack */
if (is_splat || n > limit || cursp() >= slimit) { /* flush stack */
pop_n(n);
if (first) {
if (n == 0) {
......
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