From df2ef48ed770305dfeac5bf59df2802930b45d17 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Wed, 26 Apr 2023 18:26:31 +0200 Subject: try to ninja fix jsc I don't have access to jsc atm --- Source/Modules/javascript.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index a837f6275..fbc7ab455 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -1524,7 +1524,7 @@ void JSCEmitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Ma // process arguments int i = 0; - for (p = parms; p; i++) { + for (p = parms; p;) { String *arg = NewString(""); String *type = Getattr(p, "type"); @@ -1537,19 +1537,24 @@ void JSCEmitter::marshalInputArgs(Node *n, ParmList *parms, Wrapper *wrapper, Ma case Function: if (is_member && !is_static && i == 0) { Printv(arg, "thisObject", 0); + i++; } else { Printf(arg, "argv[%d]", i - startIdx); + i += GetInt(p, "tmap:in:numinputs"); } break; case Setter: if (is_member && !is_static && i == 0) { Printv(arg, "thisObject", 0); + i++; } else { Printv(arg, "value", 0); + i++; } break; case Ctor: Printf(arg, "argv[%d]", i); + i += GetInt(p, "tmap:in:numinputs"); break; default: Printf(stderr, "Illegal MarshallingMode."); -- cgit v1.2.1