--- /dev/null 2019-03-11 09:22:42.048915961 +0100 +++ new/test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod 2019-03-11 14:27:58.934353596 +0100 @@ -0,0 +1,2778 @@ +/* + * Copyright (c) 2018, 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. + * + */ + +// This file contains multiple illegal value type classes that should cause +// ClassFormatError exceptions when attempted to be loaded. +// +// The .jcod classes were originally generated from this Java file and then +// modified to cause ClassFormatError or ClassCircularityError exceptions. The +// '(bad)' comments in most of the tests show where the modifications were made. +// +// final value class Value { +// static final Value VT = makeValue(0x01234567); +// final int int_v; +// Value() { +// int_v = 1; +// } +// static Value makeValue(int x) { +// Value v = Value.default; +// v = __WithField(v.int_v, x); +// return v; +// } +// } + + +// Test that class modifiers cannot have both ACC_VALUE and ACC_ABSTRACT set. +// +class ValueAbstract { + 0xCAFEBABE; + 0; // minor version + 57; // version + [28] { // Constant Pool + ; // first element is empty + Method #7 #23; // #1 at 0x0A + Field #3 #24; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #25; // #5 at 0x1C + Field #3 #26; // #6 at 0x21 + class #27; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueAbstract"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x36 + Utf8 "LValueAbstract;"; // #11 at 0x43 + Utf8 "int_v"; // #12 at 0x4D + Utf8 "I"; // #13 at 0x55 + Utf8 ""; // #14 at 0x59 + Utf8 "()V"; // #15 at 0x62 + Utf8 "Code"; // #16 at 0x68 + Utf8 "LineNumberTable"; // #17 at 0x6F + Utf8 "makeValueAbstract"; // #18 at 0x81 + Utf8 "(I)LValueAbstract;"; // #19 at 0x8D + Utf8 ""; // #20 at 0x9A + Utf8 "SourceFile"; // #21 at 0xA5 + Utf8 "ValueAbstract.java"; // #22 at 0xB2 + NameAndType #14 #15; // #23 at 0xBF + NameAndType #12 #13; // #24 at 0xC4 + NameAndType #18 #19; // #25 at 0xC9 + NameAndType #8 #11; // #26 at 0xCE + Utf8 "java/lang/Object"; // #27 at 0xD3 + } // Constant Pool + + 0x0530; // access [ ACC_VALUE ACC_ABSTRACT(bad) ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF0 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xF8 + 0x0010; // access + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x0102 + 0x0000; // access + #14; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x010A + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0126 + [3] { // LineNumberTable + 0 4; // at 0x0132 + 4 5; // at 0x0136 + 9 6; // at 0x013A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x013A + 0x0008; // access + #18; // name_cpx + #19; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x0142 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0160 + [3] { // LineNumberTable + 0 8; // at 0x016C + 4 9; // at 0x0170 + 10 10; // at 0x0174 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0174 + 0x0008; // access + #20; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x017C + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0197 + [1] { // LineNumberTable + 0 2; // at 0x01A3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x01A5 + #22; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x01AD + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueAbstract + +////////////////////////////////////////////////////////////////////// + +// Test that class modifiers cannot have both ACC_VALUE and ACC_ENUM set. +// +class ValueEnum { + 0xCAFEBABE; + 0; // minor version + 57; // version + [28] { // Constant Pool + ; // first element is empty + Method #7 #23; // #1 at 0x0A + Field #3 #24; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #25; // #5 at 0x1C + Field #3 #26; // #6 at 0x21 + class #27; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueEnum"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x36 + Utf8 "LValueEnum;"; // #11 at 0x43 + Utf8 "int_v"; // #12 at 0x4D + Utf8 "I"; // #13 at 0x55 + Utf8 ""; // #14 at 0x59 + Utf8 "()V"; // #15 at 0x62 + Utf8 "Code"; // #16 at 0x68 + Utf8 "LineNumberTable"; // #17 at 0x6F + Utf8 "makeValueEnum"; // #18 at 0x81 + Utf8 "(I)LValueEnum;"; // #19 at 0x8D + Utf8 ""; // #20 at 0x9A + Utf8 "SourceFile"; // #21 at 0xA5 + Utf8 "ValueEnum.java"; // #22 at 0xB2 + NameAndType #14 #15; // #23 at 0xBF + NameAndType #12 #13; // #24 at 0xC4 + NameAndType #18 #19; // #25 at 0xC9 + NameAndType #8 #11; // #26 at 0xCE + Utf8 "java/lang/Object"; // #27 at 0xD3 + } // Constant Pool + + 0x04130; // access [ ACC_VALUE ACC_ENUM(bad) ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF0 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xF8 + 0x0010; // access + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x0102 + 0x0000; // access + #14; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x010A + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0126 + [3] { // LineNumberTable + 0 4; // at 0x0132 + 4 5; // at 0x0136 + 9 6; // at 0x013A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x013A + 0x0008; // access + #18; // name_cpx + #19; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x0142 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0160 + [3] { // LineNumberTable + 0 8; // at 0x016C + 4 9; // at 0x0170 + 10 10; // at 0x0174 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0174 + 0x0008; // access + #20; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x017C + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0197 + [1] { // LineNumberTable + 0 2; // at 0x01A3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x01A5 + #22; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x01AD + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueEnum + +////////////////////////////////////////////////////////////////////// + +// Test that value type fields must be final. +// +class ValueFieldNotFinal { + 0xCAFEBABE; + 0; // minor version + 57; // version + [28] { // Constant Pool + ; // first element is empty + Method #7 #23; // #1 at 0x0A + Field #3 #24; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #25; // #5 at 0x1C + Field #3 #26; // #6 at 0x21 + class #27; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueFieldNotFinal"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x36 + Utf8 "LValueFieldNotFinal;"; // #11 at 0x43 + Utf8 "int_v"; // #12 at 0x4D + Utf8 "I"; // #13 at 0x55 + Utf8 ""; // #14 at 0x59 + Utf8 "()V"; // #15 at 0x62 + Utf8 "Code"; // #16 at 0x68 + Utf8 "LineNumberTable"; // #17 at 0x6F + Utf8 "makeValueFieldNotFinal"; // #18 at 0x81 + Utf8 "(I)LValueFieldNotFinal;"; // #19 at 0x8D + Utf8 ""; // #20 at 0x9A + Utf8 "SourceFile"; // #21 at 0xA5 + Utf8 "ValueFieldNotFinal.java"; // #22 at 0xB2 + NameAndType #14 #15; // #23 at 0xBF + NameAndType #12 #13; // #24 at 0xC4 + NameAndType #18 #19; // #25 at 0xC9 + NameAndType #8 #11; // #26 at 0xCE + Utf8 "java/lang/Object"; // #27 at 0xD3 + } // Constant Pool + + 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF0 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xF8 + 0x0000; // access [ Field not ACC_FINAL(bad) ] + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x0102 + 0x0000; // access + #14; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x010A + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0126 + [3] { // LineNumberTable + 0 4; // at 0x0132 + 4 5; // at 0x0136 + 9 6; // at 0x013A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x013A + 0x0008; // access + #18; // name_cpx + #19; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x0142 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0160 + [3] { // LineNumberTable + 0 8; // at 0x016C + 4 9; // at 0x0170 + 10 10; // at 0x0174 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0174 + 0x0008; // access + #20; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x017C + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0197 + [1] { // LineNumberTable + 0 2; // at 0x01A3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x01A5 + #22; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x01AD + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueFieldNotFinal + +////////////////////////////////////////////////////////////////////// + +// Test that arrays cannot have ACC_FLATTENABLE set. +// +class ValueFlatArray { + 0xCAFEBABE; + 0; // minor version + 57; // version + [32] { // Constant Pool + ; // first element is empty + Method #8 #26; // #1 at 0x0A + Field #4 #27; // #2 at 0x0F + Field #4 #28; // #3 at 0x14 + class #10; // #4 at 0x19 + int 0x01234567; // #5 at 0x1C + Method #4 #29; // #6 at 0x21 + Field #4 #30; // #7 at 0x26 + class #31; // #8 at 0x2B + Utf8 "VT"; // #9 at 0x2E + Utf8 "ValueFlatArray"; // #10 at 0x33 + Utf8 "ValueTypes"; // #11 at 0x40 + Utf8 "LValueFlatArray;"; // #12 at 0x4D + Utf8 "int_v"; // #13 at 0x5C + Utf8 "I"; // #14 at 0x64 + Utf8 "int_a"; // #15 at 0x68 + Utf8 "[I"; // #16 at 0x70 + Utf8 ""; // #17 at 0x75 + Utf8 "()V"; // #18 at 0x7E + Utf8 "Code"; // #19 at 0x84 + Utf8 "LineNumberTable"; // #20 at 0x8B + Utf8 "makeValueFlatArray"; // #21 at 0x9D + Utf8 "(I)LValueFlatArray;"; // #22 at 0xAE + Utf8 ""; // #23 at 0xC0 + Utf8 "SourceFile"; // #24 at 0xCB + Utf8 "ValueFlatArray.java"; // #25 at 0xD8 + NameAndType #17 #18; // #26 at 0xEA + NameAndType #13 #14; // #27 at 0xEF + NameAndType #15 #16; // #28 at 0xF4 + NameAndType #21 #22; // #29 at 0xF9 + NameAndType #9 #12; // #30 at 0xFE + Utf8 "java/lang/Object"; // #31 at 0x0103 + } // Constant Pool + + 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] + #4;// this_cpx + #8;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [3] { // fields + { // Member at 0x0120 + 0x0118; // access + #9; // name_cpx + #12; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x0128 + 0x0010; // access + #13; // name_cpx + #14; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x0130 + 0x0110; // access // access [ ACC_FINAL ACC_FLATTENABLE(bad) ] + #15; // name_cpx + #16; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x013A + 0x0000; // access + #17; // name_cpx + #18; // sig_cpx + [1] { // Attributes + Attr(#19, 51) { // Code at 0x0142 + 2; // max_stack + 1; // max_locals + Bytes[15]{ + 0x2AB700012A04B500; + 0x022A01B50003B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#20, 18) { // LineNumberTable at 0x0163 + [4] { // LineNumberTable + 0 5; // at 0x016F + 4 6; // at 0x0173 + 9 7; // at 0x0177 + 14 8; // at 0x017B + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x017B + 0x0008; // access + #21; // name_cpx + #22; // sig_cpx + [1] { // Attributes + Attr(#19, 44) { // Code at 0x0183 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00044C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#20, 14) { // LineNumberTable at 0x01A1 + [3] { // LineNumberTable + 0 10; // at 0x01AD + 4 11; // at 0x01B1 + 10 12; // at 0x01B5 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x01B5 + 0x0008; // access + #23; // name_cpx + #18; // sig_cpx + [1] { // Attributes + Attr(#19, 33) { // Code at 0x01BD + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1205B80006B30007; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#20, 6) { // LineNumberTable at 0x01D8 + [1] { // LineNumberTable + 0 2; // at 0x01E4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#24, 2) { // SourceFile at 0x01E6 + #25; + } // end SourceFile + ; + Attr(#11, 4) { // ValueTypes at 0x01EE + 0x00010004; + } // end ValueTypes + } // Attributes +} // end class ValueFlatArray + +////////////////////////////////////////////////////////////////////// + +// Test that a value type cannot have a method named . +// +class ValueInitMethod { + 0xCAFEBABE; + 0; // minor version + 57; // version + [28] { // Constant Pool + ; // first element is empty + Method #7 #23; // #1 at 0x0A + Field #3 #24; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #25; // #5 at 0x1C + Field #3 #26; // #6 at 0x21 + class #27; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueInitMethod"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x36 + Utf8 "LValueInitMethod;"; // #11 at 0x43 + Utf8 "int_v"; // #12 at 0x4D + Utf8 "I"; // #13 at 0x55 + Utf8 ""; // #14 at 0x59 + Utf8 "()V"; // #15 at 0x62 + Utf8 "Code"; // #16 at 0x68 + Utf8 "LineNumberTable"; // #17 at 0x6F + Utf8 "makeValueInitMethod"; // #18 at 0x81 + Utf8 "(I)LValueInitMethod;"; // #19 at 0x8D + Utf8 ""; // #20 at 0x9A + Utf8 "SourceFile"; // #21 at 0xA5 + Utf8 "ValueInitMethod.java"; // #22 at 0xB2 + NameAndType #14 #15; // #23 at 0xBF + NameAndType #12 #13; // #24 at 0xC4 + NameAndType #18 #19; // #25 at 0xC9 + NameAndType #8 #11; // #26 at 0xCE + Utf8 "java/lang/Object"; // #27 at 0xD3 + } // Constant Pool + + 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF0 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xF8 + 0x0010; // access + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x0102 + 0x0000; // access + #14; // name_cpx (bad) + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x010A + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0126 + [3] { // LineNumberTable + 0 4; // at 0x0132 + 4 5; // at 0x0136 + 9 6; // at 0x013A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x013A + 0x0008; // access + #18; // name_cpx + #19; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x0142 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0160 + [3] { // LineNumberTable + 0 8; // at 0x016C + 4 9; // at 0x0170 + 10 10; // at 0x0174 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0174 + 0x0008; // access + #20; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x017C + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0197 + [1] { // LineNumberTable + 0 2; // at 0x01A3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x01A5 + #22; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x01AD + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueInitMethod + +////////////////////////////////////////////////////////////////////// + +// Test that class modifiers cannot have both ACC_VALUE and ACC_INTERFACE set. +// +class ValueInterface { + 0xCAFEBABE; + 0; // minor version + 57; // version + [27] { // Constant Pool + ; // first element is empty + Method #7 #21; // #1 at 0x0A + Field #3 #22; // #2 at 0x0F + class #23; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #24; // #5 at 0x1C + Field #3 #25; // #6 at 0x21 + class #26; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "LValueInterface;"; // #9 at 0x2E + Utf8 "int_v"; // #10 at 0x3C + Utf8 "I"; // #11 at 0x44 + Utf8 ""; // #12 at 0x48 + Utf8 "()V"; // #13 at 0x51 + Utf8 "Code"; // #14 at 0x57 + Utf8 "LineNumberTable"; // #15 at 0x5E + Utf8 "makeValueInterface"; // #16 at 0x70 + Utf8 "(I)LValueInterface;"; // #17 at 0x80 + Utf8 ""; // #18 at 0x91 + Utf8 "SourceFile"; // #19 at 0x9C + Utf8 "ValueInterface.java"; // #20 at 0xA9 + NameAndType #12 #13; // #21 at 0xBA + NameAndType #10 #11; // #22 at 0xBF + Utf8 "ValueInterface"; // #23 at 0xC4 + NameAndType #16 #17; // #24 at 0xD0 + NameAndType #8 #9; // #25 at 0xD5 + Utf8 "java/lang/Object"; // #26 at 0xDA + } // Constant Pool + + 0x0330; // access [ ACC_VALUE ACC_INTERFACE(bad) ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF7 + 0x0018; // access + #8; // name_cpx + #9; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xFF + 0x0010; // access + #10; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [1] { // methods + { // Member at 0x0141 + 0x0008; // access + #16; // name_cpx + #17; // sig_cpx + [1] { // Attributes + Attr(#14, 44) { // Code at 0x0149 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#15, 14) { // LineNumberTable at 0x0167 + [3] { // LineNumberTable + 0 8; // at 0x0173 + 4 9; // at 0x0177 + 10 10; // at 0x017B + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [1] { // Attributes + Attr(#19, 2) { // SourceFile at 0x01AC + #20; + } // end SourceFile + } // Attributes +} // end class ValueInterface + +////////////////////////////////////////////////////////////////////// + +// Test that value type instance methods cannot be synchronized. +// +class ValueMethodSynch { + 0xCAFEBABE; + 0; // minor version + 57; // version + [29] { // Constant Pool + ; // first element is empty + Method #7 #24; // #1 at 0x0A + Field #3 #25; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #26; // #5 at 0x1C + Field #3 #27; // #6 at 0x21 + class #28; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueMethodSynch"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x41 + Utf8 "LValueMethodSynch;"; // #11 at 0x4E + Utf8 "int_v"; // #12 at 0x63 + Utf8 "I"; // #13 at 0x6B + Utf8 ""; // #14 at 0x6F + Utf8 "()V"; // #15 at 0x78 + Utf8 "Code"; // #16 at 0x7E + Utf8 "LineNumberTable"; // #17 at 0x85 + Utf8 "instanceMethod"; // #18 at 0x97 + Utf8 "makeValueMethodSynch"; // #19 at 0xA8 + Utf8 "(I)LValueMethodSynch;"; // #20 at 0xBF + Utf8 ""; // #21 at 0xD7 + Utf8 "SourceFile"; // #22 at 0xE2 + Utf8 "ValueMethodSynch.java"; // #23 at 0xEF + NameAndType #14 #15; // #24 at 0x0107 + NameAndType #12 #13; // #25 at 0x010C + NameAndType #19 #20; // #26 at 0x0111 + NameAndType #8 #11; // #27 at 0x0116 + Utf8 "java/lang/Object"; // #28 at 0x011B + } // Constant Pool + + 0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #7;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0x0138 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x0140 + 0x0010; // access + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [4] { // methods + { // Member at 0x014A + 0x0000; // access + #14; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x0152 + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x016E + [3] { // LineNumberTable + 0 4; // at 0x017A + 4 5; // at 0x017E + 9 6; // at 0x0182 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0182 + 0x0020; // access [ ACC_SYNCHRONIZED(bad) ] + #18; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 25) { // Code at 0x018A + 0; // max_stack + 1; // max_locals + Bytes[1]{ + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x019D + [1] { // LineNumberTable + 0 8; // at 0x01A9 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x01A9 + 0x0008; // access + #19; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x01B1 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x01CF + [3] { // LineNumberTable + 0 11; // at 0x01DB + 4 12; // at 0x01DF + 10 13; // at 0x01E3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x01E3 + 0x0008; // access + #21; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x01EB + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0206 + [1] { // LineNumberTable + 0 2; // at 0x0212 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#22, 2) { // SourceFile at 0x0214 + #23; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x021C + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueMethodSynch + +////////////////////////////////////////////////////////////////////// + +// Test that a value type's super class must be java.lang.Object. +// +class ValueSuperClass { + 0xCAFEBABE; + 0; // minor version + 57; // version + [30] { // Constant Pool + ; // first element is empty + Method #7 #23; // #1 at 0x0A + Field #3 #24; // #2 at 0x0F + class #9; // #3 at 0x14 + int 0x01234567; // #4 at 0x17 + Method #3 #25; // #5 at 0x1C + Field #3 #26; // #6 at 0x21 + class #27; // #7 at 0x26 + Utf8 "VT"; // #8 at 0x29 + Utf8 "ValueSuperClass"; // #9 at 0x2E + Utf8 "ValueTypes"; // #10 at 0x36 + Utf8 "LValueSuperClass;"; // #11 at 0x43 + Utf8 "int_v"; // #12 at 0x4D + Utf8 "I"; // #13 at 0x55 + Utf8 ""; // #14 at 0x59 + Utf8 "()V"; // #15 at 0x62 + Utf8 "Code"; // #16 at 0x68 + Utf8 "LineNumberTable"; // #17 at 0x6F + Utf8 "makeValueSuperClass"; // #18 at 0x81 + Utf8 "(I)LValueSuperClass;"; // #19 at 0x8D + Utf8 ""; // #20 at 0x9A + Utf8 "SourceFile"; // #21 at 0xA5 + Utf8 "ValueSuperClass.java"; // #22 at 0xB2 + NameAndType #14 #15; // #23 at 0xBF + NameAndType #12 #13; // #24 at 0xC4 + NameAndType #18 #19; // #25 at 0xC9 + NameAndType #8 #11; // #26 at 0xCE + Utf8 "java/lang/Object"; // #27 at 0xD3 + class #29; // #28 + Utf8 "java/lang/Throwable"; // #29 + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #28;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [2] { // fields + { // Member at 0xF0 + 0x0118; // access + #8; // name_cpx + #11; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0xF8 + 0x0010; // access + #12; // name_cpx + #13; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [3] { // methods + { // Member at 0x0102 + 0x0000; // access + #14; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 42) { // Code at 0x010A + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A04B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0126 + [3] { // LineNumberTable + 0 4; // at 0x0132 + 4 5; // at 0x0136 + 9 6; // at 0x013A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x013A + 0x0008; // access + #18; // name_cpx + #19; // sig_cpx + [1] { // Attributes + Attr(#16, 44) { // Code at 0x0142 + 2; // max_stack + 2; // max_locals + Bytes[12]{ + 0xCB00034C2B1ACC00; + 0x024C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 14) { // LineNumberTable at 0x0160 + [3] { // LineNumberTable + 0 8; // at 0x016C + 4 9; // at 0x0170 + 10 10; // at 0x0174 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0174 + 0x0008; // access + #20; // name_cpx + #15; // sig_cpx + [1] { // Attributes + Attr(#16, 33) { // Code at 0x017C + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1204B80005B30006; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#17, 6) { // LineNumberTable at 0x0197 + [1] { // LineNumberTable + 0 2; // at 0x01A3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#21, 2) { // SourceFile at 0x01A5 + #22; + } // end SourceFile + ; + Attr(#10, 4) { // ValueTypes at 0x01AD + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueSuperClass + +////////////////////////////////////////////////////////////////////// + +// Value types Circ and Circ2 have fields of each other's type. This should +// cause a ClassCircularityError exception when one of them is being loaded. +// +// The value types are based on these two Java classes: +// +// final value class Circ { +// static final Circ VT = makeCirc(0x01234567); +// final int int_v; +// final Circ2 v2; +// Circ() { +// int_v = 1; +// v2 = Circ2.default; +// } +// static Circ makeCirc(int x) { +// Circ v = Circ.default; +// v = __WithField(v.int_v, x); +// return v; +// } +// } +//---------------------------------------------------------------- +// final value class Circ2 { +// static final Circ2 VT = makeCirc2('\u0123'); +// final char char_v; +// final Circ vv; +// Circ2() { +// char_v = 'z'; +// vv = Circ.default; +// } +// static Circ2 makeCirc2(char c) { +// Circ2 v = Circ2.default; +// v = __WithField(v.char_v, c); +// return v; +// } +// } + +class Circ { + 0xCAFEBABE; + 0; // minor version + 57; // version + [69] { // Constant Pool + ; // first element is empty + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCirc;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x53 + Utf8 "I"; // #17 at 0x5B + Utf8 "v2"; // #18 at 0x5F + Utf8 "QCirc2;"; // #19 at 0x64 + Utf8 ""; // #20 at 0x6E + Utf8 "()V"; // #21 at 0x77 + Utf8 "Code"; // #22 at 0x7D + Utf8 "LineNumberTable"; // #23 at 0x84 + Utf8 "makeCirc"; // #24 at 0x96 + Utf8 "(I)QCirc;"; // #25 at 0xA1 + Utf8 "hashCode"; // #26 at 0xAD + Utf8 "()I"; // #27 at 0xB8 + Utf8 "equals"; // #28 at 0xBE + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xC7 + Utf8 "toString"; // #30 at 0xDF + Utf8 "()Ljava/lang/String;"; // #31 at 0xEA + Utf8 "longHashCode"; // #32 at 0x0101 + Utf8 "()J"; // #33 at 0x0110 + Utf8 ""; // #34 at 0x0116 + Utf8 "$makeValue$"; // #35 at 0x0121 + Utf8 "()QCirc;"; // #36 at 0x012F + Utf8 "SourceFile"; // #37 at 0x013A + Utf8 "Circ.java"; // #38 at 0x0147 + NameAndType #20 #21; // #39 at 0x0153 + Utf8 "Circ"; // #40 at 0x0158 + NameAndType #16 #17; // #41 at 0x015F + Utf8 "BootstrapMethods"; // #42 at 0x0164 + MethodHandle 6b #53; // #43 at 0x0177 + NameAndType #26 #54; // #44 at 0x017B + NameAndType #28 #55; // #45 at 0x0180 + NameAndType #30 #56; // #46 at 0x0185 + NameAndType #32 #57; // #47 at 0x018A + NameAndType #24 #25; // #48 at 0x018F + NameAndType #14 #15; // #49 at 0x0194 + Utf8 "Circ2"; // #50 at 0x0199 + NameAndType #18 #19; // #51 at 0x01A1 + Utf8 "java/lang/Object"; // #52 at 0x01A6 + Method #58 #59; // #53 at 0x01B9 + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01BE + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x01D6 + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0200 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x0229 + class #60; // #58 at 0x0241 + NameAndType #61 #65; // #59 at 0x0244 + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x0249 + Utf8 "makeBootstrapMethod"; // #61 at 0x0272 + class #67; // #62 at 0x0288 + Utf8 "Lookup"; // #63 at 0x028B + Utf8 "InnerClasses"; // #64 at 0x0294 + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02A3 + class #68; // #66 at 0x0319 + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x031C + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x0344 + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #2;// this_cpx + #13;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [3] { // fields + { // Member at 0x036F + 0x0018; // access + #14; // name_cpx + #15; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x0377 + 0x0010; // access + #16; // name_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x037F + 0x0010; // access + #18; // name_cpx + #19; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [8] { // methods + { // Member at 0x0389 + 0x0000; // access + #20; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 29) { // Code at 0x0391 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x03A8 + [1] { // LineNumberTable + 0 6; // at 0x03B4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03B4 + 0x0008; // access + #24; // name_cpx + #25; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x03BC + 2; // max_stack + 2; // max_locals + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x03DB + [3] { // LineNumberTable + 0 12; // at 0x03E7 + 4 13; // at 0x03EB + 11 14; // at 0x03EF + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03EF + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x03F7 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0410 + [1] { // LineNumberTable + 0 1; // at 0x041C + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x041C + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x0424 + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x043E + [1] { // LineNumberTable + 0 1; // at 0x044A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x044A + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0452 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x046B + [1] { // LineNumberTable + 0 1; // at 0x0477 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0477 + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x047F + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0498 + [1] { // LineNumberTable + 0 1; // at 0x04A4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04A4 + 0x0008; // access + #34; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 33) { // Code at 0x04AC + 1; // max_stack + 0; // max_locals + Bytes[9]{ + 0x1208B80009B3000A; + 0xB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04C7 + [1] { // LineNumberTable + 0 2; // at 0x04D3 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04D3 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 58) { // Code at 0x04DB + 2; // max_stack + 1; // max_locals + Bytes[22]{ + 0xCB00024B042A5FCC; + 0x00034BCB000B2A5F; + 0xCC000C4B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 18) { // LineNumberTable at 0x0503 + [4] { // LineNumberTable + 0 6; // at 0x050F + 4 7; // at 0x0513 + 11 8; // at 0x0517 + 20 9; // at 0x051B + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x051D + #38; + } // end SourceFile + ; + Attr(#64, 10) { // InnerClasses at 0x0525 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0535 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0535 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods + } // Attributes +} // end class Circ + +class Circ2 { + 0xCAFEBABE; + 0; // minor version + 57; // version + [68] { // Constant Pool + ; // first element is empty + Method #12 #38; // #1 at 0x0A + class #39; // #2 at 0x0F + Field #2 #40; // #3 at 0x12 + InvokeDynamic 0s #43; // #4 at 0x17 + InvokeDynamic 0s #44; // #5 at 0x1C + InvokeDynamic 0s #45; // #6 at 0x21 + InvokeDynamic 0s #46; // #7 at 0x26 + Method #2 #47; // #8 at 0x2B + Field #2 #48; // #9 at 0x30 + class #49; // #10 at 0x35 + Field #2 #50; // #11 at 0x38 + class #51; // #12 at 0x3D + Utf8 "VT"; // #13 at 0x40 + Utf8 "QCirc2;"; // #14 at 0x45 + Utf8 "char_v"; // #15 at 0x4F + Utf8 "C"; // #16 at 0x58 + Utf8 "vv"; // #17 at 0x5C + Utf8 "QCirc;"; // #18 at 0x61 + Utf8 ""; // #19 at 0x6A + Utf8 "()V"; // #20 at 0x73 + Utf8 "Code"; // #21 at 0x79 + Utf8 "LineNumberTable"; // #22 at 0x80 + Utf8 "makeCirc2"; // #23 at 0x92 + Utf8 "(C)QCirc2;"; // #24 at 0x9E + Utf8 "hashCode"; // #25 at 0xAB + Utf8 "()I"; // #26 at 0xB6 + Utf8 "equals"; // #27 at 0xBC + Utf8 "(Ljava/lang/Object;)Z"; // #28 at 0xC5 + Utf8 "toString"; // #29 at 0xDD + Utf8 "()Ljava/lang/String;"; // #30 at 0xE8 + Utf8 "longHashCode"; // #31 at 0xFF + Utf8 "()J"; // #32 at 0x010E + Utf8 ""; // #33 at 0x0114 + Utf8 "$makeValue$"; // #34 at 0x011F + Utf8 "()QCirc2;"; // #35 at 0x012D + Utf8 "SourceFile"; // #36 at 0x0139 + Utf8 "Circ2.java"; // #37 at 0x0146 + NameAndType #19 #20; // #38 at 0x0153 + Utf8 "Circ2"; // #39 at 0x0158 + NameAndType #15 #16; // #40 at 0x0160 + Utf8 "BootstrapMethods"; // #41 at 0x0165 + MethodHandle 6b #52; // #42 at 0x0178 + NameAndType #25 #53; // #43 at 0x017C + NameAndType #27 #54; // #44 at 0x0181 + NameAndType #29 #55; // #45 at 0x0186 + NameAndType #31 #56; // #46 at 0x018B + NameAndType #23 #24; // #47 at 0x0190 + NameAndType #13 #14; // #48 at 0x0195 + Utf8 "Circ"; // #49 at 0x019A + NameAndType #17 #18; // #50 at 0x01A1 + Utf8 "java/lang/Object"; // #51 at 0x01A6 + Method #57 #58; // #52 at 0x01B9 + Utf8 "(Ljava/lang/Object;)I"; // #53 at 0x01BE + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #54 at 0x01D6 + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #55 at 0x0200 + Utf8 "(Ljava/lang/Object;)J"; // #56 at 0x0229 + class #59; // #57 at 0x0241 + NameAndType #60 #64; // #58 at 0x0244 + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #59 at 0x0249 + Utf8 "makeBootstrapMethod"; // #60 at 0x0272 + class #66; // #61 at 0x0288 + Utf8 "Lookup"; // #62 at 0x028B + Utf8 "InnerClasses"; // #63 at 0x0294 + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #64 at 0x02A3 + class #67; // #65 at 0x0319 + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #66 at 0x031C + Utf8 "java/lang/invoke/MethodHandles"; // #67 at 0x0344 + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #2;// this_cpx + #12;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [3] { // fields + { // Member at 0x036F + 0x0018; // access + #13; // name_cpx + #14; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x0377 + 0x0010; // access + #15; // name_cpx + #16; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x037F + 0x0010; // access + #17; // name_cpx + #18; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [8] { // methods + { // Member at 0x0389 + 0x0000; // access + #19; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#21, 29) { // Code at 0x0391 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x03A8 + [1] { // LineNumberTable + 0 6; // at 0x03B4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03B4 + 0x0008; // access + #23; // name_cpx + #24; // sig_cpx + [1] { // Attributes + Attr(#21, 45) { // Code at 0x03BC + 2; // max_stack + 2; // max_locals + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 14) { // LineNumberTable at 0x03DB + [3] { // LineNumberTable + 0 12; // at 0x03E7 + 4 13; // at 0x03EB + 11 14; // at 0x03EF + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03EF + 0x0011; // access + #25; // name_cpx + #26; // sig_cpx + [1] { // Attributes + Attr(#21, 31) { // Code at 0x03F7 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x0410 + [1] { // LineNumberTable + 0 1; // at 0x041C + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x041C + 0x0011; // access + #27; // name_cpx + #28; // sig_cpx + [1] { // Attributes + Attr(#21, 32) { // Code at 0x0424 + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x043E + [1] { // LineNumberTable + 0 1; // at 0x044A + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x044A + 0x0011; // access + #29; // name_cpx + #30; // sig_cpx + [1] { // Attributes + Attr(#21, 31) { // Code at 0x0452 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x046B + [1] { // LineNumberTable + 0 1; // at 0x0477 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0477 + 0x0011; // access + #31; // name_cpx + #32; // sig_cpx + [1] { // Attributes + Attr(#21, 31) { // Code at 0x047F + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x0498 + [1] { // LineNumberTable + 0 1; // at 0x04A4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04A4 + 0x0008; // access + #33; // name_cpx + #20; // sig_cpx + [1] { // Attributes + Attr(#21, 34) { // Code at 0x04AC + 1; // max_stack + 0; // max_locals + Bytes[10]{ + 0x110123B80008B300; + 0x09B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 6) { // LineNumberTable at 0x04C8 + [1] { // LineNumberTable + 0 2; // at 0x04D4 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04D4 + 0x1008; // access + #34; // name_cpx + #35; // sig_cpx + [1] { // Attributes + Attr(#21, 59) { // Code at 0x04DC + 2; // max_stack + 1; // max_locals + Bytes[23]{ + 0xCB00024B107A2A5F; + 0xCC00034BCB000A2A; + 0x5FCC000B4B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#22, 18) { // LineNumberTable at 0x0505 + [4] { // LineNumberTable + 0 6; // at 0x0511 + 4 7; // at 0x0515 + 12 8; // at 0x0519 + 21 9; // at 0x051D + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#36, 2) { // SourceFile at 0x051F + #37; + } // end SourceFile + ; + Attr(#63, 10) { // InnerClasses at 0x0527 + [1] { // InnerClasses + #61 #65 #62 25; // at 0x0537 + } + } // end InnerClasses + ; + Attr(#41, 6) { // BootstrapMethods at 0x0537 + [1] { // bootstrap_methods + { // bootstrap_method + #42; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods + } // Attributes +} // end class Circ2 + + +////////////////////////////////////////////////////////////////////// + +// Value types CircStaticA and CircStaticB have static fields of each other's +// type. This should cause a ClassCircularityError exception when one of them +// is being loaded. +// +// The value types are based on these two Java classes: +// +// final value class CircStaticA { +// static final CircStaticA VT = makeCircStaticA(0x01234567); +// final int int_v; +// static final CircStaticB v2 = CircStaticB.default; +// CircStaticA() { +// int_v = 1; +// } +// static CircStaticA makeCircStaticA(int x) { +// CircStaticA v = CircStaticA.default; +// v = __WithField(v.int_v, x); +// return v; +// } +// } +//---------------------------------------------------------------- +// final value class CircStaticB { +// static final CircStaticB VT = makeCircStaticB(0x01234567); +// final int int_v; +// static final CircStaticA v2 = CircStaticA.default; +// CircStaticB() { +// int_v = 1; +// } +// static CircStaticB makeCircStaticB(int x) { +// CircStaticB v = CircStaticB.default; +// v = __WithField(v.int_v, x); +// return v; +// } +// } + +class CircStaticA { + 0xCAFEBABE; + 0; // minor version + 57; // version + [69] { // Constant Pool + ; // first element is empty + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCircStaticA;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x5A + Utf8 "I"; // #17 at 0x62 + Utf8 "v2"; // #18 at 0x66 + Utf8 "QCircStaticB;"; // #19 at 0x6B + Utf8 ""; // #20 at 0x7B + Utf8 "()V"; // #21 at 0x84 + Utf8 "Code"; // #22 at 0x8A + Utf8 "LineNumberTable"; // #23 at 0x91 + Utf8 "makeCircStaticA"; // #24 at 0xA3 + Utf8 "(I)QCircStaticA;"; // #25 at 0xB5 + Utf8 "hashCode"; // #26 at 0xC8 + Utf8 "()I"; // #27 at 0xD3 + Utf8 "equals"; // #28 at 0xD9 + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xE2 + Utf8 "toString"; // #30 at 0xFA + Utf8 "()Ljava/lang/String;"; // #31 at 0x0105 + Utf8 "longHashCode"; // #32 at 0x011C + Utf8 "()J"; // #33 at 0x012B + Utf8 ""; // #34 at 0x0131 + Utf8 "$makeValue$"; // #35 at 0x013C + Utf8 "()QCircStaticA;"; // #36 at 0x014A + Utf8 "SourceFile"; // #37 at 0x015C + Utf8 "CircStaticA.java"; // #38 at 0x0169 + NameAndType #20 #21; // #39 at 0x017C + Utf8 "CircStaticA"; // #40 at 0x0181 + NameAndType #16 #17; // #41 at 0x018F + Utf8 "BootstrapMethods"; // #42 at 0x0194 + MethodHandle 6b #53; // #43 at 0x01A7 + NameAndType #26 #54; // #44 at 0x01AB + NameAndType #28 #55; // #45 at 0x01B0 + NameAndType #30 #56; // #46 at 0x01B5 + NameAndType #32 #57; // #47 at 0x01BA + NameAndType #24 #25; // #48 at 0x01BF + NameAndType #14 #15; // #49 at 0x01C4 + Utf8 "CircStaticB"; // #50 at 0x01C9 + NameAndType #18 #19; // #51 at 0x01D7 + Utf8 "java/lang/Object"; // #52 at 0x01DC + Method #58 #59; // #53 at 0x01EF + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01F4 + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x020C + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0236 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x025F + class #60; // #58 at 0x0277 + NameAndType #61 #65; // #59 at 0x027A + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x027F + Utf8 "makeBootstrapMethod"; // #61 at 0x02A8 + class #67; // #62 at 0x02BE + Utf8 "Lookup"; // #63 at 0x02C1 + Utf8 "InnerClasses"; // #64 at 0x02CA + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02D9 + class #68; // #66 at 0x034F + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x0352 + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x037A + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #2;// this_cpx + #13;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [3] { // fields + { // Member at 0x03A5 + 0x0018; // access + #14; // name_cpx + #15; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03AD + 0x0010; // access + #16; // name_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03B5 + 0x0018; // access + #18; // name_cpx + #19; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [8] { // methods + { // Member at 0x03BF + 0x0000; // access + #20; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 29) { // Code at 0x03C7 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x03DE + [1] { // LineNumberTable + 0 6; // at 0x03EA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03EA + 0x0008; // access + #24; // name_cpx + #25; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x03F2 + 2; // max_stack + 2; // max_locals + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x0411 + [3] { // LineNumberTable + 0 11; // at 0x041D + 4 12; // at 0x0421 + 11 13; // at 0x0425 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0425 + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x042D + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0446 + [1] { // LineNumberTable + 0 1; // at 0x0452 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0452 + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x045A + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0474 + [1] { // LineNumberTable + 0 1; // at 0x0480 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0480 + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0488 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04A1 + [1] { // LineNumberTable + 0 1; // at 0x04AD + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04AD + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x04B5 + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04CE + [1] { // LineNumberTable + 0 1; // at 0x04DA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04DA + 0x0008; // access + #34; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 43) { // Code at 0x04E2 + 1; // max_stack + 0; // max_locals + Bytes[15]{ + 0x1208B80009B3000A; + 0xCB000BB3000CB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 10) { // LineNumberTable at 0x0503 + [2] { // LineNumberTable + 0 2; // at 0x050F + 8 4; // at 0x0513 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0513 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x051B + 2; // max_stack + 1; // max_locals + Bytes[13]{ + 0xCB00024B042A5FCC; + 0x00034B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x053A + [3] { // LineNumberTable + 0 6; // at 0x0546 + 4 7; // at 0x054A + 11 8; // at 0x054E + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x0550 + #38; + } // end SourceFile + ; + Attr(#64, 10) { // InnerClasses at 0x0558 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0568 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0568 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods + } // Attributes +} // end class CircStaticA + + +class CircStaticB { + 0xCAFEBABE; + 0; // minor version + 57; // version + [69] { // Constant Pool + ; // first element is empty + Method #13 #39; // #1 at 0x0A + class #40; // #2 at 0x0F + Field #2 #41; // #3 at 0x12 + InvokeDynamic 0s #44; // #4 at 0x17 + InvokeDynamic 0s #45; // #5 at 0x1C + InvokeDynamic 0s #46; // #6 at 0x21 + InvokeDynamic 0s #47; // #7 at 0x26 + int 0x01234567; // #8 at 0x2B + Method #2 #48; // #9 at 0x30 + Field #2 #49; // #10 at 0x35 + class #50; // #11 at 0x3A + Field #2 #51; // #12 at 0x3D + class #52; // #13 at 0x42 + Utf8 "VT"; // #14 at 0x45 + Utf8 "QCircStaticB;"; // #15 at 0x4A + Utf8 "int_v"; // #16 at 0x5A + Utf8 "I"; // #17 at 0x62 + Utf8 "v2"; // #18 at 0x66 + Utf8 "QCircStaticA;"; // #19 at 0x6B + Utf8 ""; // #20 at 0x7B + Utf8 "()V"; // #21 at 0x84 + Utf8 "Code"; // #22 at 0x8A + Utf8 "LineNumberTable"; // #23 at 0x91 + Utf8 "makeCircStaticB"; // #24 at 0xA3 + Utf8 "(I)QCircStaticB;"; // #25 at 0xB5 + Utf8 "hashCode"; // #26 at 0xC8 + Utf8 "()I"; // #27 at 0xD3 + Utf8 "equals"; // #28 at 0xD9 + Utf8 "(Ljava/lang/Object;)Z"; // #29 at 0xE2 + Utf8 "toString"; // #30 at 0xFA + Utf8 "()Ljava/lang/String;"; // #31 at 0x0105 + Utf8 "longHashCode"; // #32 at 0x011C + Utf8 "()J"; // #33 at 0x012B + Utf8 ""; // #34 at 0x0131 + Utf8 "$makeValue$"; // #35 at 0x013C + Utf8 "()QCircStaticB;"; // #36 at 0x014A + Utf8 "SourceFile"; // #37 at 0x015C + Utf8 "CircStaticB.java"; // #38 at 0x0169 + NameAndType #20 #21; // #39 at 0x017C + Utf8 "CircStaticB"; // #40 at 0x0181 + NameAndType #16 #17; // #41 at 0x018F + Utf8 "BootstrapMethods"; // #42 at 0x0194 + MethodHandle 6b #53; // #43 at 0x01A7 + NameAndType #26 #54; // #44 at 0x01AB + NameAndType #28 #55; // #45 at 0x01B0 + NameAndType #30 #56; // #46 at 0x01B5 + NameAndType #32 #57; // #47 at 0x01BA + NameAndType #24 #25; // #48 at 0x01BF + NameAndType #14 #15; // #49 at 0x01C4 + Utf8 "CircStaticA"; // #50 at 0x01C9 + NameAndType #18 #19; // #51 at 0x01D7 + Utf8 "java/lang/Object"; // #52 at 0x01DC + Method #58 #59; // #53 at 0x01EF + Utf8 "(Ljava/lang/Object;)I"; // #54 at 0x01F4 + Utf8 "(Ljava/lang/Object;Ljava/lang/Object;)Z"; // #55 at 0x020C + Utf8 "(Ljava/lang/Object;)Ljava/lang/String;"; // #56 at 0x0236 + Utf8 "(Ljava/lang/Object;)J"; // #57 at 0x025F + class #60; // #58 at 0x0277 + NameAndType #61 #65; // #59 at 0x027A + Utf8 "java/lang/invoke/ValueBootstrapMethods"; // #60 at 0x027F + Utf8 "makeBootstrapMethod"; // #61 at 0x02A8 + class #67; // #62 at 0x02BE + Utf8 "Lookup"; // #63 at 0x02C1 + Utf8 "InnerClasses"; // #64 at 0x02CA + Utf8 "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;"; // #65 at 0x02D9 + class #68; // #66 at 0x034F + Utf8 "java/lang/invoke/MethodHandles$Lookup"; // #67 at 0x0352 + Utf8 "java/lang/invoke/MethodHandles"; // #68 at 0x037A + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #2;// this_cpx + #13;// super_cpx + + [0] { // Interfaces + } // Interfaces + + [3] { // fields + { // Member at 0x03A5 + 0x0018; // access + #14; // name_cpx + #15; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03AD + 0x0010; // access + #16; // name_cpx + #17; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + ; + { // Member at 0x03B5 + 0x0018; // access + #18; // name_cpx + #19; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [8] { // methods + { // Member at 0x03BF + 0x0000; // access + #20; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 29) { // Code at 0x03C7 + 1; // max_stack + 1; // max_locals + Bytes[5]{ + 0x2AB70001B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x03DE + [1] { // LineNumberTable + 0 6; // at 0x03EA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x03EA + 0x0008; // access + #24; // name_cpx + #25; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x03F2 + 2; // max_stack + 2; // max_locals + Bytes[13]{ + 0xCB00024C1A2B5FCC; + 0x00034C2BB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x0411 + [3] { // LineNumberTable + 0 11; // at 0x041D + 4 12; // at 0x0421 + 11 13; // at 0x0425 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0425 + 0x0011; // access + #26; // name_cpx + #27; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x042D + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00040000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0446 + [1] { // LineNumberTable + 0 1; // at 0x0452 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0452 + 0x0011; // access + #28; // name_cpx + #29; // sig_cpx + [1] { // Attributes + Attr(#22, 32) { // Code at 0x045A + 2; // max_stack + 2; // max_locals + Bytes[8]{ + 0x2A2BBA00050000AC; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x0474 + [1] { // LineNumberTable + 0 1; // at 0x0480 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0480 + 0x0011; // access + #30; // name_cpx + #31; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x0488 + 1; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00060000B0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04A1 + [1] { // LineNumberTable + 0 1; // at 0x04AD + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04AD + 0x0011; // access + #32; // name_cpx + #33; // sig_cpx + [1] { // Attributes + Attr(#22, 31) { // Code at 0x04B5 + 2; // max_stack + 1; // max_locals + Bytes[7]{ + 0x2ABA00070000AD; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 6) { // LineNumberTable at 0x04CE + [1] { // LineNumberTable + 0 1; // at 0x04DA + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x04DA + 0x0008; // access + #34; // name_cpx + #21; // sig_cpx + [1] { // Attributes + Attr(#22, 43) { // Code at 0x04E2 + 1; // max_stack + 0; // max_locals + Bytes[15]{ + 0x1208B80009B3000A; + 0xCB000BB3000CB1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 10) { // LineNumberTable at 0x0503 + [2] { // LineNumberTable + 0 2; // at 0x050F + 8 4; // at 0x0513 + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + ; + { // Member at 0x0513 + 0x1008; // access + #35; // name_cpx + #36; // sig_cpx + [1] { // Attributes + Attr(#22, 45) { // Code at 0x051B + 2; // max_stack + 1; // max_locals + Bytes[13]{ + 0xCB00024B042A5FCC; + 0x00034B2AB0; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#23, 14) { // LineNumberTable at 0x053A + [3] { // LineNumberTable + 0 6; // at 0x0546 + 4 7; // at 0x054A + 11 8; // at 0x054E + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [3] { // Attributes + Attr(#37, 2) { // SourceFile at 0x0550 + #38; + } // end SourceFile + ; + Attr(#64, 10) { // InnerClasses at 0x0558 + [1] { // InnerClasses + #62 #66 #63 25; // at 0x0568 + } + } // end InnerClasses + ; + Attr(#42, 6) { // BootstrapMethods at 0x0568 + [1] { // bootstrap_methods + { // bootstrap_method + #43; // bootstrap_method_ref + [0] { // bootstrap_arguments + } // bootstrap_arguments + } // bootstrap_method + } + } // end BootstrapMethods + } // Attributes +} // end class CircStaticB + + +////////////////////////////////////////////////////////////////////// + +// Test that a value type cannot be Cloneable. +// +// final value class ValueCloneable implements Cloneable { +// final int field; +// private ValueCloneable() { field = 0; } +//} + +class ValueCloneable { + 0xCAFEBABE; + 0; // minor version + 57; // version + [20] { // Constant Pool + ; // first element is empty + Method #4 #14; // #1 at 0x0A + Field #3 #15; // #2 at 0x0F + class #16; // #3 at 0x14 + class #18; // #4 at 0x17 + class #19; // #5 at 0x1A + Utf8 "field"; // #6 at 0x1D + Utf8 "I"; // #7 at 0x25 + Utf8 ""; // #8 at 0x29 + Utf8 "()V"; // #9 at 0x32 + Utf8 "Code"; // #10 at 0x38 + Utf8 "LineNumberTable"; // #11 at 0x3F + Utf8 "SourceFile"; // #12 at 0x51 + Utf8 "ValueCloneable.java"; // #13 at 0x5E + NameAndType #8 #9; // #14 at 0x74 + NameAndType #6 #7; // #15 at 0x79 + Utf8 "ValueCloneable"; // #16 at 0x7E + Utf8 "ValueTypes"; // #17 at 0x8F + Utf8 "java/lang/Object"; // #18 at 0x9C + Utf8 "java/lang/Cloneable"; // #19 at 0xAF + } // Constant Pool + + 0x0130; // access [ ACC_SUPER ACC_FINAL ] + #3;// this_cpx + #4;// super_cpx + + [1] { // Interfaces + #5; + } // Interfaces + + [1] { // fields + { // Member at 0xD1 + 0x0010; // access + #6; // name_cpx + #7; // sig_cpx + [0] { // Attributes + } // Attributes + } // Member + } // fields + + [1] { // methods + { // Member at 0xDB + 0x0002; // access + #8; // name_cpx + #9; // sig_cpx + [1] { // Attributes + Attr(#10, 34) { // Code at 0xE3 + 2; // max_stack + 1; // max_locals + Bytes[10]{ + 0x2AB700012A03B500; + 0x02B1; + }; + [0] { // Traps + } // end Traps + [1] { // Attributes + Attr(#11, 6) { // LineNumberTable at 0xFF + [1] { // LineNumberTable + 0 3; // at 0x010B + } + } // end LineNumberTable + } // Attributes + } // end Code + } // Attributes + } // Member + } // methods + + [2] { // Attributes + Attr(#12, 2) { // SourceFile at 0x010D + #13; + } // end SourceFile + ; + Attr(#17, 4) { // ValueTypes at 0x0115 + 0x00010003; + } // end ValueTypes + } // Attributes +} // end class ValueCloneable