8014230: Compilation incorrectly succeeds with inner class constructor with 254 parameters

Thu, 27 Jun 2013 00:37:13 -0400

author
emc
date
Thu, 27 Jun 2013 00:37:13 -0400
changeset 1860
c674b396827c
parent 1859
36e8bc1907a2
child 1861
dcc6a52bf363

8014230: Compilation incorrectly succeeds with inner class constructor with 254 parameters
Summary: The compiler does not account fr extra parameters due to inner this parameters
Reviewed-by: jjg

src/share/classes/com/sun/tools/javac/jvm/Gen.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/javac/main/Main.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NestedClassConstructorArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NestedClassMethodArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NumArgs1.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NumArgs2.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NumArgs3.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NumArgs4.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/NumArgsTest.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/StaticNestedClassConstructorArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/TopLevelClassConstructorArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/TopLevelClassMethodArgs.java file | annotate | diff | comparison | revisions
test/tools/javac/limits/TopLevelClassStaticMethodArgs.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Wed Jun 26 20:45:47 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Jun 27 00:37:13 2013 -0400
     1.3 @@ -991,9 +991,19 @@
     1.4           */
     1.5          void genMethod(JCMethodDecl tree, Env<GenContext> env, boolean fatcode) {
     1.6              MethodSymbol meth = tree.sym;
     1.7 -//      System.err.println("Generating " + meth + " in " + meth.owner); //DEBUG
     1.8 -            if (Code.width(types.erasure(env.enclMethod.sym.type).getParameterTypes())  +
     1.9 -                (((tree.mods.flags & STATIC) == 0 || meth.isConstructor()) ? 1 : 0) >
    1.10 +            int extras = 0;
    1.11 +            // Count up extra parameters
    1.12 +            if (meth.isConstructor()) {
    1.13 +                extras++;
    1.14 +                if (meth.enclClass().isInner() &&
    1.15 +                    !meth.enclClass().isStatic()) {
    1.16 +                    extras++;
    1.17 +                }
    1.18 +            } else if ((tree.mods.flags & STATIC) == 0) {
    1.19 +                extras++;
    1.20 +            }
    1.21 +            //      System.err.println("Generating " + meth + " in " + meth.owner); //DEBUG
    1.22 +            if (Code.width(types.erasure(env.enclMethod.sym.type).getParameterTypes()) + extras >
    1.23                  ClassFile.MAX_PARAMETERS) {
    1.24                  log.error(tree.pos(), "limit.parameters");
    1.25                  nerrs++;
     2.1 --- a/src/share/classes/com/sun/tools/javac/main/Main.java	Wed Jun 26 20:45:47 2013 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/javac/main/Main.java	Thu Jun 27 00:37:13 2013 -0400
     2.3 @@ -377,10 +377,10 @@
     2.4      }
     2.5  
     2.6      public Result compile(String[] args,
     2.7 -                       String[] classNames,
     2.8 -                       Context context,
     2.9 -                       List<JavaFileObject> fileObjects,
    2.10 -                       Iterable<? extends Processor> processors)
    2.11 +                          String[] classNames,
    2.12 +                          Context context,
    2.13 +                          List<JavaFileObject> fileObjects,
    2.14 +                          Iterable<? extends Processor> processors)
    2.15      {
    2.16          context.put(Log.outKey, out);
    2.17          log = Log.instance(context);
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/test/tools/javac/limits/NestedClassConstructorArgs.java	Thu Jun 27 00:37:13 2013 -0400
     3.3 @@ -0,0 +1,45 @@
     3.4 +/*
     3.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     3.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.7 + *
     3.8 + * This code is free software; you can redistribute it and/or modify it
     3.9 + * under the terms of the GNU General Public License version 2 only, as
    3.10 + * published by the Free Software Foundation.
    3.11 + *
    3.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    3.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    3.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    3.15 + * version 2 for more details (a copy is included in the LICENSE file that
    3.16 + * accompanied this code).
    3.17 + *
    3.18 + * You should have received a copy of the GNU General Public License version
    3.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    3.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    3.21 + *
    3.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    3.23 + * or visit www.oracle.com if you need additional information or have any
    3.24 + * questions.
    3.25 + */
    3.26 +
    3.27 +/*
    3.28 + * @test
    3.29 + * @bug 8014230
    3.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
    3.31 + * @compile NumArgsTest.java
    3.32 + * @run main NestedClassConstructorArgs
    3.33 + */
    3.34 +
    3.35 +public class NestedClassConstructorArgs extends NumArgsTest {
    3.36 +    private static final NumArgsTest.NestingDef[] nesting = {
    3.37 +        classNesting("Inner")
    3.38 +    };
    3.39 +
    3.40 +    private NestedClassConstructorArgs() {
    3.41 +        super(253, "NestedClassConstructorArgs", "Inner", nesting);
    3.42 +    }
    3.43 +
    3.44 +    public static void main(String... args) throws Exception {
    3.45 +        new NestedClassConstructorArgs().runTest();
    3.46 +    }
    3.47 +}
    3.48 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/test/tools/javac/limits/NestedClassMethodArgs.java	Thu Jun 27 00:37:13 2013 -0400
     4.3 @@ -0,0 +1,45 @@
     4.4 +/*
     4.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     4.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.7 + *
     4.8 + * This code is free software; you can redistribute it and/or modify it
     4.9 + * under the terms of the GNU General Public License version 2 only, as
    4.10 + * published by the Free Software Foundation.
    4.11 + *
    4.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    4.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    4.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    4.15 + * version 2 for more details (a copy is included in the LICENSE file that
    4.16 + * accompanied this code).
    4.17 + *
    4.18 + * You should have received a copy of the GNU General Public License version
    4.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    4.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    4.21 + *
    4.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    4.23 + * or visit www.oracle.com if you need additional information or have any
    4.24 + * questions.
    4.25 + */
    4.26 +
    4.27 +/*
    4.28 + * @test
    4.29 + * @bug 8014230
    4.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
    4.31 + * @compile NumArgsTest.java
    4.32 + * @run main NestedClassMethodArgs
    4.33 + */
    4.34 +
    4.35 +public class NestedClassMethodArgs extends NumArgsTest {
    4.36 +    private static final NumArgsTest.NestingDef[] nesting = {
    4.37 +        classNesting("Inner")
    4.38 +    };
    4.39 +
    4.40 +    private NestedClassMethodArgs() {
    4.41 +        super(254, "void", "test", "NestedClassMethodArgs", nesting);
    4.42 +    }
    4.43 +
    4.44 +    public static void main(String... args) throws Exception {
    4.45 +        new NestedClassMethodArgs().runTest();
    4.46 +    }
    4.47 +}
    4.48 +
     5.1 --- a/test/tools/javac/limits/NumArgs1.java	Wed Jun 26 20:45:47 2013 -0700
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,552 +0,0 @@
     5.4 -/*
     5.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
     5.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.7 - *
     5.8 - * This code is free software; you can redistribute it and/or modify it
     5.9 - * under the terms of the GNU General Public License version 2 only, as
    5.10 - * published by the Free Software Foundation.
    5.11 - *
    5.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
    5.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    5.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    5.15 - * version 2 for more details (a copy is included in the LICENSE file that
    5.16 - * accompanied this code).
    5.17 - *
    5.18 - * You should have received a copy of the GNU General Public License version
    5.19 - * 2 along with this work; if not, write to the Free Software Foundation,
    5.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    5.21 - *
    5.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    5.23 - * or visit www.oracle.com if you need additional information or have any
    5.24 - * questions.
    5.25 - */
    5.26 -
    5.27 -/*
    5.28 - * @test
    5.29 - * @bug 4309152
    5.30 - * @summary Compiler silently generates bytecode that exceeds VM limits
    5.31 - * @author gafter
    5.32 - *
    5.33 - * @compile/fail NumArgs1.java
    5.34 - */
    5.35 -
    5.36 -class NumArgs1 {
    5.37 -    void f(
    5.38 -           // T1 this,
    5.39 -           int x2,
    5.40 -           int x3,
    5.41 -           int x4,
    5.42 -           int x5,
    5.43 -           int x6,
    5.44 -           int x7,
    5.45 -           int x8,
    5.46 -           int x9,
    5.47 -           int x10,
    5.48 -           int x11,
    5.49 -           int x12,
    5.50 -           int x13,
    5.51 -           int x14,
    5.52 -           int x15,
    5.53 -           int x16,
    5.54 -           int x17,
    5.55 -           int x18,
    5.56 -           int x19,
    5.57 -           int x20,
    5.58 -           int x21,
    5.59 -           int x22,
    5.60 -           int x23,
    5.61 -           int x24,
    5.62 -           int x25,
    5.63 -           int x26,
    5.64 -           int x27,
    5.65 -           int x28,
    5.66 -           int x29,
    5.67 -           int x30,
    5.68 -           int x31,
    5.69 -           int x32,
    5.70 -           int x33,
    5.71 -           int x34,
    5.72 -           int x35,
    5.73 -           int x36,
    5.74 -           int x37,
    5.75 -           int x38,
    5.76 -           int x39,
    5.77 -           int x40,
    5.78 -           int x41,
    5.79 -           int x42,
    5.80 -           int x43,
    5.81 -           int x44,
    5.82 -           int x45,
    5.83 -           int x46,
    5.84 -           int x47,
    5.85 -           int x48,
    5.86 -           int x49,
    5.87 -           int x50,
    5.88 -           int x51,
    5.89 -           int x52,
    5.90 -           int x53,
    5.91 -           int x54,
    5.92 -           int x55,
    5.93 -           int x56,
    5.94 -           int x57,
    5.95 -           int x58,
    5.96 -           int x59,
    5.97 -           int x60,
    5.98 -           int x61,
    5.99 -           int x62,
   5.100 -           int x63,
   5.101 -           int x64,
   5.102 -           int x65,
   5.103 -           int x66,
   5.104 -           int x67,
   5.105 -           int x68,
   5.106 -           int x69,
   5.107 -           int x70,
   5.108 -           int x71,
   5.109 -           int x72,
   5.110 -           int x73,
   5.111 -           int x74,
   5.112 -           int x75,
   5.113 -           int x76,
   5.114 -           int x77,
   5.115 -           int x78,
   5.116 -           int x79,
   5.117 -           int x80,
   5.118 -           int x81,
   5.119 -           int x82,
   5.120 -           int x83,
   5.121 -           int x84,
   5.122 -           int x85,
   5.123 -           int x86,
   5.124 -           int x87,
   5.125 -           int x88,
   5.126 -           int x89,
   5.127 -           int x90,
   5.128 -           int x91,
   5.129 -           int x92,
   5.130 -           int x93,
   5.131 -           int x94,
   5.132 -           int x95,
   5.133 -           int x96,
   5.134 -           int x97,
   5.135 -           int x98,
   5.136 -           int x99,
   5.137 -           int x100,
   5.138 -           int x101,
   5.139 -           int x102,
   5.140 -           int x103,
   5.141 -           int x104,
   5.142 -           int x105,
   5.143 -           int x106,
   5.144 -           int x107,
   5.145 -           int x108,
   5.146 -           int x109,
   5.147 -           int x110,
   5.148 -           int x111,
   5.149 -           int x112,
   5.150 -           int x113,
   5.151 -           int x114,
   5.152 -           int x115,
   5.153 -           int x116,
   5.154 -           int x117,
   5.155 -           int x118,
   5.156 -           int x119,
   5.157 -           int x120,
   5.158 -           int x121,
   5.159 -           int x122,
   5.160 -           int x123,
   5.161 -           int x124,
   5.162 -           int x125,
   5.163 -           int x126,
   5.164 -           int x127,
   5.165 -           int x128,
   5.166 -           int x129,
   5.167 -           int x130,
   5.168 -           int x131,
   5.169 -           int x132,
   5.170 -           int x133,
   5.171 -           int x134,
   5.172 -           int x135,
   5.173 -           int x136,
   5.174 -           int x137,
   5.175 -           int x138,
   5.176 -           int x139,
   5.177 -           int x140,
   5.178 -           int x141,
   5.179 -           int x142,
   5.180 -           int x143,
   5.181 -           int x144,
   5.182 -           int x145,
   5.183 -           int x146,
   5.184 -           int x147,
   5.185 -           int x148,
   5.186 -           int x149,
   5.187 -           int x150,
   5.188 -           int x151,
   5.189 -           int x152,
   5.190 -           int x153,
   5.191 -           int x154,
   5.192 -           int x155,
   5.193 -           int x156,
   5.194 -           int x157,
   5.195 -           int x158,
   5.196 -           int x159,
   5.197 -           int x160,
   5.198 -           int x161,
   5.199 -           int x162,
   5.200 -           int x163,
   5.201 -           int x164,
   5.202 -           int x165,
   5.203 -           int x166,
   5.204 -           int x167,
   5.205 -           int x168,
   5.206 -           int x169,
   5.207 -           int x170,
   5.208 -           int x171,
   5.209 -           int x172,
   5.210 -           int x173,
   5.211 -           int x174,
   5.212 -           int x175,
   5.213 -           int x176,
   5.214 -           int x177,
   5.215 -           int x178,
   5.216 -           int x179,
   5.217 -           int x180,
   5.218 -           int x181,
   5.219 -           int x182,
   5.220 -           int x183,
   5.221 -           int x184,
   5.222 -           int x185,
   5.223 -           int x186,
   5.224 -           int x187,
   5.225 -           int x188,
   5.226 -           int x189,
   5.227 -           int x190,
   5.228 -           int x191,
   5.229 -           int x192,
   5.230 -           int x193,
   5.231 -           int x194,
   5.232 -           int x195,
   5.233 -           int x196,
   5.234 -           int x197,
   5.235 -           int x198,
   5.236 -           int x199,
   5.237 -           int x200,
   5.238 -           int x201,
   5.239 -           int x202,
   5.240 -           int x203,
   5.241 -           int x204,
   5.242 -           int x205,
   5.243 -           int x206,
   5.244 -           int x207,
   5.245 -           int x208,
   5.246 -           int x209,
   5.247 -           int x210,
   5.248 -           int x211,
   5.249 -           int x212,
   5.250 -           int x213,
   5.251 -           int x214,
   5.252 -           int x215,
   5.253 -           int x216,
   5.254 -           int x217,
   5.255 -           int x218,
   5.256 -           int x219,
   5.257 -           int x220,
   5.258 -           int x221,
   5.259 -           int x222,
   5.260 -           int x223,
   5.261 -           int x224,
   5.262 -           int x225,
   5.263 -           int x226,
   5.264 -           int x227,
   5.265 -           int x228,
   5.266 -           int x229,
   5.267 -           int x230,
   5.268 -           int x231,
   5.269 -           int x232,
   5.270 -           int x233,
   5.271 -           int x234,
   5.272 -           int x235,
   5.273 -           int x236,
   5.274 -           int x237,
   5.275 -           int x238,
   5.276 -           int x239,
   5.277 -           int x240,
   5.278 -           int x241,
   5.279 -           int x242,
   5.280 -           int x243,
   5.281 -           int x244,
   5.282 -           int x245,
   5.283 -           int x246,
   5.284 -           int x247,
   5.285 -           int x248,
   5.286 -           int x249,
   5.287 -           int x250,
   5.288 -           int x251,
   5.289 -           int x252,
   5.290 -           int x253,
   5.291 -           int x254,
   5.292 -           int x255,
   5.293 -           int x256
   5.294 -    ) {}
   5.295 -
   5.296 -    static
   5.297 -    void g(
   5.298 -           int x1,
   5.299 -           int x2,
   5.300 -           int x3,
   5.301 -           int x4,
   5.302 -           int x5,
   5.303 -           int x6,
   5.304 -           int x7,
   5.305 -           int x8,
   5.306 -           int x9,
   5.307 -           int x10,
   5.308 -           int x11,
   5.309 -           int x12,
   5.310 -           int x13,
   5.311 -           int x14,
   5.312 -           int x15,
   5.313 -           int x16,
   5.314 -           int x17,
   5.315 -           int x18,
   5.316 -           int x19,
   5.317 -           int x20,
   5.318 -           int x21,
   5.319 -           int x22,
   5.320 -           int x23,
   5.321 -           int x24,
   5.322 -           int x25,
   5.323 -           int x26,
   5.324 -           int x27,
   5.325 -           int x28,
   5.326 -           int x29,
   5.327 -           int x30,
   5.328 -           int x31,
   5.329 -           int x32,
   5.330 -           int x33,
   5.331 -           int x34,
   5.332 -           int x35,
   5.333 -           int x36,
   5.334 -           int x37,
   5.335 -           int x38,
   5.336 -           int x39,
   5.337 -           int x40,
   5.338 -           int x41,
   5.339 -           int x42,
   5.340 -           int x43,
   5.341 -           int x44,
   5.342 -           int x45,
   5.343 -           int x46,
   5.344 -           int x47,
   5.345 -           int x48,
   5.346 -           int x49,
   5.347 -           int x50,
   5.348 -           int x51,
   5.349 -           int x52,
   5.350 -           int x53,
   5.351 -           int x54,
   5.352 -           int x55,
   5.353 -           int x56,
   5.354 -           int x57,
   5.355 -           int x58,
   5.356 -           int x59,
   5.357 -           int x60,
   5.358 -           int x61,
   5.359 -           int x62,
   5.360 -           int x63,
   5.361 -           int x64,
   5.362 -           int x65,
   5.363 -           int x66,
   5.364 -           int x67,
   5.365 -           int x68,
   5.366 -           int x69,
   5.367 -           int x70,
   5.368 -           int x71,
   5.369 -           int x72,
   5.370 -           int x73,
   5.371 -           int x74,
   5.372 -           int x75,
   5.373 -           int x76,
   5.374 -           int x77,
   5.375 -           int x78,
   5.376 -           int x79,
   5.377 -           int x80,
   5.378 -           int x81,
   5.379 -           int x82,
   5.380 -           int x83,
   5.381 -           int x84,
   5.382 -           int x85,
   5.383 -           int x86,
   5.384 -           int x87,
   5.385 -           int x88,
   5.386 -           int x89,
   5.387 -           int x90,
   5.388 -           int x91,
   5.389 -           int x92,
   5.390 -           int x93,
   5.391 -           int x94,
   5.392 -           int x95,
   5.393 -           int x96,
   5.394 -           int x97,
   5.395 -           int x98,
   5.396 -           int x99,
   5.397 -           int x100,
   5.398 -           int x101,
   5.399 -           int x102,
   5.400 -           int x103,
   5.401 -           int x104,
   5.402 -           int x105,
   5.403 -           int x106,
   5.404 -           int x107,
   5.405 -           int x108,
   5.406 -           int x109,
   5.407 -           int x110,
   5.408 -           int x111,
   5.409 -           int x112,
   5.410 -           int x113,
   5.411 -           int x114,
   5.412 -           int x115,
   5.413 -           int x116,
   5.414 -           int x117,
   5.415 -           int x118,
   5.416 -           int x119,
   5.417 -           int x120,
   5.418 -           int x121,
   5.419 -           int x122,
   5.420 -           int x123,
   5.421 -           int x124,
   5.422 -           int x125,
   5.423 -           int x126,
   5.424 -           int x127,
   5.425 -           int x128,
   5.426 -           int x129,
   5.427 -           int x130,
   5.428 -           int x131,
   5.429 -           int x132,
   5.430 -           int x133,
   5.431 -           int x134,
   5.432 -           int x135,
   5.433 -           int x136,
   5.434 -           int x137,
   5.435 -           int x138,
   5.436 -           int x139,
   5.437 -           int x140,
   5.438 -           int x141,
   5.439 -           int x142,
   5.440 -           int x143,
   5.441 -           int x144,
   5.442 -           int x145,
   5.443 -           int x146,
   5.444 -           int x147,
   5.445 -           int x148,
   5.446 -           int x149,
   5.447 -           int x150,
   5.448 -           int x151,
   5.449 -           int x152,
   5.450 -           int x153,
   5.451 -           int x154,
   5.452 -           int x155,
   5.453 -           int x156,
   5.454 -           int x157,
   5.455 -           int x158,
   5.456 -           int x159,
   5.457 -           int x160,
   5.458 -           int x161,
   5.459 -           int x162,
   5.460 -           int x163,
   5.461 -           int x164,
   5.462 -           int x165,
   5.463 -           int x166,
   5.464 -           int x167,
   5.465 -           int x168,
   5.466 -           int x169,
   5.467 -           int x170,
   5.468 -           int x171,
   5.469 -           int x172,
   5.470 -           int x173,
   5.471 -           int x174,
   5.472 -           int x175,
   5.473 -           int x176,
   5.474 -           int x177,
   5.475 -           int x178,
   5.476 -           int x179,
   5.477 -           int x180,
   5.478 -           int x181,
   5.479 -           int x182,
   5.480 -           int x183,
   5.481 -           int x184,
   5.482 -           int x185,
   5.483 -           int x186,
   5.484 -           int x187,
   5.485 -           int x188,
   5.486 -           int x189,
   5.487 -           int x190,
   5.488 -           int x191,
   5.489 -           int x192,
   5.490 -           int x193,
   5.491 -           int x194,
   5.492 -           int x195,
   5.493 -           int x196,
   5.494 -           int x197,
   5.495 -           int x198,
   5.496 -           int x199,
   5.497 -           int x200,
   5.498 -           int x201,
   5.499 -           int x202,
   5.500 -           int x203,
   5.501 -           int x204,
   5.502 -           int x205,
   5.503 -           int x206,
   5.504 -           int x207,
   5.505 -           int x208,
   5.506 -           int x209,
   5.507 -           int x210,
   5.508 -           int x211,
   5.509 -           int x212,
   5.510 -           int x213,
   5.511 -           int x214,
   5.512 -           int x215,
   5.513 -           int x216,
   5.514 -           int x217,
   5.515 -           int x218,
   5.516 -           int x219,
   5.517 -           int x220,
   5.518 -           int x221,
   5.519 -           int x222,
   5.520 -           int x223,
   5.521 -           int x224,
   5.522 -           int x225,
   5.523 -           int x226,
   5.524 -           int x227,
   5.525 -           int x228,
   5.526 -           int x229,
   5.527 -           int x230,
   5.528 -           int x231,
   5.529 -           int x232,
   5.530 -           int x233,
   5.531 -           int x234,
   5.532 -           int x235,
   5.533 -           int x236,
   5.534 -           int x237,
   5.535 -           int x238,
   5.536 -           int x239,
   5.537 -           int x240,
   5.538 -           int x241,
   5.539 -           int x242,
   5.540 -           int x243,
   5.541 -           int x244,
   5.542 -           int x245,
   5.543 -           int x246,
   5.544 -           int x247,
   5.545 -           int x248,
   5.546 -           int x249,
   5.547 -           int x250,
   5.548 -           int x251,
   5.549 -           int x252,
   5.550 -           int x253,
   5.551 -           int x254,
   5.552 -           int x255,
   5.553 -           int x256
   5.554 -    ) {}
   5.555 -}
     6.1 --- a/test/tools/javac/limits/NumArgs2.java	Wed Jun 26 20:45:47 2013 -0700
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,550 +0,0 @@
     6.4 -/*
     6.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
     6.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.7 - *
     6.8 - * This code is free software; you can redistribute it and/or modify it
     6.9 - * under the terms of the GNU General Public License version 2 only, as
    6.10 - * published by the Free Software Foundation.
    6.11 - *
    6.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
    6.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    6.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    6.15 - * version 2 for more details (a copy is included in the LICENSE file that
    6.16 - * accompanied this code).
    6.17 - *
    6.18 - * You should have received a copy of the GNU General Public License version
    6.19 - * 2 along with this work; if not, write to the Free Software Foundation,
    6.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    6.21 - *
    6.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    6.23 - * or visit www.oracle.com if you need additional information or have any
    6.24 - * questions.
    6.25 - */
    6.26 -
    6.27 -/*
    6.28 - * @test
    6.29 - * @bug 4309152
    6.30 - * @summary Compiler silently generates bytecode that exceeds VM limits
    6.31 - * @author gafter
    6.32 - *
    6.33 - * @compile NumArgs2.java
    6.34 - */
    6.35 -
    6.36 -class NumArgs2 {
    6.37 -    void f(
    6.38 -           // This this,
    6.39 -           int x2,
    6.40 -           int x3,
    6.41 -           int x4,
    6.42 -           int x5,
    6.43 -           int x6,
    6.44 -           int x7,
    6.45 -           int x8,
    6.46 -           int x9,
    6.47 -           int x10,
    6.48 -           int x11,
    6.49 -           int x12,
    6.50 -           int x13,
    6.51 -           int x14,
    6.52 -           int x15,
    6.53 -           int x16,
    6.54 -           int x17,
    6.55 -           int x18,
    6.56 -           int x19,
    6.57 -           int x20,
    6.58 -           int x21,
    6.59 -           int x22,
    6.60 -           int x23,
    6.61 -           int x24,
    6.62 -           int x25,
    6.63 -           int x26,
    6.64 -           int x27,
    6.65 -           int x28,
    6.66 -           int x29,
    6.67 -           int x30,
    6.68 -           int x31,
    6.69 -           int x32,
    6.70 -           int x33,
    6.71 -           int x34,
    6.72 -           int x35,
    6.73 -           int x36,
    6.74 -           int x37,
    6.75 -           int x38,
    6.76 -           int x39,
    6.77 -           int x40,
    6.78 -           int x41,
    6.79 -           int x42,
    6.80 -           int x43,
    6.81 -           int x44,
    6.82 -           int x45,
    6.83 -           int x46,
    6.84 -           int x47,
    6.85 -           int x48,
    6.86 -           int x49,
    6.87 -           int x50,
    6.88 -           int x51,
    6.89 -           int x52,
    6.90 -           int x53,
    6.91 -           int x54,
    6.92 -           int x55,
    6.93 -           int x56,
    6.94 -           int x57,
    6.95 -           int x58,
    6.96 -           int x59,
    6.97 -           int x60,
    6.98 -           int x61,
    6.99 -           int x62,
   6.100 -           int x63,
   6.101 -           int x64,
   6.102 -           int x65,
   6.103 -           int x66,
   6.104 -           int x67,
   6.105 -           int x68,
   6.106 -           int x69,
   6.107 -           int x70,
   6.108 -           int x71,
   6.109 -           int x72,
   6.110 -           int x73,
   6.111 -           int x74,
   6.112 -           int x75,
   6.113 -           int x76,
   6.114 -           int x77,
   6.115 -           int x78,
   6.116 -           int x79,
   6.117 -           int x80,
   6.118 -           int x81,
   6.119 -           int x82,
   6.120 -           int x83,
   6.121 -           int x84,
   6.122 -           int x85,
   6.123 -           int x86,
   6.124 -           int x87,
   6.125 -           int x88,
   6.126 -           int x89,
   6.127 -           int x90,
   6.128 -           int x91,
   6.129 -           int x92,
   6.130 -           int x93,
   6.131 -           int x94,
   6.132 -           int x95,
   6.133 -           int x96,
   6.134 -           int x97,
   6.135 -           int x98,
   6.136 -           int x99,
   6.137 -           int x100,
   6.138 -           int x101,
   6.139 -           int x102,
   6.140 -           int x103,
   6.141 -           int x104,
   6.142 -           int x105,
   6.143 -           int x106,
   6.144 -           int x107,
   6.145 -           int x108,
   6.146 -           int x109,
   6.147 -           int x110,
   6.148 -           int x111,
   6.149 -           int x112,
   6.150 -           int x113,
   6.151 -           int x114,
   6.152 -           int x115,
   6.153 -           int x116,
   6.154 -           int x117,
   6.155 -           int x118,
   6.156 -           int x119,
   6.157 -           int x120,
   6.158 -           int x121,
   6.159 -           int x122,
   6.160 -           int x123,
   6.161 -           int x124,
   6.162 -           int x125,
   6.163 -           int x126,
   6.164 -           int x127,
   6.165 -           int x128,
   6.166 -           int x129,
   6.167 -           int x130,
   6.168 -           int x131,
   6.169 -           int x132,
   6.170 -           int x133,
   6.171 -           int x134,
   6.172 -           int x135,
   6.173 -           int x136,
   6.174 -           int x137,
   6.175 -           int x138,
   6.176 -           int x139,
   6.177 -           int x140,
   6.178 -           int x141,
   6.179 -           int x142,
   6.180 -           int x143,
   6.181 -           int x144,
   6.182 -           int x145,
   6.183 -           int x146,
   6.184 -           int x147,
   6.185 -           int x148,
   6.186 -           int x149,
   6.187 -           int x150,
   6.188 -           int x151,
   6.189 -           int x152,
   6.190 -           int x153,
   6.191 -           int x154,
   6.192 -           int x155,
   6.193 -           int x156,
   6.194 -           int x157,
   6.195 -           int x158,
   6.196 -           int x159,
   6.197 -           int x160,
   6.198 -           int x161,
   6.199 -           int x162,
   6.200 -           int x163,
   6.201 -           int x164,
   6.202 -           int x165,
   6.203 -           int x166,
   6.204 -           int x167,
   6.205 -           int x168,
   6.206 -           int x169,
   6.207 -           int x170,
   6.208 -           int x171,
   6.209 -           int x172,
   6.210 -           int x173,
   6.211 -           int x174,
   6.212 -           int x175,
   6.213 -           int x176,
   6.214 -           int x177,
   6.215 -           int x178,
   6.216 -           int x179,
   6.217 -           int x180,
   6.218 -           int x181,
   6.219 -           int x182,
   6.220 -           int x183,
   6.221 -           int x184,
   6.222 -           int x185,
   6.223 -           int x186,
   6.224 -           int x187,
   6.225 -           int x188,
   6.226 -           int x189,
   6.227 -           int x190,
   6.228 -           int x191,
   6.229 -           int x192,
   6.230 -           int x193,
   6.231 -           int x194,
   6.232 -           int x195,
   6.233 -           int x196,
   6.234 -           int x197,
   6.235 -           int x198,
   6.236 -           int x199,
   6.237 -           int x200,
   6.238 -           int x201,
   6.239 -           int x202,
   6.240 -           int x203,
   6.241 -           int x204,
   6.242 -           int x205,
   6.243 -           int x206,
   6.244 -           int x207,
   6.245 -           int x208,
   6.246 -           int x209,
   6.247 -           int x210,
   6.248 -           int x211,
   6.249 -           int x212,
   6.250 -           int x213,
   6.251 -           int x214,
   6.252 -           int x215,
   6.253 -           int x216,
   6.254 -           int x217,
   6.255 -           int x218,
   6.256 -           int x219,
   6.257 -           int x220,
   6.258 -           int x221,
   6.259 -           int x222,
   6.260 -           int x223,
   6.261 -           int x224,
   6.262 -           int x225,
   6.263 -           int x226,
   6.264 -           int x227,
   6.265 -           int x228,
   6.266 -           int x229,
   6.267 -           int x230,
   6.268 -           int x231,
   6.269 -           int x232,
   6.270 -           int x233,
   6.271 -           int x234,
   6.272 -           int x235,
   6.273 -           int x236,
   6.274 -           int x237,
   6.275 -           int x238,
   6.276 -           int x239,
   6.277 -           int x240,
   6.278 -           int x241,
   6.279 -           int x242,
   6.280 -           int x243,
   6.281 -           int x244,
   6.282 -           int x245,
   6.283 -           int x246,
   6.284 -           int x247,
   6.285 -           int x248,
   6.286 -           int x249,
   6.287 -           int x250,
   6.288 -           int x251,
   6.289 -           int x252,
   6.290 -           int x253,
   6.291 -           int x254,
   6.292 -           int x255
   6.293 -    ) {}
   6.294 -
   6.295 -    static
   6.296 -    void g(
   6.297 -           int x1,
   6.298 -           int x2,
   6.299 -           int x3,
   6.300 -           int x4,
   6.301 -           int x5,
   6.302 -           int x6,
   6.303 -           int x7,
   6.304 -           int x8,
   6.305 -           int x9,
   6.306 -           int x10,
   6.307 -           int x11,
   6.308 -           int x12,
   6.309 -           int x13,
   6.310 -           int x14,
   6.311 -           int x15,
   6.312 -           int x16,
   6.313 -           int x17,
   6.314 -           int x18,
   6.315 -           int x19,
   6.316 -           int x20,
   6.317 -           int x21,
   6.318 -           int x22,
   6.319 -           int x23,
   6.320 -           int x24,
   6.321 -           int x25,
   6.322 -           int x26,
   6.323 -           int x27,
   6.324 -           int x28,
   6.325 -           int x29,
   6.326 -           int x30,
   6.327 -           int x31,
   6.328 -           int x32,
   6.329 -           int x33,
   6.330 -           int x34,
   6.331 -           int x35,
   6.332 -           int x36,
   6.333 -           int x37,
   6.334 -           int x38,
   6.335 -           int x39,
   6.336 -           int x40,
   6.337 -           int x41,
   6.338 -           int x42,
   6.339 -           int x43,
   6.340 -           int x44,
   6.341 -           int x45,
   6.342 -           int x46,
   6.343 -           int x47,
   6.344 -           int x48,
   6.345 -           int x49,
   6.346 -           int x50,
   6.347 -           int x51,
   6.348 -           int x52,
   6.349 -           int x53,
   6.350 -           int x54,
   6.351 -           int x55,
   6.352 -           int x56,
   6.353 -           int x57,
   6.354 -           int x58,
   6.355 -           int x59,
   6.356 -           int x60,
   6.357 -           int x61,
   6.358 -           int x62,
   6.359 -           int x63,
   6.360 -           int x64,
   6.361 -           int x65,
   6.362 -           int x66,
   6.363 -           int x67,
   6.364 -           int x68,
   6.365 -           int x69,
   6.366 -           int x70,
   6.367 -           int x71,
   6.368 -           int x72,
   6.369 -           int x73,
   6.370 -           int x74,
   6.371 -           int x75,
   6.372 -           int x76,
   6.373 -           int x77,
   6.374 -           int x78,
   6.375 -           int x79,
   6.376 -           int x80,
   6.377 -           int x81,
   6.378 -           int x82,
   6.379 -           int x83,
   6.380 -           int x84,
   6.381 -           int x85,
   6.382 -           int x86,
   6.383 -           int x87,
   6.384 -           int x88,
   6.385 -           int x89,
   6.386 -           int x90,
   6.387 -           int x91,
   6.388 -           int x92,
   6.389 -           int x93,
   6.390 -           int x94,
   6.391 -           int x95,
   6.392 -           int x96,
   6.393 -           int x97,
   6.394 -           int x98,
   6.395 -           int x99,
   6.396 -           int x100,
   6.397 -           int x101,
   6.398 -           int x102,
   6.399 -           int x103,
   6.400 -           int x104,
   6.401 -           int x105,
   6.402 -           int x106,
   6.403 -           int x107,
   6.404 -           int x108,
   6.405 -           int x109,
   6.406 -           int x110,
   6.407 -           int x111,
   6.408 -           int x112,
   6.409 -           int x113,
   6.410 -           int x114,
   6.411 -           int x115,
   6.412 -           int x116,
   6.413 -           int x117,
   6.414 -           int x118,
   6.415 -           int x119,
   6.416 -           int x120,
   6.417 -           int x121,
   6.418 -           int x122,
   6.419 -           int x123,
   6.420 -           int x124,
   6.421 -           int x125,
   6.422 -           int x126,
   6.423 -           int x127,
   6.424 -           int x128,
   6.425 -           int x129,
   6.426 -           int x130,
   6.427 -           int x131,
   6.428 -           int x132,
   6.429 -           int x133,
   6.430 -           int x134,
   6.431 -           int x135,
   6.432 -           int x136,
   6.433 -           int x137,
   6.434 -           int x138,
   6.435 -           int x139,
   6.436 -           int x140,
   6.437 -           int x141,
   6.438 -           int x142,
   6.439 -           int x143,
   6.440 -           int x144,
   6.441 -           int x145,
   6.442 -           int x146,
   6.443 -           int x147,
   6.444 -           int x148,
   6.445 -           int x149,
   6.446 -           int x150,
   6.447 -           int x151,
   6.448 -           int x152,
   6.449 -           int x153,
   6.450 -           int x154,
   6.451 -           int x155,
   6.452 -           int x156,
   6.453 -           int x157,
   6.454 -           int x158,
   6.455 -           int x159,
   6.456 -           int x160,
   6.457 -           int x161,
   6.458 -           int x162,
   6.459 -           int x163,
   6.460 -           int x164,
   6.461 -           int x165,
   6.462 -           int x166,
   6.463 -           int x167,
   6.464 -           int x168,
   6.465 -           int x169,
   6.466 -           int x170,
   6.467 -           int x171,
   6.468 -           int x172,
   6.469 -           int x173,
   6.470 -           int x174,
   6.471 -           int x175,
   6.472 -           int x176,
   6.473 -           int x177,
   6.474 -           int x178,
   6.475 -           int x179,
   6.476 -           int x180,
   6.477 -           int x181,
   6.478 -           int x182,
   6.479 -           int x183,
   6.480 -           int x184,
   6.481 -           int x185,
   6.482 -           int x186,
   6.483 -           int x187,
   6.484 -           int x188,
   6.485 -           int x189,
   6.486 -           int x190,
   6.487 -           int x191,
   6.488 -           int x192,
   6.489 -           int x193,
   6.490 -           int x194,
   6.491 -           int x195,
   6.492 -           int x196,
   6.493 -           int x197,
   6.494 -           int x198,
   6.495 -           int x199,
   6.496 -           int x200,
   6.497 -           int x201,
   6.498 -           int x202,
   6.499 -           int x203,
   6.500 -           int x204,
   6.501 -           int x205,
   6.502 -           int x206,
   6.503 -           int x207,
   6.504 -           int x208,
   6.505 -           int x209,
   6.506 -           int x210,
   6.507 -           int x211,
   6.508 -           int x212,
   6.509 -           int x213,
   6.510 -           int x214,
   6.511 -           int x215,
   6.512 -           int x216,
   6.513 -           int x217,
   6.514 -           int x218,
   6.515 -           int x219,
   6.516 -           int x220,
   6.517 -           int x221,
   6.518 -           int x222,
   6.519 -           int x223,
   6.520 -           int x224,
   6.521 -           int x225,
   6.522 -           int x226,
   6.523 -           int x227,
   6.524 -           int x228,
   6.525 -           int x229,
   6.526 -           int x230,
   6.527 -           int x231,
   6.528 -           int x232,
   6.529 -           int x233,
   6.530 -           int x234,
   6.531 -           int x235,
   6.532 -           int x236,
   6.533 -           int x237,
   6.534 -           int x238,
   6.535 -           int x239,
   6.536 -           int x240,
   6.537 -           int x241,
   6.538 -           int x242,
   6.539 -           int x243,
   6.540 -           int x244,
   6.541 -           int x245,
   6.542 -           int x246,
   6.543 -           int x247,
   6.544 -           int x248,
   6.545 -           int x249,
   6.546 -           int x250,
   6.547 -           int x251,
   6.548 -           int x252,
   6.549 -           int x253,
   6.550 -           int x254,
   6.551 -           int x255
   6.552 -    ) {}
   6.553 -}
     7.1 --- a/test/tools/javac/limits/NumArgs3.java	Wed Jun 26 20:45:47 2013 -0700
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,292 +0,0 @@
     7.4 -/*
     7.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
     7.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.7 - *
     7.8 - * This code is free software; you can redistribute it and/or modify it
     7.9 - * under the terms of the GNU General Public License version 2 only, as
    7.10 - * published by the Free Software Foundation.
    7.11 - *
    7.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
    7.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    7.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    7.15 - * version 2 for more details (a copy is included in the LICENSE file that
    7.16 - * accompanied this code).
    7.17 - *
    7.18 - * You should have received a copy of the GNU General Public License version
    7.19 - * 2 along with this work; if not, write to the Free Software Foundation,
    7.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    7.21 - *
    7.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    7.23 - * or visit www.oracle.com if you need additional information or have any
    7.24 - * questions.
    7.25 - */
    7.26 -
    7.27 -/*
    7.28 - * @test
    7.29 - * @bug 4309152
    7.30 - * @summary Compiler silently generates bytecode that exceeds VM limits
    7.31 - * @author gafter
    7.32 - *
    7.33 - * @compile/fail NumArgs3.java
    7.34 - */
    7.35 -
    7.36 -class NumArgs3 {
    7.37 -    void NumArgs3(
    7.38 -           // T1 this,
    7.39 -           int x2,
    7.40 -           int x3,
    7.41 -           int x4,
    7.42 -           int x5,
    7.43 -           int x6,
    7.44 -           int x7,
    7.45 -           int x8,
    7.46 -           int x9,
    7.47 -           int x10,
    7.48 -           int x11,
    7.49 -           int x12,
    7.50 -           int x13,
    7.51 -           int x14,
    7.52 -           int x15,
    7.53 -           int x16,
    7.54 -           int x17,
    7.55 -           int x18,
    7.56 -           int x19,
    7.57 -           int x20,
    7.58 -           int x21,
    7.59 -           int x22,
    7.60 -           int x23,
    7.61 -           int x24,
    7.62 -           int x25,
    7.63 -           int x26,
    7.64 -           int x27,
    7.65 -           int x28,
    7.66 -           int x29,
    7.67 -           int x30,
    7.68 -           int x31,
    7.69 -           int x32,
    7.70 -           int x33,
    7.71 -           int x34,
    7.72 -           int x35,
    7.73 -           int x36,
    7.74 -           int x37,
    7.75 -           int x38,
    7.76 -           int x39,
    7.77 -           int x40,
    7.78 -           int x41,
    7.79 -           int x42,
    7.80 -           int x43,
    7.81 -           int x44,
    7.82 -           int x45,
    7.83 -           int x46,
    7.84 -           int x47,
    7.85 -           int x48,
    7.86 -           int x49,
    7.87 -           int x50,
    7.88 -           int x51,
    7.89 -           int x52,
    7.90 -           int x53,
    7.91 -           int x54,
    7.92 -           int x55,
    7.93 -           int x56,
    7.94 -           int x57,
    7.95 -           int x58,
    7.96 -           int x59,
    7.97 -           int x60,
    7.98 -           int x61,
    7.99 -           int x62,
   7.100 -           int x63,
   7.101 -           int x64,
   7.102 -           int x65,
   7.103 -           int x66,
   7.104 -           int x67,
   7.105 -           int x68,
   7.106 -           int x69,
   7.107 -           int x70,
   7.108 -           int x71,
   7.109 -           int x72,
   7.110 -           int x73,
   7.111 -           int x74,
   7.112 -           int x75,
   7.113 -           int x76,
   7.114 -           int x77,
   7.115 -           int x78,
   7.116 -           int x79,
   7.117 -           int x80,
   7.118 -           int x81,
   7.119 -           int x82,
   7.120 -           int x83,
   7.121 -           int x84,
   7.122 -           int x85,
   7.123 -           int x86,
   7.124 -           int x87,
   7.125 -           int x88,
   7.126 -           int x89,
   7.127 -           int x90,
   7.128 -           int x91,
   7.129 -           int x92,
   7.130 -           int x93,
   7.131 -           int x94,
   7.132 -           int x95,
   7.133 -           int x96,
   7.134 -           int x97,
   7.135 -           int x98,
   7.136 -           int x99,
   7.137 -           int x100,
   7.138 -           int x101,
   7.139 -           int x102,
   7.140 -           int x103,
   7.141 -           int x104,
   7.142 -           int x105,
   7.143 -           int x106,
   7.144 -           int x107,
   7.145 -           int x108,
   7.146 -           int x109,
   7.147 -           int x110,
   7.148 -           int x111,
   7.149 -           int x112,
   7.150 -           int x113,
   7.151 -           int x114,
   7.152 -           int x115,
   7.153 -           int x116,
   7.154 -           int x117,
   7.155 -           int x118,
   7.156 -           int x119,
   7.157 -           int x120,
   7.158 -           int x121,
   7.159 -           int x122,
   7.160 -           int x123,
   7.161 -           int x124,
   7.162 -           int x125,
   7.163 -           int x126,
   7.164 -           int x127,
   7.165 -           int x128,
   7.166 -           int x129,
   7.167 -           int x130,
   7.168 -           int x131,
   7.169 -           int x132,
   7.170 -           int x133,
   7.171 -           int x134,
   7.172 -           int x135,
   7.173 -           int x136,
   7.174 -           int x137,
   7.175 -           int x138,
   7.176 -           int x139,
   7.177 -           int x140,
   7.178 -           int x141,
   7.179 -           int x142,
   7.180 -           int x143,
   7.181 -           int x144,
   7.182 -           int x145,
   7.183 -           int x146,
   7.184 -           int x147,
   7.185 -           int x148,
   7.186 -           int x149,
   7.187 -           int x150,
   7.188 -           int x151,
   7.189 -           int x152,
   7.190 -           int x153,
   7.191 -           int x154,
   7.192 -           int x155,
   7.193 -           int x156,
   7.194 -           int x157,
   7.195 -           int x158,
   7.196 -           int x159,
   7.197 -           int x160,
   7.198 -           int x161,
   7.199 -           int x162,
   7.200 -           int x163,
   7.201 -           int x164,
   7.202 -           int x165,
   7.203 -           int x166,
   7.204 -           int x167,
   7.205 -           int x168,
   7.206 -           int x169,
   7.207 -           int x170,
   7.208 -           int x171,
   7.209 -           int x172,
   7.210 -           int x173,
   7.211 -           int x174,
   7.212 -           int x175,
   7.213 -           int x176,
   7.214 -           int x177,
   7.215 -           int x178,
   7.216 -           int x179,
   7.217 -           int x180,
   7.218 -           int x181,
   7.219 -           int x182,
   7.220 -           int x183,
   7.221 -           int x184,
   7.222 -           int x185,
   7.223 -           int x186,
   7.224 -           int x187,
   7.225 -           int x188,
   7.226 -           int x189,
   7.227 -           int x190,
   7.228 -           int x191,
   7.229 -           int x192,
   7.230 -           int x193,
   7.231 -           int x194,
   7.232 -           int x195,
   7.233 -           int x196,
   7.234 -           int x197,
   7.235 -           int x198,
   7.236 -           int x199,
   7.237 -           int x200,
   7.238 -           int x201,
   7.239 -           int x202,
   7.240 -           int x203,
   7.241 -           int x204,
   7.242 -           int x205,
   7.243 -           int x206,
   7.244 -           int x207,
   7.245 -           int x208,
   7.246 -           int x209,
   7.247 -           int x210,
   7.248 -           int x211,
   7.249 -           int x212,
   7.250 -           int x213,
   7.251 -           int x214,
   7.252 -           int x215,
   7.253 -           int x216,
   7.254 -           int x217,
   7.255 -           int x218,
   7.256 -           int x219,
   7.257 -           int x220,
   7.258 -           int x221,
   7.259 -           int x222,
   7.260 -           int x223,
   7.261 -           int x224,
   7.262 -           int x225,
   7.263 -           int x226,
   7.264 -           int x227,
   7.265 -           int x228,
   7.266 -           int x229,
   7.267 -           int x230,
   7.268 -           int x231,
   7.269 -           int x232,
   7.270 -           int x233,
   7.271 -           int x234,
   7.272 -           int x235,
   7.273 -           int x236,
   7.274 -           int x237,
   7.275 -           int x238,
   7.276 -           int x239,
   7.277 -           int x240,
   7.278 -           int x241,
   7.279 -           int x242,
   7.280 -           int x243,
   7.281 -           int x244,
   7.282 -           int x245,
   7.283 -           int x246,
   7.284 -           int x247,
   7.285 -           int x248,
   7.286 -           int x249,
   7.287 -           int x250,
   7.288 -           int x251,
   7.289 -           int x252,
   7.290 -           int x253,
   7.291 -           int x254,
   7.292 -           int x255,
   7.293 -           int x256
   7.294 -    ) {}
   7.295 -}
     8.1 --- a/test/tools/javac/limits/NumArgs4.java	Wed Jun 26 20:45:47 2013 -0700
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,291 +0,0 @@
     8.4 -/*
     8.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
     8.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     8.7 - *
     8.8 - * This code is free software; you can redistribute it and/or modify it
     8.9 - * under the terms of the GNU General Public License version 2 only, as
    8.10 - * published by the Free Software Foundation.
    8.11 - *
    8.12 - * This code is distributed in the hope that it will be useful, but WITHOUT
    8.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    8.14 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    8.15 - * version 2 for more details (a copy is included in the LICENSE file that
    8.16 - * accompanied this code).
    8.17 - *
    8.18 - * You should have received a copy of the GNU General Public License version
    8.19 - * 2 along with this work; if not, write to the Free Software Foundation,
    8.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    8.21 - *
    8.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    8.23 - * or visit www.oracle.com if you need additional information or have any
    8.24 - * questions.
    8.25 - */
    8.26 -
    8.27 -/*
    8.28 - * @test
    8.29 - * @bug 4309152
    8.30 - * @summary Compiler silently generates bytecode that exceeds VM limits
    8.31 - * @author gafter
    8.32 - *
    8.33 - * @compile NumArgs4.java
    8.34 - */
    8.35 -
    8.36 -class NumArgs4 {
    8.37 -    void NumArgs4(
    8.38 -           // T1 this,
    8.39 -           int x2,
    8.40 -           int x3,
    8.41 -           int x4,
    8.42 -           int x5,
    8.43 -           int x6,
    8.44 -           int x7,
    8.45 -           int x8,
    8.46 -           int x9,
    8.47 -           int x10,
    8.48 -           int x11,
    8.49 -           int x12,
    8.50 -           int x13,
    8.51 -           int x14,
    8.52 -           int x15,
    8.53 -           int x16,
    8.54 -           int x17,
    8.55 -           int x18,
    8.56 -           int x19,
    8.57 -           int x20,
    8.58 -           int x21,
    8.59 -           int x22,
    8.60 -           int x23,
    8.61 -           int x24,
    8.62 -           int x25,
    8.63 -           int x26,
    8.64 -           int x27,
    8.65 -           int x28,
    8.66 -           int x29,
    8.67 -           int x30,
    8.68 -           int x31,
    8.69 -           int x32,
    8.70 -           int x33,
    8.71 -           int x34,
    8.72 -           int x35,
    8.73 -           int x36,
    8.74 -           int x37,
    8.75 -           int x38,
    8.76 -           int x39,
    8.77 -           int x40,
    8.78 -           int x41,
    8.79 -           int x42,
    8.80 -           int x43,
    8.81 -           int x44,
    8.82 -           int x45,
    8.83 -           int x46,
    8.84 -           int x47,
    8.85 -           int x48,
    8.86 -           int x49,
    8.87 -           int x50,
    8.88 -           int x51,
    8.89 -           int x52,
    8.90 -           int x53,
    8.91 -           int x54,
    8.92 -           int x55,
    8.93 -           int x56,
    8.94 -           int x57,
    8.95 -           int x58,
    8.96 -           int x59,
    8.97 -           int x60,
    8.98 -           int x61,
    8.99 -           int x62,
   8.100 -           int x63,
   8.101 -           int x64,
   8.102 -           int x65,
   8.103 -           int x66,
   8.104 -           int x67,
   8.105 -           int x68,
   8.106 -           int x69,
   8.107 -           int x70,
   8.108 -           int x71,
   8.109 -           int x72,
   8.110 -           int x73,
   8.111 -           int x74,
   8.112 -           int x75,
   8.113 -           int x76,
   8.114 -           int x77,
   8.115 -           int x78,
   8.116 -           int x79,
   8.117 -           int x80,
   8.118 -           int x81,
   8.119 -           int x82,
   8.120 -           int x83,
   8.121 -           int x84,
   8.122 -           int x85,
   8.123 -           int x86,
   8.124 -           int x87,
   8.125 -           int x88,
   8.126 -           int x89,
   8.127 -           int x90,
   8.128 -           int x91,
   8.129 -           int x92,
   8.130 -           int x93,
   8.131 -           int x94,
   8.132 -           int x95,
   8.133 -           int x96,
   8.134 -           int x97,
   8.135 -           int x98,
   8.136 -           int x99,
   8.137 -           int x100,
   8.138 -           int x101,
   8.139 -           int x102,
   8.140 -           int x103,
   8.141 -           int x104,
   8.142 -           int x105,
   8.143 -           int x106,
   8.144 -           int x107,
   8.145 -           int x108,
   8.146 -           int x109,
   8.147 -           int x110,
   8.148 -           int x111,
   8.149 -           int x112,
   8.150 -           int x113,
   8.151 -           int x114,
   8.152 -           int x115,
   8.153 -           int x116,
   8.154 -           int x117,
   8.155 -           int x118,
   8.156 -           int x119,
   8.157 -           int x120,
   8.158 -           int x121,
   8.159 -           int x122,
   8.160 -           int x123,
   8.161 -           int x124,
   8.162 -           int x125,
   8.163 -           int x126,
   8.164 -           int x127,
   8.165 -           int x128,
   8.166 -           int x129,
   8.167 -           int x130,
   8.168 -           int x131,
   8.169 -           int x132,
   8.170 -           int x133,
   8.171 -           int x134,
   8.172 -           int x135,
   8.173 -           int x136,
   8.174 -           int x137,
   8.175 -           int x138,
   8.176 -           int x139,
   8.177 -           int x140,
   8.178 -           int x141,
   8.179 -           int x142,
   8.180 -           int x143,
   8.181 -           int x144,
   8.182 -           int x145,
   8.183 -           int x146,
   8.184 -           int x147,
   8.185 -           int x148,
   8.186 -           int x149,
   8.187 -           int x150,
   8.188 -           int x151,
   8.189 -           int x152,
   8.190 -           int x153,
   8.191 -           int x154,
   8.192 -           int x155,
   8.193 -           int x156,
   8.194 -           int x157,
   8.195 -           int x158,
   8.196 -           int x159,
   8.197 -           int x160,
   8.198 -           int x161,
   8.199 -           int x162,
   8.200 -           int x163,
   8.201 -           int x164,
   8.202 -           int x165,
   8.203 -           int x166,
   8.204 -           int x167,
   8.205 -           int x168,
   8.206 -           int x169,
   8.207 -           int x170,
   8.208 -           int x171,
   8.209 -           int x172,
   8.210 -           int x173,
   8.211 -           int x174,
   8.212 -           int x175,
   8.213 -           int x176,
   8.214 -           int x177,
   8.215 -           int x178,
   8.216 -           int x179,
   8.217 -           int x180,
   8.218 -           int x181,
   8.219 -           int x182,
   8.220 -           int x183,
   8.221 -           int x184,
   8.222 -           int x185,
   8.223 -           int x186,
   8.224 -           int x187,
   8.225 -           int x188,
   8.226 -           int x189,
   8.227 -           int x190,
   8.228 -           int x191,
   8.229 -           int x192,
   8.230 -           int x193,
   8.231 -           int x194,
   8.232 -           int x195,
   8.233 -           int x196,
   8.234 -           int x197,
   8.235 -           int x198,
   8.236 -           int x199,
   8.237 -           int x200,
   8.238 -           int x201,
   8.239 -           int x202,
   8.240 -           int x203,
   8.241 -           int x204,
   8.242 -           int x205,
   8.243 -           int x206,
   8.244 -           int x207,
   8.245 -           int x208,
   8.246 -           int x209,
   8.247 -           int x210,
   8.248 -           int x211,
   8.249 -           int x212,
   8.250 -           int x213,
   8.251 -           int x214,
   8.252 -           int x215,
   8.253 -           int x216,
   8.254 -           int x217,
   8.255 -           int x218,
   8.256 -           int x219,
   8.257 -           int x220,
   8.258 -           int x221,
   8.259 -           int x222,
   8.260 -           int x223,
   8.261 -           int x224,
   8.262 -           int x225,
   8.263 -           int x226,
   8.264 -           int x227,
   8.265 -           int x228,
   8.266 -           int x229,
   8.267 -           int x230,
   8.268 -           int x231,
   8.269 -           int x232,
   8.270 -           int x233,
   8.271 -           int x234,
   8.272 -           int x235,
   8.273 -           int x236,
   8.274 -           int x237,
   8.275 -           int x238,
   8.276 -           int x239,
   8.277 -           int x240,
   8.278 -           int x241,
   8.279 -           int x242,
   8.280 -           int x243,
   8.281 -           int x244,
   8.282 -           int x245,
   8.283 -           int x246,
   8.284 -           int x247,
   8.285 -           int x248,
   8.286 -           int x249,
   8.287 -           int x250,
   8.288 -           int x251,
   8.289 -           int x252,
   8.290 -           int x253,
   8.291 -           int x254,
   8.292 -           int x255
   8.293 -    ) {}
   8.294 -}
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/test/tools/javac/limits/NumArgsTest.java	Thu Jun 27 00:37:13 2013 -0400
     9.3 @@ -0,0 +1,269 @@
     9.4 +/*
     9.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     9.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.7 + *
     9.8 + * This code is free software; you can redistribute it and/or modify it
     9.9 + * under the terms of the GNU General Public License version 2 only, as
    9.10 + * published by the Free Software Foundation.
    9.11 + *
    9.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
    9.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    9.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    9.15 + * version 2 for more details (a copy is included in the LICENSE file that
    9.16 + * accompanied this code).
    9.17 + *
    9.18 + * You should have received a copy of the GNU General Public License version
    9.19 + * 2 along with this work; if not, write to the Free Software Foundation,
    9.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    9.21 + *
    9.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    9.23 + * or visit www.oracle.com if you need additional information or have any
    9.24 + * questions.
    9.25 + */
    9.26 +
    9.27 +import com.sun.tools.javac.util.*;
    9.28 +import com.sun.tools.javac.api.*;
    9.29 +import com.sun.tools.javac.file.*;
    9.30 +import java.io.*;
    9.31 +import java.util.*;
    9.32 +import javax.tools.*;
    9.33 +
    9.34 +// More general parameter limit testing framework, and designed so
    9.35 +// that it could be expanded into a general limits-testing framework
    9.36 +// in the future.
    9.37 +public class NumArgsTest {
    9.38 +
    9.39 +    private static final NumArgsTest.NestingDef[] NO_NESTING = {};
    9.40 +
    9.41 +    // threshold is named as such because "threshold" args is expected
    9.42 +    // to pass, and "threshold" + 1 args is expected to fail.
    9.43 +    private final int threshold;
    9.44 +    private final boolean isStaticMethod;
    9.45 +    private final String result;
    9.46 +    private final String testName;
    9.47 +    private final String methodName;
    9.48 +    private final NestingDef[] nesting;
    9.49 +    private final File testdir;
    9.50 +    private final JavacTool tool = JavacTool.create();
    9.51 +    private final JavacFileManager fm =
    9.52 +        tool.getStandardFileManager(null, null, null);
    9.53 +    private int errors = 0;
    9.54 +
    9.55 +    public NumArgsTest(final int threshold,
    9.56 +                       final boolean isStaticMethod,
    9.57 +                       final String result,
    9.58 +                       final String methodName,
    9.59 +                       final String testName,
    9.60 +                       final NestingDef[] nesting) {
    9.61 +        this.threshold = threshold;
    9.62 +        this.isStaticMethod = isStaticMethod;
    9.63 +        this.result = result;
    9.64 +        this.methodName = methodName;
    9.65 +        this.testName = testName;
    9.66 +        this.nesting = nesting;
    9.67 +        testdir = new File(testName);
    9.68 +        testdir.mkdir();
    9.69 +    }
    9.70 +
    9.71 +    public NumArgsTest(final int threshold,
    9.72 +                       final boolean isStaticMethod,
    9.73 +                       final String result,
    9.74 +                       final String methodName,
    9.75 +                       final String testName) {
    9.76 +        this(threshold, isStaticMethod, result, methodName,
    9.77 +             testName, NO_NESTING);
    9.78 +    }
    9.79 +
    9.80 +    public NumArgsTest(final int threshold,
    9.81 +                       final String result,
    9.82 +                       final String methodName,
    9.83 +                       final String testName,
    9.84 +                       final NestingDef[] nesting) {
    9.85 +        this(threshold, false, result, methodName, testName, nesting);
    9.86 +    }
    9.87 +
    9.88 +    public NumArgsTest(final int threshold,
    9.89 +                       final String result,
    9.90 +                       final String methodName,
    9.91 +                       final String testName) {
    9.92 +        this(threshold, false, result, methodName, testName, NO_NESTING);
    9.93 +    }
    9.94 +
    9.95 +    public NumArgsTest(final int threshold,
    9.96 +                       final String testName,
    9.97 +                       final NestingDef[] nesting) {
    9.98 +        this(threshold, null, null, testName, nesting);
    9.99 +    }
   9.100 +
   9.101 +    public NumArgsTest(final int threshold,
   9.102 +                       final String testName) {
   9.103 +        this(threshold, null, null, testName, NO_NESTING);
   9.104 +    }
   9.105 +
   9.106 +    public NumArgsTest(final int threshold,
   9.107 +                       final String testName,
   9.108 +                       final String constructorName,
   9.109 +                       final NestingDef[] nesting) {
   9.110 +        this(threshold, null, constructorName, testName, nesting);
   9.111 +    }
   9.112 +
   9.113 +    protected void writeArgs(final int num, final PrintWriter stream)
   9.114 +        throws IOException {
   9.115 +        stream.print("int x1");
   9.116 +        for(int i = 1; i < num; i++)
   9.117 +            stream.print(", int x" + (i + 1));
   9.118 +    }
   9.119 +
   9.120 +    protected void writeMethod(final int num,
   9.121 +                               final String name,
   9.122 +                               final PrintWriter stream)
   9.123 +        throws IOException {
   9.124 +        stream.write("public ");
   9.125 +        if (isStaticMethod) stream.write("static ");
   9.126 +        if (result == null)
   9.127 +            stream.write("");
   9.128 +        else {
   9.129 +            stream.write(result);
   9.130 +            stream.write(" ");
   9.131 +        }
   9.132 +        stream.write(name);
   9.133 +        stream.write("(");
   9.134 +        writeArgs(num, stream);
   9.135 +        stream.write(") {}\n");
   9.136 +    }
   9.137 +
   9.138 +    protected void writeJavaFile(final int num,
   9.139 +                                 final boolean pass,
   9.140 +                                 final PrintWriter stream)
   9.141 +        throws IOException {
   9.142 +        final String fullName = testName + (pass ? "Pass" : "Fail");
   9.143 +        stream.write("public class ");
   9.144 +        stream.write(fullName);
   9.145 +        stream.write(" {\n");
   9.146 +        for(int i = 0; i < nesting.length; i++)
   9.147 +            nesting[i].writeBefore(stream);
   9.148 +        if (null == methodName)
   9.149 +            writeMethod(num, fullName, stream);
   9.150 +        else
   9.151 +            writeMethod(num, methodName, stream);
   9.152 +        for(int i = nesting.length - 1; i >= 0; i--)
   9.153 +            nesting[i].writeAfter(stream);
   9.154 +        stream.write("}\n");
   9.155 +    }
   9.156 +
   9.157 +    public void runTest() throws Exception {
   9.158 +        // Run the pass test
   9.159 +        final String passTestName = testName + "Pass.java";
   9.160 +        final StringWriter passBody = new StringWriter();
   9.161 +        final PrintWriter passStream = new PrintWriter(passBody);
   9.162 +        final File passFile = new File(testdir, passTestName);
   9.163 +        final FileWriter passWriter = new FileWriter(passFile);
   9.164 +
   9.165 +        writeJavaFile(threshold, true, passStream);
   9.166 +        passStream.close();
   9.167 +        passWriter.write(passBody.toString());
   9.168 +        passWriter.close();
   9.169 +
   9.170 +        final StringWriter passSW = new StringWriter();
   9.171 +        final String[] passArgs = { passFile.toString() };
   9.172 +        final Iterable<? extends JavaFileObject> passFiles =
   9.173 +            fm.getJavaFileObjectsFromFiles(Arrays.asList(passFile));
   9.174 +        final JavaCompiler.CompilationTask passTask =
   9.175 +            tool.getTask(passSW, fm, null, null, null, passFiles);
   9.176 +
   9.177 +        if (!passTask.call()) {
   9.178 +            errors++;
   9.179 +            System.err.println("Compilation unexpectedly failed. Body:\n" +
   9.180 +                               passBody);
   9.181 +            System.err.println("Output:\n" + passSW.toString());
   9.182 +        }
   9.183 +
   9.184 +        // Run the fail test
   9.185 +        final String failTestName = testName + "Fail.java";
   9.186 +        final StringWriter failBody = new StringWriter();
   9.187 +        final PrintWriter failStream = new PrintWriter(failBody);
   9.188 +        final File failFile = new File(testdir, failTestName);
   9.189 +        final FileWriter failWriter = new FileWriter(failFile);
   9.190 +
   9.191 +        writeJavaFile(threshold + 1, false, failStream);
   9.192 +        failStream.close();
   9.193 +        failWriter.write(failBody.toString());
   9.194 +        failWriter.close();
   9.195 +
   9.196 +        final StringWriter failSW = new StringWriter();
   9.197 +        final TestDiagnosticHandler failDiag =
   9.198 +            new TestDiagnosticHandler("compiler.err.limit.parameters");
   9.199 +        final Iterable<? extends JavaFileObject> failFiles =
   9.200 +            fm.getJavaFileObjectsFromFiles(Arrays.asList(failFile));
   9.201 +        final JavaCompiler.CompilationTask failTask =
   9.202 +            tool.getTask(failSW,
   9.203 +                         tool.getStandardFileManager(null, null, null),
   9.204 +                         failDiag,
   9.205 +                         null,
   9.206 +                         null,
   9.207 +                         failFiles);
   9.208 +
   9.209 +        if (failTask.call()) {
   9.210 +            errors++;
   9.211 +            System.err.println("Compilation unexpectedly succeeded.");
   9.212 +            System.err.println("Input:\n" + failBody);
   9.213 +        }
   9.214 +
   9.215 +        if (!failDiag.sawError) {
   9.216 +            errors++;
   9.217 +            System.err.println("Did not see expected compile error.");
   9.218 +        }
   9.219 +
   9.220 +        if (errors != 0)
   9.221 +            throw new RuntimeException("Test failed with " +
   9.222 +                                       errors + " errors");
   9.223 +    }
   9.224 +
   9.225 +    public static NestingDef classNesting(final String name) {
   9.226 +        return new NestedClassBuilder(name, false);
   9.227 +    }
   9.228 +
   9.229 +    public static NestingDef classNesting(final String name,
   9.230 +                                          final boolean isStatic) {
   9.231 +        return new NestedClassBuilder(name, isStatic);
   9.232 +    }
   9.233 +
   9.234 +    protected interface NestingDef {
   9.235 +        public abstract void writeBefore(final PrintWriter stream);
   9.236 +        public abstract void writeAfter(final PrintWriter stream);
   9.237 +    }
   9.238 +
   9.239 +    private static class NestedClassBuilder implements NestingDef {
   9.240 +        private final String name;
   9.241 +        private final boolean isStatic;
   9.242 +        public NestedClassBuilder(final String name, final boolean isStatic) {
   9.243 +            this.name = name;
   9.244 +            this.isStatic = isStatic;
   9.245 +        }
   9.246 +        public void writeBefore(final PrintWriter stream) {
   9.247 +            stream.write("public ");
   9.248 +            if (isStatic) stream.write("static");
   9.249 +            stream.write(" class ");
   9.250 +            stream.write(name);
   9.251 +            stream.write(" {\n");
   9.252 +        }
   9.253 +        public void writeAfter(final PrintWriter stream) {
   9.254 +            stream.write("}\n");
   9.255 +        }
   9.256 +    }
   9.257 +
   9.258 +    public class TestDiagnosticHandler<T> implements DiagnosticListener<T> {
   9.259 +        public boolean sawError;
   9.260 +        public final String target;
   9.261 +
   9.262 +        public TestDiagnosticHandler(final String target) {
   9.263 +            this.target = target;
   9.264 +        }
   9.265 +
   9.266 +        public void report(final Diagnostic<? extends T> diag) {
   9.267 +            if (diag.getCode().equals(target))
   9.268 +                sawError = true;
   9.269 +        }
   9.270 +    }
   9.271 +
   9.272 +}
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/test/tools/javac/limits/StaticNestedClassConstructorArgs.java	Thu Jun 27 00:37:13 2013 -0400
    10.3 @@ -0,0 +1,45 @@
    10.4 +/*
    10.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    10.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.7 + *
    10.8 + * This code is free software; you can redistribute it and/or modify it
    10.9 + * under the terms of the GNU General Public License version 2 only, as
   10.10 + * published by the Free Software Foundation.
   10.11 + *
   10.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   10.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   10.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   10.15 + * version 2 for more details (a copy is included in the LICENSE file that
   10.16 + * accompanied this code).
   10.17 + *
   10.18 + * You should have received a copy of the GNU General Public License version
   10.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   10.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   10.21 + *
   10.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   10.23 + * or visit www.oracle.com if you need additional information or have any
   10.24 + * questions.
   10.25 + */
   10.26 +
   10.27 +/*
   10.28 + * @test
   10.29 + * @bug 8014230
   10.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
   10.31 + * @compile NumArgsTest.java
   10.32 + * @run main StaticNestedClassConstructorArgs
   10.33 + */
   10.34 +
   10.35 +public class StaticNestedClassConstructorArgs extends NumArgsTest {
   10.36 +    private static final NumArgsTest.NestingDef[] nesting = {
   10.37 +        classNesting("StaticInner", true)
   10.38 +    };
   10.39 +
   10.40 +    private StaticNestedClassConstructorArgs() {
   10.41 +        super(254, "StaticNestedClassConstructorArgs", "StaticInner", nesting);
   10.42 +    }
   10.43 +
   10.44 +    public static void main(String... args) throws Exception {
   10.45 +        new StaticNestedClassConstructorArgs().runTest();
   10.46 +    }
   10.47 +}
   10.48 +
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/test/tools/javac/limits/TopLevelClassConstructorArgs.java	Thu Jun 27 00:37:13 2013 -0400
    11.3 @@ -0,0 +1,40 @@
    11.4 +/*
    11.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    11.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.7 + *
    11.8 + * This code is free software; you can redistribute it and/or modify it
    11.9 + * under the terms of the GNU General Public License version 2 only, as
   11.10 + * published by the Free Software Foundation.
   11.11 + *
   11.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   11.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   11.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   11.15 + * version 2 for more details (a copy is included in the LICENSE file that
   11.16 + * accompanied this code).
   11.17 + *
   11.18 + * You should have received a copy of the GNU General Public License version
   11.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   11.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   11.21 + *
   11.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   11.23 + * or visit www.oracle.com if you need additional information or have any
   11.24 + * questions.
   11.25 + */
   11.26 +
   11.27 +/*
   11.28 + * @test
   11.29 + * @bug 4309152
   11.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
   11.31 + * @compile NumArgsTest.java
   11.32 + * @run main TopLevelClassConstructorArgs
   11.33 + */
   11.34 +
   11.35 +public class TopLevelClassConstructorArgs extends NumArgsTest {
   11.36 +    private TopLevelClassConstructorArgs() {
   11.37 +        super(254, "TopLevelClassConstructorArgs");
   11.38 +    }
   11.39 +
   11.40 +    public static void main(String... args) throws Exception {
   11.41 +        new TopLevelClassConstructorArgs().runTest();
   11.42 +    }
   11.43 +}
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/test/tools/javac/limits/TopLevelClassMethodArgs.java	Thu Jun 27 00:37:13 2013 -0400
    12.3 @@ -0,0 +1,40 @@
    12.4 +/*
    12.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    12.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.7 + *
    12.8 + * This code is free software; you can redistribute it and/or modify it
    12.9 + * under the terms of the GNU General Public License version 2 only, as
   12.10 + * published by the Free Software Foundation.
   12.11 + *
   12.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   12.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   12.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   12.15 + * version 2 for more details (a copy is included in the LICENSE file that
   12.16 + * accompanied this code).
   12.17 + *
   12.18 + * You should have received a copy of the GNU General Public License version
   12.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   12.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   12.21 + *
   12.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   12.23 + * or visit www.oracle.com if you need additional information or have any
   12.24 + * questions.
   12.25 + */
   12.26 +
   12.27 +/*
   12.28 + * @test
   12.29 + * @bug 4309152
   12.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
   12.31 + * @compile NumArgsTest.java
   12.32 + * @run main TopLevelClassMethodArgs
   12.33 + */
   12.34 +
   12.35 +public class TopLevelClassMethodArgs extends NumArgsTest {
   12.36 +    private TopLevelClassMethodArgs() {
   12.37 +        super(254, "void", "test", "TopLevelClassMethodArgs");
   12.38 +    }
   12.39 +
   12.40 +    public static void main(String... args) throws Exception {
   12.41 +        new TopLevelClassMethodArgs().runTest();
   12.42 +    }
   12.43 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/test/tools/javac/limits/TopLevelClassStaticMethodArgs.java	Thu Jun 27 00:37:13 2013 -0400
    13.3 @@ -0,0 +1,40 @@
    13.4 +/*
    13.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    13.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.7 + *
    13.8 + * This code is free software; you can redistribute it and/or modify it
    13.9 + * under the terms of the GNU General Public License version 2 only, as
   13.10 + * published by the Free Software Foundation.
   13.11 + *
   13.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   13.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   13.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   13.15 + * version 2 for more details (a copy is included in the LICENSE file that
   13.16 + * accompanied this code).
   13.17 + *
   13.18 + * You should have received a copy of the GNU General Public License version
   13.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   13.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   13.21 + *
   13.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   13.23 + * or visit www.oracle.com if you need additional information or have any
   13.24 + * questions.
   13.25 + */
   13.26 +
   13.27 +/*
   13.28 + * @test
   13.29 + * @bug 4309152
   13.30 + * @summary Compiler silently generates bytecode that exceeds VM limits
   13.31 + * @compile NumArgsTest.java
   13.32 + * @run main TopLevelClassStaticMethodArgs
   13.33 + */
   13.34 +
   13.35 +public class TopLevelClassStaticMethodArgs extends NumArgsTest {
   13.36 +    private TopLevelClassStaticMethodArgs() {
   13.37 +        super(255, true, "void", "test", "TopLevelClassStaticMethodArgs");
   13.38 +    }
   13.39 +
   13.40 +    public static void main(String... args) throws Exception {
   13.41 +        new TopLevelClassStaticMethodArgs().runTest();
   13.42 +    }
   13.43 +}

mercurial