Source/sources/gnu/expr/LambdaExp.java
public void compileAsMethod(Compilation comp) {
        Expression arg;
        if ((this.flags & 128) == 0 && !isAbstract()) {
            this.flags |= 128;
            if (this.primMethods != null) {
                Method save_method = comp.method;
                LambdaExp save_lambda = comp.curLambda;
                comp.curLambda = this;
                boolean isStatic = this.primMethods[0].getStaticFlag();
                int numStubs = this.primMethods.length - 1;
                Type restArgType = restArgType();
                long[] saveDeclFlags = null;
                if (numStubs > 0) {
                    saveDeclFlags = new long[(this.min_args + numStubs)];
                    int k = 0;
                    Declaration decl = firstDecl();
                    while (k < this.min_args + numStubs) {
                        int k2 = k + 1;
                        saveDeclFlags[k] = decl.flags;
                        decl = decl.nextDecl();
                        k = k2;
                    }
                }
                boolean ctxArg = getCallConvention() >= 2;
                for (int i = 0; i <= numStubs; i++) {
                    comp.method = this.primMethods[i];
                    if (i < numStubs) {
                        CodeAttr code = comp.method.startCode();
                        int toCall = i + 1;
                        while (toCall < numStubs && (this.defaultArgs[toCall] instanceof QuoteExp)) {
                            toCall++;
                        }
                        boolean varArgs = toCall == numStubs && restArgType != null;
                        Variable callContextSave = comp.callContextVar;
                        Variable var = code.getArg(0);
                        if (!isStatic) {
                            code.emitPushThis();
                            if (getNeedsClosureEnv()) {
                                this.closureEnv = var;
                            }
                            var = code.getArg(1);
                        }
                        Declaration decl2 = firstDecl();
                        int j = 0;
                        while (j < this.min_args + i) {
                            decl2.flags |= 64;
                            decl2.var = var;
                            code.emitLoad(var);
                            var = var.nextVar();
                            j++;
                            decl2 = decl2.nextDecl();
                        }
                        comp.callContextVar = ctxArg ? var : null;
                        int j2 = i;
                        while (j2 < toCall) {
                            this.defaultArgs[j2].compile(comp, StackTarget.getInstance(decl2.getType()));
                            j2++;
                            decl2 = decl2.nextDecl();
                        }
                        if (varArgs) {
                            String lastTypeName = restArgType.getName();
                            if ("gnu.lists.LList".equals(lastTypeName)) {
                                arg = new QuoteExp(LList.Empty);
                            } else if ("java.lang.Object[]".equals(lastTypeName)) {
                                arg = new QuoteExp(Values.noArgs);
                            } else {
                                throw new Error("unimplemented #!rest type " + lastTypeName);
                            }
                            arg.compile(comp, restArgType);
                        }
                        if (ctxArg) {
                            code.emitLoad(var);
                        }
                        if (isStatic) {
                            code.emitInvokeStatic(this.primMethods[toCall]);
                        } else {
                            code.emitInvokeVirtual(this.primMethods[toCall]);
                        }
                        code.emitReturn();
                        this.closureEnv = null;
                        comp.callContextVar = callContextSave;
                    } else {
                        if (saveDeclFlags != null) {
                            int k3 = 0;
                            Declaration decl3 = firstDecl();
                            while (k3 < this.min_args + numStubs) {
                                int k4 = k3 + 1;
                                decl3.flags = saveDeclFlags[k3];
                                decl3.var = null;
                                decl3 = decl3.nextDecl();
                                k3 = k4;
                            }
                        }
                        comp.method.initCode();
                        allocChildClasses(comp);
                        allocParameters(comp);
                        enterFunction(comp);
                        compileBody(comp);
                        compileEnd(comp);
                        generateApplyMethods(comp);
                    }
                }
                comp.method = save_method;
                comp.curLambda = save_lambda;
            }
        }
    }
/* access modifiers changed from: 0000 */
access modifiers changed from: 0000
access modifiers changed from : 0000
public void compileAsMethod(Compilation comp) {
        Expression arg;
        if ((this.flags & 128) == 0 && !isAbstract()) {
            this.flags |= 128;
            if (this.primMethods != null) {
                Method save_method = comp.method;
                LambdaExp save_lambda = comp.curLambda;
                comp.curLambda = this;
                boolean isStatic = this.primMethods[0].getStaticFlag();
                int numStubs = this.primMethods.length - 1;
                Type restArgType = restArgType();
                long[] saveDeclFlags = null;
                if (numStubs > 0) {
                    saveDeclFlags = new long[(this.min_args + numStubs)];
                    int k = 0;
                    Declaration decl = firstDecl();
                    while (k < this.min_args + numStubs) {
                        int k2 = k + 1;
                        saveDeclFlags[k] = decl.flags;
                        decl = decl.nextDecl();
                        k = k2;
                    }
                }
                boolean ctxArg = getCallConvention() >= 2;
                for (int i = 0; i <= numStubs; i++) {
                    comp.method = this.primMethods[i];
                    if (i < numStubs) {
                        CodeAttr code = comp.method.startCode();
                        int toCall = i + 1;
                        while (toCall < numStubs && (this.defaultArgs[toCall] instanceof QuoteExp)) {
                            toCall++;
                        }
                        boolean varArgs = toCall == numStubs && restArgType != null;
                        Variable callContextSave = comp.callContextVar;
                        Variable var = code.getArg(0);
                        if (!isStatic) {
                            code.emitPushThis();
                            if (getNeedsClosureEnv()) {
                                this.closureEnv = var;
                            }
                            var = code.getArg(1);
                        }
                        Declaration decl2 = firstDecl();
                        int j = 0;
                        while (j < this.min_args + i) {
                            decl2.flags |= 64;
                            decl2.var = var;
                            code.emitLoad(var);
                            var = var.nextVar();
                            j++;
                            decl2 = decl2.nextDecl();
                        }
                        comp.callContextVar = ctxArg ? var : null;
                        int j2 = i;
                        while (j2 < toCall) {
                            this.defaultArgs[j2].compile(comp, StackTarget.getInstance(decl2.getType()));
                            j2++;
                            decl2 = decl2.nextDecl();
                        }
                        if (varArgs) {
                            String lastTypeName = restArgType.getName();
                            if ("gnu.lists.LList".equals(lastTypeName)) {
                                arg = new QuoteExp(LList.Empty);
                            } else if ("java.lang.Object[]".equals(lastTypeName)) {
                                arg = new QuoteExp(Values.noArgs);
                            } else {
                                throw new Error("unimplemented #!rest type " + lastTypeName);
                            }
                            arg.compile(comp, restArgType);
                        }
                        if (ctxArg) {
                            code.emitLoad(var);
                        }
                        if (isStatic) {
                            code.emitInvokeStatic(this.primMethods[toCall]);
                        } else {
                            code.emitInvokeVirtual(this.primMethods[toCall]);
                        }
                        code.emitReturn();
                        this.closureEnv = null;
                        comp.callContextVar = callContextSave;
                    } else {
                        if (saveDeclFlags != null) {
                            int k3 = 0;
                            Declaration decl3 = firstDecl();
                            while (k3 < this.min_args + numStubs) {
                                int k4 = k3 + 1;
                                decl3.flags = saveDeclFlags[k3];
                                decl3.var = null;
                                decl3 = decl3.nextDecl();
                                k3 = k4;
                            }
                        }
                        comp.method.initCode();
                        allocChildClasses(comp);
                        allocParameters(comp);
                        enterFunction(comp);
                        compileBody(comp);
                        compileEnd(comp);
                        generateApplyMethods(comp);
                    }
                }
                comp.method = save_method;
                comp.curLambda = save_lambda;
            }
        }
    }
public void compileAsMethod ( Compilation comp ) { Expression arg ; if ( ( this . flags & 128 ) == 0 && ! isAbstract ( ) ) { this . flags |= 128 ; if ( this . primMethods != null ) { Method save_method = comp . method ; LambdaExp save_lambda = comp . curLambda ; comp . curLambda = this ; boolean isStatic = this . primMethods [ 0 ] . getStaticFlag ( ) ; int numStubs = this . primMethods . length - 1 ; Type restArgType = restArgType ( ) ; long [ ] saveDeclFlags = null ; if ( numStubs > 0 ) { saveDeclFlags = new long [ ( this . min_args + numStubs ) ] ; int k = 0 ; Declaration decl = firstDecl ( ) ; while ( k < this . min_args + numStubs ) { int k2 = k + 1 ; saveDeclFlags [ k ] = decl . flags ; decl = decl . nextDecl ( ) ; k = k2 ; } } boolean ctxArg = getCallConvention ( ) >= 2 ; for ( int i = 0 ; i <= numStubs ; i ++ ) { comp . method = this . primMethods [ i ] ; if ( i < numStubs ) { CodeAttr code = comp . method . startCode ( ) ; int toCall = i + 1 ; while ( toCall < numStubs && ( this . defaultArgs [ toCall ] instanceof QuoteExp ) ) { toCall ++ ; } boolean varArgs = toCall == numStubs && restArgType != null ; Variable callContextSave = comp . callContextVar ; Variable var = code . getArg ( 0 ) ; if ( ! isStatic ) { code . emitPushThis ( ) ; if ( getNeedsClosureEnv ( ) ) { this . closureEnv = var ; } var = code . getArg ( 1 ) ; } Declaration decl2 = firstDecl ( ) ; int j = 0 ; while ( j < this . min_args + i ) { decl2 . flags |= 64 ; decl2 . var = var ; code . emitLoad ( var ) ; var = var . nextVar ( ) ; j ++ ; decl2 = decl2 . nextDecl ( ) ; } comp . callContextVar = ctxArg ? var : null ; int j2 = i ; while ( j2 < toCall ) { this . defaultArgs [ j2 ] . compile ( comp , StackTarget . getInstance ( decl2 . getType ( ) ) ) ; j2 ++ ; decl2 = decl2 . nextDecl ( ) ; } if ( varArgs ) { String lastTypeName = restArgType . getName ( ) ; if ( "gnu.lists.LList" . equals ( lastTypeName ) ) { arg = new QuoteExp ( LList . Empty ) ; } else if ( "java.lang.Object[]" . equals ( lastTypeName ) ) { arg = new QuoteExp ( Values . noArgs ) ; } else { throw new Error ( "unimplemented #!rest type " + lastTypeName ) ; } arg . compile ( comp , restArgType ) ; } if ( ctxArg ) { code . emitLoad ( var ) ; } if ( isStatic ) { code . emitInvokeStatic ( this . primMethods [ toCall ] ) ; } else { code . emitInvokeVirtual ( this . primMethods [ toCall ] ) ; } code . emitReturn ( ) ; this . closureEnv = null ; comp . callContextVar = callContextSave ; } else { if ( saveDeclFlags != null ) { int k3 = 0 ; Declaration decl3 = firstDecl ( ) ; while ( k3 < this . min_args + numStubs ) { int k4 = k3 + 1 ; decl3 . flags = saveDeclFlags [ k3 ] ; decl3 . var = null ; decl3 = decl3 . nextDecl ( ) ; k3 = k4 ; } } comp . method . initCode ( ) ; allocChildClasses ( comp ) ; allocParameters ( comp ) ; enterFunction ( comp ) ; compileBody ( comp ) ; compileEnd ( comp ) ; generateApplyMethods ( comp ) ; } } comp . method = save_method ; comp . curLambda = save_lambda ; } } }
access modifiers changed from: 0000
access modifiers changed from : 0000