src/share/classes/com/sun/tools/javac/jvm/Gen.java

Print this page

        

*** 989,1001 **** * jumps are within 32K. If this fails, fatcode * is set to true and we try again. */ void genMethod(JCMethodDecl tree, Env<GenContext> env, boolean fatcode) { MethodSymbol meth = tree.sym; ! // System.err.println("Generating " + meth + " in " + meth.owner); //DEBUG ! if (Code.width(types.erasure(env.enclMethod.sym.type).getParameterTypes()) + ! (((tree.mods.flags & STATIC) == 0 || meth.isConstructor()) ? 1 : 0) > ClassFile.MAX_PARAMETERS) { log.error(tree.pos(), "limit.parameters"); nerrs++; } --- 989,1011 ---- * jumps are within 32K. If this fails, fatcode * is set to true and we try again. */ void genMethod(JCMethodDecl tree, Env<GenContext> env, boolean fatcode) { MethodSymbol meth = tree.sym; ! int extras = 0; ! // Count up extra parameters ! if (meth.isConstructor()) { ! extras++; ! if (meth.enclClass().isInner() && ! !meth.enclClass().isStatic()) { ! extras++; ! } ! } else if ((tree.mods.flags & STATIC) == 0) { ! extras++; ! } ! // System.err.println("Generating " + meth + " in " + meth.owner); //DEBUG ! if (Code.width(types.erasure(env.enclMethod.sym.type).getParameterTypes()) + extras > ClassFile.MAX_PARAMETERS) { log.error(tree.pos(), "limit.parameters"); nerrs++; }