Check for super using OP_ARGARY; fix
It generates a wasted empty array for each `super` call though.
It should be fixed in the future, if possible.
@@ -1939,9 +1939,19 @@ codegen(codegen_scope *s, node *tree, int val)
case NODE_SUPER:
{
+ codegen_scope *s2 = s;
+ int lv = 0;
int n = 0, noop = 0, sendv = 0;
push(); /* room for receiver */
+ while (!s2->mscope) {
+ lv++;
+ s2 = s2->prev;
+ if (!s2) break;
+ }
+ genop(s, MKOP_ABx(OP_ARGARY, cursp(), (lv & 0xf)));
+ push(); push(); /* ARGARY pushes two values */
+ pop(); pop();
if (tree) {
node *args = tree->car;
if (args) {
