/** Only used for inline- and tail-calls. */ private static void pushArgs( LambdaExp lexp, Expression[] args, int[] incValues, Compilation comp) { Declaration param = lexp.firstDecl(); int args_length = args.length; for (int i = 0; i < args_length; ++i) { Expression arg = args[i]; if (param.ignorable()) arg.compile(comp, Target.Ignore); else if (incValues != null && (incValues[i] = SetExp.canUseInc(arg, param)) != SetExp.BAD_SHORT) ; else arg.compileWithPosition(comp, StackTarget.getInstance(param.getType())); param = param.nextDecl(); } }
private static void popParams(CodeAttr code, LambdaExp lexp, int[] incValues, boolean toArray) { Variable vars = lexp.getVarScope().firstVar(); Declaration decls = lexp.firstDecl(); if (vars != null && vars.getName() == "this") vars = vars.nextVar(); if (vars != null && vars.getName() == "$ctx") vars = vars.nextVar(); if (vars != null && vars.getName() == "argsArray") { if (toArray) { popParams(code, 0, 1, null, decls, vars); return; } vars = vars.nextVar(); } popParams(code, 0, lexp.min_args, incValues, decls, vars); }