--- old/src/share/classes/com/sun/tools/javac/jvm/Gen.java 2013-06-19 16:34:40.395807262 -0400 +++ new/src/share/classes/com/sun/tools/javac/jvm/Gen.java 2013-06-19 16:34:40.239805245 -0400 @@ -991,9 +991,19 @@ */ void genMethod(JCMethodDecl tree, Env 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) > + 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++; --- old/src/share/classes/com/sun/tools/javac/main/Main.java 2013-06-19 16:34:40.890813656 -0400 +++ new/src/share/classes/com/sun/tools/javac/main/Main.java 2013-06-19 16:34:40.737811678 -0400 @@ -377,14 +377,25 @@ } public Result compile(String[] args, - String[] classNames, - Context context, - List fileObjects, - Iterable processors) + String[] classNames, + Context context, + List fileObjects, + Iterable processors) { context.put(Log.outKey, out); log = Log.instance(context); + return compile(args, classNames, context, + fileObjects, processors, log); + } + // Added to allow tests to install their own log subclasses + public Result compile(String[] args, + String[] classNames, + Context context, + List fileObjects, + Iterable processors, + Log log) + { if (options == null) options = Options.instance(context); // creates a new one --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/ConstructorArgs.java 2013-06-19 16:34:41.205817726 -0400 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4309152 + * @summary Compiler silently generates bytecode that exceeds VM limits + * @compile NumArgsTest.java + * @run main ConstructorArgs + */ + +public class ConstructorArgs extends NumArgsTest { + private static final NumArgsTest.NestingDef[] nesting = {}; + + private ConstructorArgs() { + super(254, "ConstructorArgs", nesting); + } + + public static void main(String... args) throws Exception { + new ConstructorArgs().runTest(); + } +} --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/InnerClassConstructorArgs.java 2013-06-19 16:34:41.648823450 -0400 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8014230 + * @summary Compiler silently generates bytecode that exceeds VM limits + * @compile NumArgsTest.java + * @run main InnerClassConstructorArgs + */ + +public class InnerClassConstructorArgs extends NumArgsTest { + private static final NumArgsTest.NestingDef[] nesting = { + classNesting("Inner") + }; + + private InnerClassConstructorArgs() { + super(253, "InnerClassConstructorArgs", "Inner", nesting); + } + + public static void main(String... args) throws Exception { + new InnerClassConstructorArgs().runTest(); + } +} + --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/InnerClassMethodArgs.java 2013-06-19 16:34:42.091829171 -0400 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8014230 + * @summary Compiler silently generates bytecode that exceeds VM limits + * @compile NumArgsTest.java + * @run main InnerClassMethodArgs + */ + +public class InnerClassMethodArgs extends NumArgsTest { + private static final NumArgsTest.NestingDef[] nesting = { + classNesting("Inner") + }; + + private InnerClassMethodArgs() { + super(254, "void", "test", "InnerClassMethodArgs", nesting); + } + + public static void main(String... args) throws Exception { + new InnerClassMethodArgs().runTest(); + } +} + --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/MethodArgs.java 2013-06-19 16:34:42.534834895 -0400 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4309152 + * @summary Compiler silently generates bytecode that exceeds VM limits + * @compile NumArgsTest.java + * @run main MethodArgs + */ + +public class MethodArgs extends NumArgsTest { + private static final NumArgsTest.NestingDef[] nesting = {}; + + private MethodArgs() { + super(254, "void", "test", "MethodArgs", nesting); + } + + public static void main(String... args) throws Exception { + new MethodArgs().runTest(); + } +} --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/NumArgsTest.java 2013-06-19 16:34:42.978840631 -0400 @@ -0,0 +1,238 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import com.sun.tools.javac.main.Main; +import com.sun.tools.javac.util.*; +import java.io.*; +import javax.tools.JavaFileObject; + +// More general parameter limit testing framework, and designed so +// that it could be expanded into a general limits-testing framework +// in the future. +public class NumArgsTest { + + private int errors = 0; + private final int threshold; + private final String retty; + private final String testName; + private final String methodName; + private final NestingDef[] nesting; + private final File testdir; + private static Main compiler = new Main("javac"); + + public NumArgsTest(final int threshold, + final String retty, + final String methodName, + final String testName, + final NestingDef[] nesting) { + this.threshold = threshold; + this.retty = retty; + this.methodName = methodName; + this.testName = testName; + this.nesting = nesting; + testdir = new File(testName); + testdir.mkdir(); + } + + public NumArgsTest(final int threshold, + final String testName, + final NestingDef[] nesting) { + this(threshold, null, null, testName, nesting); + } + + public NumArgsTest(final int threshold, + final String testName, + final String constructorName, + final NestingDef[] nesting) { + this(threshold, null, constructorName, testName, nesting); + } + + protected void writeArgs(final int num, final PrintWriter stream) + throws IOException { + stream.print("int x1"); + for(int i = 1; i < num; i++) + stream.print(", int x" + (i + 1)); + } + + protected void writeMethod(final int num, + final String name, + final PrintWriter stream) + throws IOException { + stream.write("public "); + if (retty == null) + stream.write(""); + else { + stream.write(retty); + stream.write(" "); + } + stream.write(name); + stream.write("("); + writeArgs(num, stream); + stream.write(") {}\n"); + } + + protected void writeJavaFile(final int num, + final boolean pass, + final PrintWriter stream) + throws IOException { + final String fullName = testName + (pass ? "Pass" : "Fail"); + stream.write("public class "); + stream.write(fullName); + stream.write(" {\n"); + for(int i = 0; i < nesting.length; i++) + nesting[i].writeBefore(stream); + if (null == methodName) + writeMethod(num, fullName, stream); + else + writeMethod(num, methodName, stream); + for(int i = nesting.length - 1; i >= 0; i--) + nesting[i].writeAfter(stream); + stream.write("}\n"); + } + + public void runTest() throws Exception { + // Run the pass test + final String passTestName = testName + "Pass.java"; + final StringWriter passBody = new StringWriter(); + final PrintWriter passStream = new PrintWriter(passBody); + final File passFile = new File(testdir, passTestName); + final FileWriter passWriter = new FileWriter(passFile); + + writeJavaFile(threshold, true, passStream); + passStream.close(); + passWriter.write(passBody.toString()); + passWriter.close(); + + final StringWriter passSW = new StringWriter(); + final PrintWriter passPW = new PrintWriter(passSW); + final Main passCompiler = new Main("javac", passPW); + final Context passContext = new Context(); + final Log passLog = Log.instance(passContext); + final TestDiagnosticHandler passDiag = + new TestDiagnosticHandler(passLog, "limit.parameters"); + final String[] passArgs = { passFile.toString() }; + final Main.Result passResult = + passCompiler.compile(passArgs, null, passContext, + List.nil(), null, passLog); + + passPW.close(); + + if(passResult.exitCode != 0) { + errors++; + System.err.println("Compilation unexpectedly failed. Body:\n" + + passBody); + System.err.println("Output:\n" + passSW.toString()); + } + + // Run the fail test + final String failTestName = testName + "Fail.java"; + final StringWriter failBody = new StringWriter(); + final PrintWriter failStream = new PrintWriter(failBody); + final File failFile = new File(testdir, failTestName); + final FileWriter failWriter = new FileWriter(failFile); + + writeJavaFile(threshold + 1, false, failStream); + failStream.close(); + failWriter.write(failBody.toString()); + failWriter.close(); + + final StringWriter failSW = new StringWriter(); + final PrintWriter failPW = new PrintWriter(failSW); + final Main failCompiler = new Main("javac", failPW); + final Context failContext = new Context(); + final Log failLog = Log.instance(failContext); + final TestDiagnosticHandler failDiag = + new TestDiagnosticHandler(failLog, "compiler.err.limit.parameters"); + final String[] failArgs = { failFile.toString() }; + final Main.Result failResult = + failCompiler.compile(failArgs, null, failContext, + List.nil(), null, failLog); + + failPW.close(); + + if(failResult.exitCode == 0) { + errors++; + System.err.println("Compilation unexpectedly succeeded."); + System.err.println("Input:\n" + failBody); + } + + if (!failDiag.sawError) { + errors++; + System.err.println("Did not see expected compile error."); + } + + if (errors != 0) + throw new RuntimeException("Test failed with " + + errors + " errors"); + } + + public static NestingDef classNesting(final String name) { + return new ClassNestingDef(name, false); + } + + public static NestingDef classNesting(final String name, + final boolean isStatic) { + return new ClassNestingDef(name, isStatic); + } + + protected interface NestingDef { + public abstract void writeBefore(final PrintWriter stream); + public abstract void writeAfter(final PrintWriter stream); + } + + private static class ClassNestingDef implements NestingDef { + private final String name; + private final boolean isStatic; + public ClassNestingDef(final String name, final boolean isStatic) { + this.name = name; + this.isStatic = isStatic; + } + public void writeBefore(final PrintWriter stream) { + stream.write("public "); + if (isStatic) stream.write("static"); + stream.write(" class "); + stream.write(name); + stream.write(" {\n"); + } + public void writeAfter(final PrintWriter stream) { + stream.write("}\n"); + } + } + + public class TestDiagnosticHandler extends Log.DiagnosticHandler { + public boolean sawError; + public final String target; + + public TestDiagnosticHandler(final Log log, final String target) { + install(log); + this.target = target; + } + + public void report(final JCDiagnostic diag) { + if (diag.getCode().equals(target)) + sawError = true; + prev.report(diag); + } + } + +} --- /dev/null 2013-06-19 06:20:48.799108639 -0400 +++ new/test/tools/javac/limits/StaticInnerClassConstructorArgs.java 2013-06-19 16:34:43.423846380 -0400 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8014230 + * @summary Compiler silently generates bytecode that exceeds VM limits + * @compile NumArgsTest.java + * @run main StaticInnerClassConstructorArgs + */ + +public class StaticInnerClassConstructorArgs extends NumArgsTest { + private static final NumArgsTest.NestingDef[] nesting = { + classNesting("StaticInner", true) + }; + + private StaticInnerClassConstructorArgs() { + super(254, "StaticInnerClassConstructorArgs", "StaticInner", nesting); + } + + public static void main(String... args) throws Exception { + new StaticInnerClassConstructorArgs().runTest(); + } +} + --- old/test/tools/javac/limits/NumArgs1.java 2013-06-19 16:34:44.022854119 -0400 +++ /dev/null 2013-06-19 06:20:48.799108639 -0400 @@ -1,552 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4309152 - * @summary Compiler silently generates bytecode that exceeds VM limits - * @author gafter - * - * @compile/fail NumArgs1.java - */ - -class NumArgs1 { - void f( - // T1 this, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255, - int x256 - ) {} - - static - void g( - int x1, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255, - int x256 - ) {} -} --- old/test/tools/javac/limits/NumArgs2.java 2013-06-19 16:34:44.335858161 -0400 +++ /dev/null 2013-06-19 06:20:48.799108639 -0400 @@ -1,550 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4309152 - * @summary Compiler silently generates bytecode that exceeds VM limits - * @author gafter - * - * @compile NumArgs2.java - */ - -class NumArgs2 { - void f( - // This this, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255 - ) {} - - static - void g( - int x1, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255 - ) {} -} --- old/test/tools/javac/limits/NumArgs3.java 2013-06-19 16:34:44.650862231 -0400 +++ /dev/null 2013-06-19 06:20:48.799108639 -0400 @@ -1,292 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4309152 - * @summary Compiler silently generates bytecode that exceeds VM limits - * @author gafter - * - * @compile/fail NumArgs3.java - */ - -class NumArgs3 { - void NumArgs3( - // T1 this, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255, - int x256 - ) {} -} --- old/test/tools/javac/limits/NumArgs4.java 2013-06-19 16:34:44.964866288 -0400 +++ /dev/null 2013-06-19 06:20:48.799108639 -0400 @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 4309152 - * @summary Compiler silently generates bytecode that exceeds VM limits - * @author gafter - * - * @compile NumArgs4.java - */ - -class NumArgs4 { - void NumArgs4( - // T1 this, - int x2, - int x3, - int x4, - int x5, - int x6, - int x7, - int x8, - int x9, - int x10, - int x11, - int x12, - int x13, - int x14, - int x15, - int x16, - int x17, - int x18, - int x19, - int x20, - int x21, - int x22, - int x23, - int x24, - int x25, - int x26, - int x27, - int x28, - int x29, - int x30, - int x31, - int x32, - int x33, - int x34, - int x35, - int x36, - int x37, - int x38, - int x39, - int x40, - int x41, - int x42, - int x43, - int x44, - int x45, - int x46, - int x47, - int x48, - int x49, - int x50, - int x51, - int x52, - int x53, - int x54, - int x55, - int x56, - int x57, - int x58, - int x59, - int x60, - int x61, - int x62, - int x63, - int x64, - int x65, - int x66, - int x67, - int x68, - int x69, - int x70, - int x71, - int x72, - int x73, - int x74, - int x75, - int x76, - int x77, - int x78, - int x79, - int x80, - int x81, - int x82, - int x83, - int x84, - int x85, - int x86, - int x87, - int x88, - int x89, - int x90, - int x91, - int x92, - int x93, - int x94, - int x95, - int x96, - int x97, - int x98, - int x99, - int x100, - int x101, - int x102, - int x103, - int x104, - int x105, - int x106, - int x107, - int x108, - int x109, - int x110, - int x111, - int x112, - int x113, - int x114, - int x115, - int x116, - int x117, - int x118, - int x119, - int x120, - int x121, - int x122, - int x123, - int x124, - int x125, - int x126, - int x127, - int x128, - int x129, - int x130, - int x131, - int x132, - int x133, - int x134, - int x135, - int x136, - int x137, - int x138, - int x139, - int x140, - int x141, - int x142, - int x143, - int x144, - int x145, - int x146, - int x147, - int x148, - int x149, - int x150, - int x151, - int x152, - int x153, - int x154, - int x155, - int x156, - int x157, - int x158, - int x159, - int x160, - int x161, - int x162, - int x163, - int x164, - int x165, - int x166, - int x167, - int x168, - int x169, - int x170, - int x171, - int x172, - int x173, - int x174, - int x175, - int x176, - int x177, - int x178, - int x179, - int x180, - int x181, - int x182, - int x183, - int x184, - int x185, - int x186, - int x187, - int x188, - int x189, - int x190, - int x191, - int x192, - int x193, - int x194, - int x195, - int x196, - int x197, - int x198, - int x199, - int x200, - int x201, - int x202, - int x203, - int x204, - int x205, - int x206, - int x207, - int x208, - int x209, - int x210, - int x211, - int x212, - int x213, - int x214, - int x215, - int x216, - int x217, - int x218, - int x219, - int x220, - int x221, - int x222, - int x223, - int x224, - int x225, - int x226, - int x227, - int x228, - int x229, - int x230, - int x231, - int x232, - int x233, - int x234, - int x235, - int x236, - int x237, - int x238, - int x239, - int x240, - int x241, - int x242, - int x243, - int x244, - int x245, - int x246, - int x247, - int x248, - int x249, - int x250, - int x251, - int x252, - int x253, - int x254, - int x255 - ) {} -}