< prev index next >

test/hotspot/jtreg/runtime/valhalla/valuetypes/classfileparser/cfpTests.jcod

Print this page




  32 // final __ByValue class Value {
  33 //     static final Value VT = makeValue(0x01234567);
  34 //     final int int_v;
  35 //     Value() {
  36 //         int_v = 1;
  37 //     }
  38 //     static Value makeValue(int x) {
  39 //         Value v = __MakeDefault Value();
  40 //         v = __WithField(v.int_v, x);
  41 //         return v;
  42 //     }
  43 // }
  44 
  45 
  46 // Test that class modifiers cannot have both ACC_VALUE and ACC_ABSTRATCT set.
  47 //
  48 class ValueAbstract {
  49   0xCAFEBABE;
  50   0; // minor version
  51   55; // version
  52   [27] { // Constant Pool
  53     ; // first element is empty
  54     Method #7 #21; // #1     at 0x0A
  55     Field #3 #22; // #2     at 0x0F
  56     class #23; // #3     at 0x14
  57     int 0x01234567; // #4     at 0x17
  58     Method #3 #24; // #5     at 0x1C
  59     Field #3 #25; // #6     at 0x21
  60     class #26; // #7     at 0x26
  61     Utf8 "VT"; // #8     at 0x29
  62     Utf8 "LValueAbstract;"; // #9     at 0x2E
  63     Utf8 "int_v"; // #10     at 0x3C
  64     Utf8 "I"; // #11     at 0x44
  65     Utf8 "<init>"; // #12     at 0x48
  66     Utf8 "()V"; // #13     at 0x51
  67     Utf8 "Code"; // #14     at 0x57
  68     Utf8 "LineNumberTable"; // #15     at 0x5E
  69     Utf8 "makeValueAbstract"; // #16     at 0x70
  70     Utf8 "(I)LValueAbstract;"; // #17     at 0x80
  71     Utf8 "<clinit>"; // #18     at 0x91
  72     Utf8 "SourceFile"; // #19     at 0x9C
  73     Utf8 "ValueAbstract.java"; // #20     at 0xA9
  74     NameAndType #12 #13; // #21     at 0xBA
  75     NameAndType #10 #11; // #22     at 0xBF
  76     Utf8 "ValueAbstract"; // #23     at 0xC4
  77     NameAndType #16 #17; // #24     at 0xD0
  78     NameAndType #8 #9; // #25     at 0xD5
  79     Utf8 "java/lang/Object"; // #26     at 0xDA

  80   } // Constant Pool
  81 
  82   0x0530; // access [ ACC_VALUE ACC_ABSTRACT(bad) ACC_SUPER ACC_FINAL ]
  83   #3;// this_cpx
  84   #7;// super_cpx
  85 
  86   [0] { // Interfaces
  87   } // Interfaces
  88 
  89   [2] { // fields
  90     { // Member at 0xF7
  91       0x0018; // access
  92       #8; // name_cpx
  93       #9; // sig_cpx
  94       [0] { // Attributes
  95       } // Attributes
  96     } // Member
  97     ;
  98     { // Member at 0xFF
  99       0x0010; // access
 100       #10; // name_cpx
 101       #11; // sig_cpx
 102       [0] { // Attributes
 103       } // Attributes
 104     } // Member
 105   } // fields
 106 
 107   [1] { // methods
 108     { // Member at 0x0141



























 109       0x0008; // access
 110       #16; // name_cpx
 111       #17; // sig_cpx
 112       [1] { // Attributes
 113         Attr(#14, 44) { // Code at 0x0149
 114           2; // max_stack
 115           2; // max_locals
 116           Bytes[12]{
 117             0xCB00034C2B1ACC00;
 118             0x024C2BB0;
 119           };
 120           [0] { // Traps
 121           } // end Traps
 122           [1] { // Attributes
 123             Attr(#15, 14) { // LineNumberTable at 0x0167
 124               [3] { // LineNumberTable
 125                 0  8; //  at 0x0173
 126                 4  9; //  at 0x0177
 127                 10  10; //  at 0x017B

























 128               }
 129             } // end LineNumberTable
 130           } // Attributes
 131         } // end Code
 132       } // Attributes
 133     } // Member
 134   } // methods
 135 
 136   [1] { // Attributes
 137     Attr(#19, 2) { // SourceFile at 0x01AC
 138       #20;
 139     } // end SourceFile




 140   } // Attributes
 141 } // end class ValueAbstract
 142 
 143 //////////////////////////////////////////////////////////////////////
 144 
 145 // Test that class modifiers cannot have both ACC_VALUE and ACC_ENUM set.
 146 //
 147 class ValueEnum {
 148   0xCAFEBABE;
 149   0; // minor version
 150   55; // version
 151   [27] { // Constant Pool
 152     ; // first element is empty
 153     Method #7 #21; // #1     at 0x0A
 154     Field #3 #22; // #2     at 0x0F
 155     class #23; // #3     at 0x14
 156     int 0x01234567; // #4     at 0x17
 157     Method #3 #24; // #5     at 0x1C
 158     Field #3 #25; // #6     at 0x21
 159     class #26; // #7     at 0x26
 160     Utf8 "VT"; // #8     at 0x29
 161     Utf8 "LValueEnum;"; // #9     at 0x2E
 162     Utf8 "int_v"; // #10     at 0x3C
 163     Utf8 "I"; // #11     at 0x44
 164     Utf8 "<init>"; // #12     at 0x48
 165     Utf8 "()V"; // #13     at 0x51
 166     Utf8 "Code"; // #14     at 0x57
 167     Utf8 "LineNumberTable"; // #15     at 0x5E
 168     Utf8 "makeValueEnum"; // #16     at 0x70
 169     Utf8 "(I)LValueEnum;"; // #17     at 0x80
 170     Utf8 "<clinit>"; // #18     at 0x91
 171     Utf8 "SourceFile"; // #19     at 0x9C
 172     Utf8 "ValueEnum.java"; // #20     at 0xA9
 173     NameAndType #12 #13; // #21     at 0xBA
 174     NameAndType #10 #11; // #22     at 0xBF
 175     Utf8 "ValueEnum"; // #23     at 0xC4
 176     NameAndType #16 #17; // #24     at 0xD0
 177     NameAndType #8 #9; // #25     at 0xD5
 178     Utf8 "java/lang/Object"; // #26     at 0xDA

 179   } // Constant Pool
 180 
 181   0x4130; // access [ ACC_VALUE ACC_ENUM(bad) ACC_SUPER ACC_FINAL ]
 182   #3;// this_cpx
 183   #7;// super_cpx
 184 
 185   [0] { // Interfaces
 186   } // Interfaces
 187 
 188   [2] { // fields
 189     { // Member at 0xF7
 190       0x0018; // access
 191       #8; // name_cpx
 192       #9; // sig_cpx
 193       [0] { // Attributes
 194       } // Attributes
 195     } // Member
 196     ;
 197     { // Member at 0xFF
 198       0x0010; // access
 199       #10; // name_cpx
 200       #11; // sig_cpx
 201       [0] { // Attributes
 202       } // Attributes
 203     } // Member
 204   } // fields
 205 
 206   [1] { // methods
 207     { // Member at 0x0141



























 208       0x0008; // access
 209       #16; // name_cpx
 210       #17; // sig_cpx
 211       [1] { // Attributes
 212         Attr(#14, 44) { // Code at 0x0149
 213           2; // max_stack
 214           2; // max_locals
 215           Bytes[12]{
 216             0xCB00034C2B1ACC00;
 217             0x024C2BB0;
 218           };
 219           [0] { // Traps
 220           } // end Traps
 221           [1] { // Attributes
 222             Attr(#15, 14) { // LineNumberTable at 0x0167
 223               [3] { // LineNumberTable
 224                 0  8; //  at 0x0173
 225                 4  9; //  at 0x0177
 226                 10  10; //  at 0x017B

























 227               }
 228             } // end LineNumberTable
 229           } // Attributes
 230         } // end Code
 231       } // Attributes
 232     } // Member
 233   } // methods
 234 
 235   [1] { // Attributes
 236     Attr(#19, 2) { // SourceFile at 0x01AC
 237       #20;
 238     } // end SourceFile




 239   } // Attributes
 240 } // end class ValueEnum
 241 
 242 //////////////////////////////////////////////////////////////////////
 243 
 244 // Test that value type fields must be final.
 245 //
 246 class ValueFieldNotFinal {
 247   0xCAFEBABE;
 248   0; // minor version
 249   55; // version
 250   [27] { // Constant Pool
 251     ; // first element is empty
 252     Method #7 #21; // #1     at 0x0A
 253     Field #3 #22; // #2     at 0x0F
 254     class #23; // #3     at 0x14
 255     int 0x01234567; // #4     at 0x17
 256     Method #3 #24; // #5     at 0x1C
 257     Field #3 #25; // #6     at 0x21
 258     class #26; // #7     at 0x26
 259     Utf8 "VT"; // #8     at 0x29
 260     Utf8 "LValueFieldNotFinal;"; // #9     at 0x2E
 261     Utf8 "int_v"; // #10     at 0x3C
 262     Utf8 "I"; // #11     at 0x44
 263     Utf8 "<init>"; // #12     at 0x48
 264     Utf8 "()V"; // #13     at 0x51
 265     Utf8 "Code"; // #14     at 0x57
 266     Utf8 "LineNumberTable"; // #15     at 0x5E
 267     Utf8 "makeValueFieldNotFinal"; // #16     at 0x70
 268     Utf8 "(I)LValueFieldNotFinal;"; // #17     at 0x80
 269     Utf8 "<clinit>"; // #18     at 0x91
 270     Utf8 "SourceFile"; // #19     at 0x9C
 271     Utf8 "ValueFieldNotFinal.java"; // #20     at 0xA9
 272     NameAndType #12 #13; // #21     at 0xBA
 273     NameAndType #10 #11; // #22     at 0xBF
 274     Utf8 "ValueFieldNotFinal"; // #23     at 0xC4
 275     NameAndType #16 #17; // #24     at 0xD0
 276     NameAndType #8 #9; // #25     at 0xD5
 277     Utf8 "java/lang/Object"; // #26     at 0xDA

 278   } // Constant Pool
 279 
 280   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 281   #3;// this_cpx
 282   #7;// super_cpx
 283 
 284   [0] { // Interfaces
 285   } // Interfaces
 286 
 287   [2] { // fields
 288     { // Member at 0xF7
 289       0x0018; // access
 290       #8; // name_cpx
 291       #9; // sig_cpx
 292       [0] { // Attributes
 293       } // Attributes
 294     } // Member
 295     ;
 296     { // Member at 0xFF
 297       0x0000; // access [ Field not ACC_FINAL(bad) ]
 298       #10; // name_cpx
 299       #11; // sig_cpx
 300       [0] { // Attributes
 301       } // Attributes
 302     } // Member
 303   } // fields
 304 
 305   [1] { // methods
 306     { // Member at 0x0141



























 307       0x0008; // access
 308       #16; // name_cpx
 309       #17; // sig_cpx
 310       [1] { // Attributes
 311         Attr(#14, 44) { // Code at 0x0149
 312           2; // max_stack
 313           2; // max_locals
 314           Bytes[12]{
 315             0xCB00034C2B1ACC00;
 316             0x024C2BB0;
 317           };
 318           [0] { // Traps
 319           } // end Traps
 320           [1] { // Attributes
 321             Attr(#15, 14) { // LineNumberTable at 0x0167
 322               [3] { // LineNumberTable
 323                 0  8; //  at 0x0173
 324                 4  9; //  at 0x0177
 325                 10  10; //  at 0x017B

























 326               }
 327             } // end LineNumberTable
 328           } // Attributes
 329         } // end Code
 330       } // Attributes
 331     } // Member
 332   } // methods
 333 
 334   [1] { // Attributes
 335     Attr(#19, 2) { // SourceFile at 0x01AC
 336       #20;
 337     } // end SourceFile




 338   } // Attributes
 339 } // end class ValueFieldNotFinal
 340 
 341 //////////////////////////////////////////////////////////////////////
 342 
 343 // Test that arrays cannot have ACC_FLATTENABLE set.
 344 //
 345 class ValueFlatArray {
 346   0xCAFEBABE;
 347   0; // minor version
 348   55; // version
 349   [31] { // Constant Pool
 350     ; // first element is empty
 351     Method #8 #24; // #1     at 0x0A
 352     Field #4 #25; // #2     at 0x0F
 353     Field #4 #26; // #3     at 0x14
 354     class #27; // #4     at 0x19
 355     int 0x01234567; // #5     at 0x1C
 356     Method #4 #28; // #6     at 0x21
 357     Field #4 #29; // #7     at 0x26
 358     class #30; // #8     at 0x2B
 359     Utf8 "VT"; // #9     at 0x2E
 360     Utf8 "LValueFlatArray;"; // #10     at 0x33
 361     Utf8 "int_v"; // #11     at 0x46
 362     Utf8 "I"; // #12     at 0x4E
 363     Utf8 "int_a"; // #13     at 0x52
 364     Utf8 "[I"; // #14     at 0x5A
 365     Utf8 "<init>"; // #15     at 0x5F
 366     Utf8 "()V"; // #16     at 0x68
 367     Utf8 "Code"; // #17     at 0x6E
 368     Utf8 "LineNumberTable"; // #18     at 0x75
 369     Utf8 "makeValueFlatArray"; // #19     at 0x87
 370     Utf8 "(I)LValueFlatArray;"; // #20     at 0x9C
 371     Utf8 "<clinit>"; // #21     at 0xB2
 372     Utf8 "SourceFile"; // #22     at 0xBD
 373     Utf8 "ValueFlatArray.java"; // #23     at 0xCA
 374     NameAndType #15 #16; // #24     at 0xE0
 375     NameAndType #11 #12; // #25     at 0xE5
 376     NameAndType #13 #14; // #26     at 0xEA
 377     Utf8 "ValueFlatArray"; // #27     at 0xEF
 378     NameAndType #19 #20; // #28     at 0x0100
 379     NameAndType #9 #10; // #29     at 0x0105
 380     Utf8 "java/lang/Object"; // #30     at 0x010A

 381   } // Constant Pool
 382 
 383   0x0130; // access [ ACC_SUPER ACC_FINAL ]
 384   #4;// this_cpx
 385   #8;// super_cpx
 386 
 387   [0] { // Interfaces
 388   } // Interfaces
 389 
 390   [3] { // fields
 391     { // Member at 0x0127
 392       0x0018; // access
 393       #9; // name_cpx
 394       #10; // sig_cpx
 395       [0] { // Attributes
 396       } // Attributes
 397     } // Member
 398     ;
 399     { // Member at 0x012F
 400       0x0010; // access
 401       #11; // name_cpx
 402       #12; // sig_cpx
 403       [0] { // Attributes
 404       } // Attributes
 405     } // Member
 406     ;
 407     { // Member at 0x0137
 408       0x0110; // access [ ACC_FINAL ACC_FLATTENABLE(bad) ]
 409       #13; // name_cpx
 410       #14; // sig_cpx
 411       [0] { // Attributes
 412       } // Attributes
 413     } // Member
 414   } // fields
 415 
 416   [1] { // methods
 417     { // Member at 0x018F




























 418       0x0008; // access
 419       #19; // name_cpx
 420       #20; // sig_cpx
 421       [1] { // Attributes
 422         Attr(#17, 44) { // Code at 0x0197
 423           2; // max_stack
 424           2; // max_locals
 425           Bytes[12]{
 426             0xCB00044C2B1ACC00;
 427             0x024C2BB0;
 428           };
 429           [0] { // Traps
 430           } // end Traps
 431           [1] { // Attributes
 432             Attr(#18, 14) { // LineNumberTable at 0x01B5
 433               [3] { // LineNumberTable
 434                 0  11; //  at 0x01C1
 435                 4  12; //  at 0x01C5
 436                 10  13; //  at 0x01C9

























 437               }
 438             } // end LineNumberTable
 439           } // Attributes
 440         } // end Code
 441       } // Attributes
 442     } // Member
 443   } // methods
 444 
 445   [1] { // Attributes
 446     Attr(#22, 2) { // SourceFile at 0x01FA
 447       #23;
 448     } // end SourceFile




 449   } // Attributes
 450 } // end class ValueFlatArray
 451 
 452 //////////////////////////////////////////////////////////////////////
 453 
 454 // Test that a value type cannot have a method named <init>.
 455 //
 456 class ValueInitMethod {
 457   0xCAFEBABE;
 458   0; // minor version
 459   55; // version
 460   [27] { // Constant Pool
 461     ; // first element is empty
 462     Method #7 #21; // #1     at 0x0A
 463     Field #3 #22; // #2     at 0x0F
 464     class #23; // #3     at 0x14
 465     int 0x01234567; // #4     at 0x17
 466     Method #3 #24; // #5     at 0x1C
 467     Field #3 #25; // #6     at 0x21
 468     class #26; // #7     at 0x26
 469     Utf8 "VT"; // #8     at 0x29
 470     Utf8 "LValueInitMethod;"; // #9     at 0x2E
 471     Utf8 "int_v"; // #10     at 0x42
 472     Utf8 "I"; // #11     at 0x4A
 473     Utf8 "<init>"; // #12     at 0x4E
 474     Utf8 "()V"; // #13     at 0x57
 475     Utf8 "Code"; // #14     at 0x5D
 476     Utf8 "LineNumberTable"; // #15     at 0x64
 477     Utf8 "makeValueInitMethod"; // #16     at 0x76
 478     Utf8 "(I)LValueInitMethod;"; // #17     at 0x8C
 479     Utf8 "<clinit>"; // #18     at 0xA3
 480     Utf8 "SourceFile"; // #19     at 0xAE
 481     Utf8 "ValueInitMethod.java"; // #20     at 0xBB
 482     NameAndType #12 #13; // #21     at 0xD2
 483     NameAndType #10 #11; // #22     at 0xD7
 484     Utf8 "ValueInitMethod"; // #23     at 0xDC
 485     NameAndType #16 #17; // #24     at 0xEE
 486     NameAndType #8 #9; // #25     at 0xF3
 487     Utf8 "java/lang/Object"; // #26     at 0xF8

 488   } // Constant Pool
 489 
 490   0x0130; // access [ ACC_SUPER ACC_FINAL ]
 491   #3;// this_cpx
 492   #7;// super_cpx
 493 
 494   [0] { // Interfaces
 495   } // Interfaces
 496 
 497   [2] { // fields
 498     { // Member at 0x0115
 499       0x0018; // access
 500       #8; // name_cpx
 501       #9; // sig_cpx
 502       [0] { // Attributes
 503       } // Attributes
 504     } // Member
 505     ;
 506     { // Member at 0x011D
 507       0x0010; // access
 508       #10; // name_cpx
 509       #11; // sig_cpx
 510       [0] { // Attributes
 511       } // Attributes
 512     } // Member
 513   } // fields
 514 
 515   [2] { // methods
 516     { // Member at 0x0127
 517       0x0000; // access
 518       #12; // name_cpx (bad) <init>
 519       #13; // sig_cpx
 520       [1] { // Attributes
 521         Attr(#14, 42) { // Code at 0x012F
 522           2; // max_stack
 523           1; // max_locals
 524           Bytes[10]{
 525             0x2AB700012A04B500;
 526             0x02B1;
 527           };
 528           [0] { // Traps
 529           } // end Traps
 530           [1] { // Attributes
 531             Attr(#15, 14) { // LineNumberTable at 0x014B
 532               [3] { // LineNumberTable
 533                 0  4; //  at 0x0157
 534                 4  5; //  at 0x015B
 535                 9  6; //  at 0x015F
 536               }
 537             } // end LineNumberTable
 538           } // Attributes
 539         } // end Code
 540       } // Attributes
 541     } // Member
 542     ;
 543     { // Member at 0x015F
 544       0x0008; // access
 545       #16; // name_cpx
 546       #17; // sig_cpx
 547       [1] { // Attributes
 548         Attr(#14, 44) { // Code at 0x0167
 549           2; // max_stack
 550           2; // max_locals
 551           Bytes[12]{
 552             0xCB00034C2B1ACC00;
 553             0x024C2BB0;
 554           };
 555           [0] { // Traps
 556           } // end Traps
 557           [1] { // Attributes
 558             Attr(#15, 14) { // LineNumberTable at 0x0185
 559               [3] { // LineNumberTable
 560                 0  8; //  at 0x0191
 561                 4  9; //  at 0x0195
 562                 10  10; //  at 0x0199

























 563               }
 564             } // end LineNumberTable
 565           } // Attributes
 566         } // end Code
 567       } // Attributes
 568     } // Member
 569   } // methods
 570 
 571   [1] { // Attributes
 572     Attr(#19, 2) { // SourceFile at 0x01CA
 573       #20;
 574     } // end SourceFile




 575   } // Attributes
 576 } // end class ValueInitMethod
 577 
 578 //////////////////////////////////////////////////////////////////////
 579 
 580 // Test that class modifiers cannot have both ACC_VALUE and ACC_INTERFACE set.
 581 //
 582 class ValueInterface {
 583   0xCAFEBABE;
 584   0; // minor version
 585   55; // version
 586   [27] { // Constant Pool
 587     ; // first element is empty
 588     Method #7 #21; // #1     at 0x0A
 589     Field #3 #22; // #2     at 0x0F
 590     class #23; // #3     at 0x14
 591     int 0x01234567; // #4     at 0x17
 592     Method #3 #24; // #5     at 0x1C
 593     Field #3 #25; // #6     at 0x21
 594     class #26; // #7     at 0x26


 665         } // end Code
 666       } // Attributes
 667     } // Member
 668   } // methods
 669 
 670   [1] { // Attributes
 671     Attr(#19, 2) { // SourceFile at 0x01AC
 672       #20;
 673     } // end SourceFile
 674   } // Attributes
 675 } // end class ValueInterface
 676 
 677 //////////////////////////////////////////////////////////////////////
 678 
 679 // Test that value type instance methods cannot be synchronized.
 680 //
 681 class ValueMethodSynch {
 682   0xCAFEBABE;
 683   0; // minor version
 684   55; // version
 685   [28] { // Constant Pool
 686     ; // first element is empty
 687     Method #7 #22; // #1     at 0x0A
 688     Field #3 #23; // #2     at 0x0F
 689     class #24; // #3     at 0x14
 690     int 0x01234567; // #4     at 0x17
 691     Method #3 #25; // #5     at 0x1C
 692     Field #3 #26; // #6     at 0x21
 693     class #27; // #7     at 0x26
 694     Utf8 "VT"; // #8     at 0x29
 695     Utf8 "LValueMethodSynch;"; // #9     at 0x2E
 696     Utf8 "int_v"; // #10     at 0x43
 697     Utf8 "I"; // #11     at 0x4B
 698     Utf8 "<init>"; // #12     at 0x4F
 699     Utf8 "()V"; // #13     at 0x58
 700     Utf8 "Code"; // #14     at 0x5E
 701     Utf8 "LineNumberTable"; // #15     at 0x65
 702     Utf8 "makeValueMethodSynch"; // #16     at 0x77
 703     Utf8 "(I)LValueMethodSynch;"; // #17     at 0x8E
 704     Utf8 "instanceMethod"; // #18     at 0xA6
 705     Utf8 "<clinit>"; // #19     at 0xB7
 706     Utf8 "SourceFile"; // #20     at 0xC2
 707     Utf8 "ValueMethodSynch.java"; // #21     at 0xCF
 708     NameAndType #12 #13; // #22     at 0xE7
 709     NameAndType #10 #11; // #23     at 0xEC
 710     Utf8 "ValueMethodSynch"; // #24     at 0xF1
 711     NameAndType #16 #17; // #25     at 0x0104
 712     NameAndType #8 #9; // #26     at 0x0109
 713     Utf8 "java/lang/Object"; // #27     at 0x010E

 714   } // Constant Pool
 715 
 716   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 717   #3;// this_cpx
 718   #7;// super_cpx
 719 
 720   [0] { // Interfaces
 721   } // Interfaces
 722 
 723   [2] { // fields
 724     { // Member at 0x012B
 725       0x0018; // access
 726       #8; // name_cpx
 727       #9; // sig_cpx
 728       [0] { // Attributes
 729       } // Attributes
 730     } // Member
 731     ;
 732     { // Member at 0x0133
 733       0x0010; // access
 734       #10; // name_cpx
 735       #11; // sig_cpx
 736       [0] { // Attributes
 737       } // Attributes
 738     } // Member
 739   } // fields
 740 
 741   [2] { // methods
 742     { // Member at 0x0175
 743       0x0008; // access
 744       #16; // name_cpx
 745       #17; // sig_cpx
 746       [1] { // Attributes
 747         Attr(#14, 44) { // Code at 0x017D
 748           2; // max_stack
 749           2; // max_locals
 750           Bytes[12]{
 751             0xCB00034C2B1ACC00;
 752             0x024C2BB0;
 753           };
 754           [0] { // Traps
 755           } // end Traps
 756           [1] { // Attributes
 757             Attr(#15, 14) { // LineNumberTable at 0x019B
 758               [3] { // LineNumberTable
 759                 0  8; //  at 0x01A7
 760                 4  9; //  at 0x01AB
 761                 10  10; //  at 0x01AF
 762               }
 763             } // end LineNumberTable
 764           } // Attributes
 765         } // end Code
 766       } // Attributes
 767     } // Member
 768     ;
 769     { // Member at 0x01AF
 770       0x0020; // access [ ACC_SYNCHRONIZED(bad) ]
 771       #18; // name_cpx
 772       #13; // sig_cpx
 773       [1] { // Attributes
 774         Attr(#14, 25) { // Code at 0x01B7
 775           0; // max_stack
 776           1; // max_locals
 777           Bytes[1]{
 778             0xB1;
 779           };
 780           [0] { // Traps
 781           } // end Traps
 782           [1] { // Attributes
 783             Attr(#15, 6) { // LineNumberTable at 0x01CA
 784               [1] { // LineNumberTable
 785                 0  12; //  at 0x01D6




















































 786               }
 787             } // end LineNumberTable
 788           } // Attributes
 789         } // end Code
 790       } // Attributes
 791     } // Member
 792   } // methods
 793 
 794   [1] { // Attributes
 795     Attr(#20, 2) { // SourceFile at 0x0207
 796       #21;
 797     } // end SourceFile




 798   } // Attributes
 799 } // end class ValueMethodSynch
 800 
 801 //////////////////////////////////////////////////////////////////////
 802 
 803 // Test that a value type's super class must be java.lang.Object.
 804 //
 805 class ValueSuperClass {
 806   0xCAFEBABE;
 807   0; // minor version
 808   55; // version
 809   [26] { // Constant Pool
 810     ; // first element is empty
 811     int 0x01234567; // #1     at 0x0A
 812     Field #7 #10; // #2     at 0x0F
 813     Field #7 #17; // #3     at 0x14
 814     Method #7 #16; // #4     at 0x19
 815     Method #11 #14; // #5     at 0x1E
 816     Utf8 "makeValueSuperClass"; // #6     at 0x23
 817     class #9; // #7     at 0x39
 818     Utf8 "int_v"; // #8     at 0x3C
 819     Utf8 "ValueSuperClass"; // #9     at 0x44
 820     NameAndType #21 #23; // #10     at 0x56
 821     class #12; // #11     at 0x5B
 822     Utf8 "java/lang/Throwable"; // #12     at 0x5E
 823     Utf8 "(I)LValueSuperClass;"; // #13     at 0x74
 824     NameAndType #24 #18; // #14     at 0x8B
 825     Utf8 "SourceFile"; // #15     at 0x90
 826     NameAndType #6 #13; // #16     at 0x9D
 827     NameAndType #8 #20; // #17     at 0xA2
 828     Utf8 "()V"; // #18     at 0xA7
 829     Utf8 "ValueSuperClass.jasm"; // #19     at 0xAD
 830     Utf8 "I"; // #20     at 0xC4
 831     Utf8 "VT"; // #21     at 0xC8
 832     Utf8 "Code"; // #22     at 0xCD
 833     Utf8 "LValueSuperClass;"; // #23     at 0xD4
 834     Utf8 "<init>"; // #24     at 0xE8
 835     Utf8 "<clinit>"; // #25     at 0xF1




 836   } // Constant Pool
 837 
 838   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 839   #7;// this_cpx
 840   #11;// super_cpx  (bad) points to java/lang/Throwable
 841 
 842   [0] { // Interfaces
 843   } // Interfaces
 844 
 845   [2] { // fields
 846     { // Member at 0x0106
 847       0x0018; // access
 848       #21; // name_cpx
 849       #23; // sig_cpx








 850       [0] { // Attributes
 851       } // Attributes
 852     } // Member
 853     ;
 854     { // Member at 0x010E
 855       0x0010; // access
 856       #8; // name_cpx
 857       #20; // sig_cpx
 858       [0] { // Attributes
















































 859       } // Attributes
 860     } // Member
 861   } // fields
 862 
 863   [1] { // methods
 864     { // Member at 0x013C
 865       0x0008; // access
 866       #6; // name_cpx
 867       #13; // sig_cpx
 868       [1] { // Attributes
 869         Attr(#22, 20) { // Code at 0x0144
 870           3; // max_stack
 871           3; // max_locals
 872           Bytes[8]{
 873             0x014C2B1A014C2BB0;

 874           };
 875           [0] { // Traps
 876           } // end Traps
 877           [0] { // Attributes





 878           } // Attributes
 879         } // end Code
 880       } // Attributes
 881     } // Member
 882   } // methods
 883 
 884   [1] { // Attributes
 885     Attr(#15, 2) { // SourceFile at 0x0183
 886       #19;
 887     } // end SourceFile




 888   } // Attributes
 889 } // end class ValueSuperClass
 890 
 891 //////////////////////////////////////////////////////////////////////
 892 
 893 // Value types Circ and Circ2 have fields of each other's type.  This should
 894 // cause a ClassCircularityError exception when one of them is being loaded.
 895 //
 896 // The value types are based on these two Java classes:
 897 //
 898 // final __ByValue class Circ {
 899 //     static final Circ VT = makeCirc(0x01234567);
 900 //     final int int_v;
 901 //     __Flattenable final Circ2 v2;
 902 //     Circ() {
 903 //         int_v = 1;
 904 //         v2 = __MakeDefault Circ2();
 905 //     }
 906 //     static Circ makeCirc(int x) {
 907 //         Circ v = __MakeDefault Circ();
 908 //         v = __WithField(v.int_v, x);
 909 //         return v;
 910 //     }

 911 //----------------------------------------------------------------
 912 // final __ByValue class Circ2 {
 913 //     static final Circ2 VT = makeCirc2('\u0123');
 914 //     final char char_v;
 915 //     __Flattenable final Circ vv;
 916 //     Circ2() {
 917 //         char_v = 'z';
 918 //         vv = __MakeDefault Circ();
 919 //     }
 920 //     static Circ2 makeCirc2(char c) {
 921 //         Circ2 v = __MakeDefault Circ2();
 922 //         v = __WithField(v.char_v, c);
 923 //         return v;
 924 //     }
 925 // }
 926 
 927 class Circ {
 928   0xCAFEBABE;
 929   0; // minor version
 930   55; // version
 931   [33] { // Constant Pool
 932     ; // first element is empty
 933     Method #9 #25; // #1     at 0x0A
 934     Field #5 #26; // #2     at 0x0F
 935     class #27; // #3     at 0x14
 936     Field #5 #28; // #4     at 0x17
 937     class #29; // #5     at 0x1C
 938     int 0x01234567; // #6     at 0x1F
 939     Method #5 #30; // #7     at 0x24
 940     Field #5 #31; // #8     at 0x29
 941     class #32; // #9     at 0x2E
 942     Utf8 "VT"; // #10     at 0x31
 943     Utf8 "LCirc;"; // #11     at 0x36
 944     Utf8 "int_v"; // #12     at 0x40
 945     Utf8 "I"; // #13     at 0x48
 946     Utf8 "v2"; // #14     at 0x4C
 947     Utf8 "LCirc2;"; // #15     at 0x51
 948     Utf8 "<init>"; // #16     at 0x5C
 949     Utf8 "()V"; // #17     at 0x65
 950     Utf8 "Code"; // #18     at 0x6B
 951     Utf8 "LineNumberTable"; // #19     at 0x72
 952     Utf8 "makeCirc"; // #20     at 0x84
 953     Utf8 "(I)LCirc;"; // #21     at 0x90
 954     Utf8 "<clinit>"; // #22     at 0x9D
 955     Utf8 "SourceFile"; // #23     at 0xA8
 956     Utf8 "Circ.java"; // #24     at 0xB5
 957     NameAndType #16 #17; // #25     at 0xC2
 958     NameAndType #12 #13; // #26     at 0xC7
 959     Utf8 "Circ2"; // #27     at 0xCC
 960     NameAndType #14 #15; // #28     at 0xD5
 961     Utf8 "Circ"; // #29     at 0xDA
 962     NameAndType #20 #21; // #30     at 0xE2
 963     NameAndType #10 #11; // #31     at 0xE7
 964     Utf8 "java/lang/Object"; // #32     at 0xEC

 965   } // Constant Pool
 966 
 967   0x0130; // access [ ACC_SUPER ACC_FINAL ]
 968   #5;// this_cpx
 969   #9;// super_cpx
 970 
 971   [0] { // Interfaces
 972   } // Interfaces
 973 
 974   [3] { // fields
 975     { // Member at 0x0109
 976       0x0018; // access
 977       #10; // name_cpx
 978       #11; // sig_cpx
 979       [0] { // Attributes
 980       } // Attributes
 981     } // Member
 982     ;
 983     { // Member at 0x0111
 984       0x0010; // access
 985       #12; // name_cpx
 986       #13; // sig_cpx
 987       [0] { // Attributes
 988       } // Attributes
 989     } // Member
 990     ;
 991     { // Member at 0x0119
 992       0x0110; // access
 993       #14; // name_cpx
 994       #15; // sig_cpx
 995       [0] { // Attributes
 996       } // Attributes
 997     } // Member
 998   } // fields
 999 
1000   [1] { // methods
1001     { // Member at 0x0166





























1002       0x0008; // access
1003       #20; // name_cpx
1004       #21; // sig_cpx
1005       [1] { // Attributes
1006         Attr(#18, 44) { // Code at 0x016E
1007           2; // max_stack
1008           2; // max_locals
1009           Bytes[12]{
1010             0xCB00054C2B1ACC00;
1011             0x024C2BB0;
1012           };
1013           [0] { // Traps
1014           } // end Traps
1015           [1] { // Attributes
1016             Attr(#19, 14) { // LineNumberTable at 0x018C
1017               [3] { // LineNumberTable
1018                 0  10; //  at 0x0198
1019                 4  11; //  at 0x019C
1020                 10  12; //  at 0x01A0

























1021               }
1022             } // end LineNumberTable
1023           } // Attributes
1024         } // end Code
1025       } // Attributes
1026     } // Member
1027   } // methods
1028 
1029   [1] { // Attributes
1030     Attr(#23, 2) { // SourceFile at 0x01D1
1031       #24;
1032     } // end SourceFile




1033   } // Attributes
1034 } // end class Circ
1035 
1036 
1037 class Circ2 {
1038   0xCAFEBABE;
1039   0; // minor version
1040   55; // version
1041   [32] { // Constant Pool
1042     ; // first element is empty
1043     Method #8 #24; // #1     at 0x0A
1044     Field #5 #25; // #2     at 0x0F
1045     class #26; // #3     at 0x14
1046     Field #5 #27; // #4     at 0x17
1047     class #28; // #5     at 0x1C
1048     Method #5 #29; // #6     at 0x1F
1049     Field #5 #30; // #7     at 0x24
1050     class #31; // #8     at 0x29
1051     Utf8 "VT"; // #9     at 0x2C
1052     Utf8 "LCirc2;"; // #10     at 0x31
1053     Utf8 "char_v"; // #11     at 0x3C
1054     Utf8 "C"; // #12     at 0x45
1055     Utf8 "vv"; // #13     at 0x49
1056     Utf8 "LCirc;"; // #14     at 0x4E
1057     Utf8 "<init>"; // #15     at 0x58
1058     Utf8 "()V"; // #16     at 0x61
1059     Utf8 "Code"; // #17     at 0x67
1060     Utf8 "LineNumberTable"; // #18     at 0x6E
1061     Utf8 "makeCirc2"; // #19     at 0x80
1062     Utf8 "(C)LCirc2;"; // #20     at 0x8D
1063     Utf8 "<clinit>"; // #21     at 0x9B
1064     Utf8 "SourceFile"; // #22     at 0xA6
1065     Utf8 "Circ2.java"; // #23     at 0xB3
1066     NameAndType #15 #16; // #24     at 0xC1
1067     NameAndType #11 #12; // #25     at 0xC6
1068     Utf8 "Circ"; // #26     at 0xCB
1069     NameAndType #13 #14; // #27     at 0xD3
1070     Utf8 "Circ2"; // #28     at 0xD8
1071     NameAndType #19 #20; // #29     at 0xE1
1072     NameAndType #9 #10; // #30     at 0xE6
1073     Utf8 "java/lang/Object"; // #31     at 0xEB

1074   } // Constant Pool
1075 
1076   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1077   #5;// this_cpx
1078   #8;// super_cpx
1079 
1080   [0] { // Interfaces
1081   } // Interfaces
1082 
1083   [3] { // fields
1084     { // Member at 0x0108
1085       0x0018; // access
1086       #9; // name_cpx
1087       #10; // sig_cpx
1088       [0] { // Attributes
1089       } // Attributes
1090     } // Member
1091     ;
1092     { // Member at 0x0110
1093       0x0010; // access
1094       #11; // name_cpx
1095       #12; // sig_cpx
1096       [0] { // Attributes
1097       } // Attributes
1098     } // Member
1099     ;
1100     { // Member at 0x0118
1101       0x0110; // access
1102       #13; // name_cpx
1103       #14; // sig_cpx
1104       [0] { // Attributes
1105       } // Attributes
1106     } // Member
1107   } // fields
1108 
1109   [1] { // methods
1110     { // Member at 0x0166





























1111       0x0008; // access
1112       #19; // name_cpx
1113       #20; // sig_cpx
1114       [1] { // Attributes
1115         Attr(#17, 44) { // Code at 0x016E
1116           2; // max_stack
1117           2; // max_locals
1118           Bytes[12]{
1119             0xCB00054C2B1ACC00;
1120             0x024C2BB0;
1121           };
1122           [0] { // Traps
1123           } // end Traps
1124           [1] { // Attributes
1125             Attr(#18, 14) { // LineNumberTable at 0x018C
1126               [3] { // LineNumberTable
1127                 0  10; //  at 0x0198
1128                 4  11; //  at 0x019C
1129                 10  12; //  at 0x01A0

























1130               }
1131             } // end LineNumberTable
1132           } // Attributes
1133         } // end Code
1134       } // Attributes
1135     } // Member
1136   } // methods
1137 
1138   [1] { // Attributes
1139     Attr(#22, 2) { // SourceFile at 0x01D2
1140       #23;
1141     } // end SourceFile




1142   } // Attributes
1143 } // end class Circ2
1144 
1145 //////////////////////////////////////////////////////////////////////
1146 
1147 // Value types CircStaticA and CircStaticB have static fields of each other's
1148 // type.  This should cause a ClassCircularityError exception when one of them
1149 // is being loaded.
1150 //
1151 // The value types are based on these two Java classes:
1152 //
1153 // final __ByValue class CircStaticA {
1154 //     static final CircStaticA VT = makeCircStaticA(0x01234567);
1155 //     final int int_v;
1156 //     __Flattenable static final CircStaticB v2 = __MakeDefault CircStaticB();
1157 //     CircStaticA() {
1158 //         int_v = 1;
1159 //     }
1160 //     static CircStaticA makeCircStaticA(int x) {
1161 //         CircStaticA v = __MakeDefault CircStaticA();


1165 // }
1166 //----------------------------------------------------------------
1167 // final __ByValue class CircStaticB {
1168 //     static final CircStaticB VT = makeCircStaticB(0x01234567);
1169 //     final int int_v;
1170 //     __Flattenable static final CircStaticA v2 = __MakeDefault CircStaticA();
1171 //     CircStaticB() {
1172 //         int_v = 1;
1173 //     }
1174 //     static CircStaticB makeCircStaticB(int x) {
1175 //         CircStaticB v = __MakeDefault CircStaticB();
1176 //         v = __WithField(v.int_v, x);
1177 //         return v;
1178 //     }
1179 // }
1180 
1181 class CircStaticA {
1182   0xCAFEBABE;
1183   0; // minor version
1184   55; // version
1185   [33] { // Constant Pool
1186     ; // first element is empty
1187     Method #9 #25; // #1     at 0x0A
1188     Field #3 #26; // #2     at 0x0F
1189     class #27; // #3     at 0x14
1190     int 0x01234567; // #4     at 0x17
1191     Method #3 #28; // #5     at 0x1C
1192     Field #3 #29; // #6     at 0x21
1193     class #30; // #7     at 0x26
1194     Field #3 #31; // #8     at 0x29
1195     class #32; // #9     at 0x2E
1196     Utf8 "VT"; // #10     at 0x31
1197     Utf8 "LCircStaticA;"; // #11     at 0x36
1198     Utf8 "int_v"; // #12     at 0x46
1199     Utf8 "I"; // #13     at 0x4E
1200     Utf8 "v2"; // #14     at 0x52
1201     Utf8 "LCircStaticB;"; // #15     at 0x57
1202     Utf8 "<init>"; // #16     at 0x67
1203     Utf8 "()V"; // #17     at 0x70
1204     Utf8 "Code"; // #18     at 0x76
1205     Utf8 "LineNumberTable"; // #19     at 0x7D
1206     Utf8 "makeCircStaticA"; // #20     at 0x8F
1207     Utf8 "(I)LCircStaticA;"; // #21     at 0xA1
1208     Utf8 "<clinit>"; // #22     at 0xB4
1209     Utf8 "SourceFile"; // #23     at 0xBF
1210     Utf8 "CircStaticA.java"; // #24     at 0xCC
1211     NameAndType #16 #17; // #25     at 0xDF
1212     NameAndType #12 #13; // #26     at 0xE4
1213     Utf8 "CircStaticA"; // #27     at 0xE9
1214     NameAndType #20 #21; // #28     at 0xF7
1215     NameAndType #10 #11; // #29     at 0xFC
1216     Utf8 "CircStaticB"; // #30     at 0x0101
1217     NameAndType #14 #15; // #31     at 0x010F
1218     Utf8 "java/lang/Object"; // #32     at 0x0114

1219   } // Constant Pool
1220 
1221   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1222   #3;// this_cpx
1223   #9;// super_cpx
1224 
1225   [0] { // Interfaces
1226   } // Interfaces
1227 
1228   [3] { // fields
1229     { // Member at 0x0131
1230       0x0018; // access
1231       #10; // name_cpx
1232       #11; // sig_cpx
1233       [0] { // Attributes
1234       } // Attributes
1235     } // Member
1236     ;
1237     { // Member at 0x0139
1238       0x0010; // access
1239       #12; // name_cpx
1240       #13; // sig_cpx
1241       [0] { // Attributes
1242       } // Attributes
1243     } // Member
1244     ;
1245     { // Member at 0x0141
1246       0x0118; // access
1247       #14; // name_cpx
1248       #15; // sig_cpx
1249       [0] { // Attributes
1250       } // Attributes
1251     } // Member
1252   } // fields
1253 
1254   [1] { // methods
1255     { // Member at 0x0183



























1256       0x0008; // access
1257       #20; // name_cpx
1258       #21; // sig_cpx
1259       [1] { // Attributes
1260         Attr(#18, 44) { // Code at 0x018B
1261           2; // max_stack
1262           2; // max_locals
1263           Bytes[12]{
1264             0xCB00034C2B1ACC00;
1265             0x024C2BB0;
1266           };
1267           [0] { // Traps
1268           } // end Traps
1269           [1] { // Attributes
1270             Attr(#19, 14) { // LineNumberTable at 0x01A9
1271               [3] { // LineNumberTable
1272                 0  10; //  at 0x01B5
1273                 4  11; //  at 0x01B9
1274                 10  12; //  at 0x01BD


























1275               }
1276             } // end LineNumberTable
1277           } // Attributes
1278         } // end Code
1279       } // Attributes
1280     } // Member
1281   } // methods
1282 
1283   [1] { // Attributes
1284     Attr(#23, 2) { // SourceFile at 0x01F8
1285       #24;
1286     } // end SourceFile




1287   } // Attributes
1288 } // end class CircStaticA
1289 
1290 class CircStaticB {
1291   0xCAFEBABE;
1292   0; // minor version
1293   55; // version
1294   [33] { // Constant Pool
1295     ; // first element is empty
1296     Method #9 #25; // #1     at 0x0A
1297     Field #3 #26; // #2     at 0x0F
1298     class #27; // #3     at 0x14
1299     int 0x01234567; // #4     at 0x17
1300     Method #3 #28; // #5     at 0x1C
1301     Field #3 #29; // #6     at 0x21
1302     class #30; // #7     at 0x26
1303     Field #3 #31; // #8     at 0x29
1304     class #32; // #9     at 0x2E
1305     Utf8 "VT"; // #10     at 0x31
1306     Utf8 "LCircStaticB;"; // #11     at 0x36
1307     Utf8 "int_v"; // #12     at 0x46
1308     Utf8 "I"; // #13     at 0x4E
1309     Utf8 "v2"; // #14     at 0x52
1310     Utf8 "LCircStaticA;"; // #15     at 0x57
1311     Utf8 "<init>"; // #16     at 0x67
1312     Utf8 "()V"; // #17     at 0x70
1313     Utf8 "Code"; // #18     at 0x76
1314     Utf8 "LineNumberTable"; // #19     at 0x7D
1315     Utf8 "makeCircStaticB"; // #20     at 0x8F
1316     Utf8 "(I)LCircStaticB;"; // #21     at 0xA1
1317     Utf8 "<clinit>"; // #22     at 0xB4
1318     Utf8 "SourceFile"; // #23     at 0xBF
1319     Utf8 "CircStaticB.java"; // #24     at 0xCC
1320     NameAndType #16 #17; // #25     at 0xDF
1321     NameAndType #12 #13; // #26     at 0xE4
1322     Utf8 "CircStaticB"; // #27     at 0xE9
1323     NameAndType #20 #21; // #28     at 0xF7
1324     NameAndType #10 #11; // #29     at 0xFC
1325     Utf8 "CircStaticA"; // #30     at 0x0101
1326     NameAndType #14 #15; // #31     at 0x010F
1327     Utf8 "java/lang/Object"; // #32     at 0x0114

1328   } // Constant Pool
1329 
1330   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1331   #3;// this_cpx
1332   #9;// super_cpx
1333 
1334   [0] { // Interfaces
1335   } // Interfaces
1336 
1337   [3] { // fields
1338     { // Member at 0x0131
1339       0x0018; // access
1340       #10; // name_cpx
1341       #11; // sig_cpx
1342       [0] { // Attributes
1343       } // Attributes
1344     } // Member
1345     ;
1346     { // Member at 0x0139
1347       0x0010; // access
1348       #12; // name_cpx
1349       #13; // sig_cpx
1350       [0] { // Attributes
1351       } // Attributes
1352     } // Member
1353     ;
1354     { // Member at 0x0141
1355       0x0118; // access
1356       #14; // name_cpx
1357       #15; // sig_cpx
1358       [0] { // Attributes
1359       } // Attributes
1360     } // Member
1361   } // fields
1362 
1363   [1] { // methods
1364     { // Member at 0x0183



























1365       0x0008; // access
1366       #20; // name_cpx
1367       #21; // sig_cpx
1368       [1] { // Attributes
1369         Attr(#18, 44) { // Code at 0x018B
1370           2; // max_stack
1371           2; // max_locals
1372           Bytes[12]{
1373             0xCB00034C2B1ACC00;
1374             0x024C2BB0;
1375           };
1376           [0] { // Traps
1377           } // end Traps
1378           [1] { // Attributes
1379             Attr(#19, 14) { // LineNumberTable at 0x01A9
1380               [3] { // LineNumberTable
1381                 0  9; //  at 0x01B5
1382                 4  10; //  at 0x01B9
1383                 10  11; //  at 0x01BD


























1384               }
1385             } // end LineNumberTable
1386           } // Attributes
1387         } // end Code
1388       } // Attributes
1389     } // Member
1390   } // methods
1391 
1392   [1] { // Attributes
1393     Attr(#23, 2) { // SourceFile at 0x01F8
1394       #24;
1395     } // end SourceFile




1396   } // Attributes
1397 } // end class CircStaticB
1398 

1399 
1400 // Test that a value type cannot be Cloneable.
1401 //
1402 // final __ByValue class ValueCloneable implements Cloneable {
1403 //    final int field;
1404 //    private ValueCloneable() { field = 0; }
1405 //}
1406 
1407 class ValueCloneable {
1408   0xCAFEBABE;
1409   0; // minor version
1410   55; // version
1411   [] { // Constant Pool
1412     ; // first element is empty
1413     Method #4 #14; // #1
1414     Field #3 #15; // #2
1415     class #16; // #3
1416     class #17; // #4
1417     class #18; // #5
1418     Utf8 "field"; // #6
1419     Utf8 "I"; // #7
1420     Utf8 "<init>"; // #8
1421     Utf8 "()V"; // #9
1422     Utf8 "Code"; // #10
1423     Utf8 "LineNumberTable"; // #11
1424     Utf8 "SourceFile"; // #12
1425     Utf8 "ValueCloneable.java"; // #13
1426     NameAndType #8 #9; // #14
1427     NameAndType #6 #7; // #15
1428     Utf8 "ValueCloneable"; // #16
1429     Utf8 "java/lang/Object"; // #17
1430     Utf8 "java/lang/Cloneable"; // #18

1431   } // Constant Pool
1432 
1433   0x0130; // access
1434   #3;// this_cpx
1435   #4;// super_cpx
1436 
1437   [] { // Interfaces
1438     #5;
1439   } // Interfaces
1440 
1441   [] { // fields
1442     { // Member
1443       0x0010; // access
1444       #6; // name_cpx
1445       #7; // sig_cpx
1446       [] { // Attributes
1447       } // Attributes
1448     } // Member
1449   } // fields
1450 
1451   [] { // methods
1452     { // Member
1453       0x0002; // access
1454       #8; // name_cpx
1455       #9; // sig_cpx
1456       [] { // Attributes
1457         Attr(#10) { // Code
1458           2; // max_stack
1459           1; // max_locals
1460           Bytes[]{
1461             0x2AB700012A03B500;
1462             0x02B1;
1463           }
1464           [] { // Traps
1465           } // end Traps
1466           [] { // Attributes
1467             Attr(#11) { // LineNumberTable
1468               [] { // LineNumberTable
1469                 0  4;
1470               }
1471             } // end LineNumberTable
1472           } // Attributes
1473         } // end Code
1474       } // Attributes
1475     } // Member
1476   } // methods
1477 
1478   [] { // Attributes
1479     Attr(#12) { // SourceFile
1480       #13;
1481     } // end SourceFile




1482   } // Attributes
1483 } // end class ValueCloneable


  32 // final __ByValue class Value {
  33 //     static final Value VT = makeValue(0x01234567);
  34 //     final int int_v;
  35 //     Value() {
  36 //         int_v = 1;
  37 //     }
  38 //     static Value makeValue(int x) {
  39 //         Value v = __MakeDefault Value();
  40 //         v = __WithField(v.int_v, x);
  41 //         return v;
  42 //     }
  43 // }
  44 
  45 
  46 // Test that class modifiers cannot have both ACC_VALUE and ACC_ABSTRATCT set.
  47 //
  48 class ValueAbstract {
  49   0xCAFEBABE;
  50   0; // minor version
  51   55; // version
  52   [28] { // Constant Pool
  53     ; // first element is empty
  54     Method #7 #23; // #1     at 0x0A
  55     Field #3 #24; // #2     at 0x0F
  56     class #9; // #3     at 0x14
  57     int 0x01234567; // #4     at 0x17
  58     Method #3 #25; // #5     at 0x1C
  59     Field #3 #26; // #6     at 0x21
  60     class #27; // #7     at 0x26
  61     Utf8 "VT"; // #8     at 0x29
  62     Utf8 "ValueAbstract"; // #9     at 0x2E
  63     Utf8 "ValueTypes"; // #10     at 0x36
  64     Utf8 "LValueAbstract;"; // #11     at 0x43
  65     Utf8 "int_v"; // #12     at 0x4D
  66     Utf8 "I"; // #13     at 0x55
  67     Utf8 "<init>"; // #14     at 0x59
  68     Utf8 "()V"; // #15     at 0x62
  69     Utf8 "Code"; // #16     at 0x68
  70     Utf8 "LineNumberTable"; // #17     at 0x6F
  71     Utf8 "makeValueAbstract"; // #18     at 0x81
  72     Utf8 "(I)LValueAbstract;"; // #19     at 0x8D
  73     Utf8 "<clinit>"; // #20     at 0x9A
  74     Utf8 "SourceFile"; // #21     at 0xA5
  75     Utf8 "ValueAbstract.java"; // #22     at 0xB2
  76     NameAndType #14 #15; // #23     at 0xBF
  77     NameAndType #12 #13; // #24     at 0xC4
  78     NameAndType #18 #19; // #25     at 0xC9
  79     NameAndType #8 #11; // #26     at 0xCE
  80     Utf8 "java/lang/Object"; // #27     at 0xD3
  81   } // Constant Pool
  82 
  83   0x0530; // access [  ACC_VALUE ACC_ABSTRACT(bad) ACC_SUPER ACC_FINAL ]
  84   #3;// this_cpx
  85   #7;// super_cpx
  86 
  87   [0] { // Interfaces
  88   } // Interfaces
  89 
  90   [2] { // fields
  91     { // Member at 0xF0
  92       0x0118; // access
  93       #8; // name_cpx
  94       #11; // sig_cpx
  95       [0] { // Attributes
  96       } // Attributes
  97     } // Member
  98     ;
  99     { // Member at 0xF8
 100       0x0010; // access
 101       #12; // name_cpx
 102       #13; // sig_cpx
 103       [0] { // Attributes
 104       } // Attributes
 105     } // Member
 106   } // fields
 107 
 108   [3] { // methods
 109     { // Member at 0x0102
 110       0x0000; // access
 111       #14; // name_cpx
 112       #15; // sig_cpx
 113       [1] { // Attributes
 114         Attr(#16, 42) { // Code at 0x010A
 115           2; // max_stack
 116           1; // max_locals
 117           Bytes[10]{
 118             0x2AB700012A04B500;
 119             0x02B1;
 120           };
 121           [0] { // Traps
 122           } // end Traps
 123           [1] { // Attributes
 124             Attr(#17, 14) { // LineNumberTable at 0x0126
 125               [3] { // LineNumberTable
 126                 0  4; //  at 0x0132
 127                 4  5; //  at 0x0136
 128                 9  6; //  at 0x013A
 129               }
 130             } // end LineNumberTable
 131           } // Attributes
 132         } // end Code
 133       } // Attributes
 134     } // Member
 135     ;
 136     { // Member at 0x013A
 137       0x0008; // access
 138       #18; // name_cpx
 139       #19; // sig_cpx
 140       [1] { // Attributes
 141         Attr(#16, 44) { // Code at 0x0142
 142           2; // max_stack
 143           2; // max_locals
 144           Bytes[12]{
 145             0xCB00034C2B1ACC00;
 146             0x024C2BB0;
 147           };
 148           [0] { // Traps
 149           } // end Traps
 150           [1] { // Attributes
 151             Attr(#17, 14) { // LineNumberTable at 0x0160
 152               [3] { // LineNumberTable
 153                 0  8; //  at 0x016C
 154                 4  9; //  at 0x0170
 155                 10  10; //  at 0x0174
 156               }
 157             } // end LineNumberTable
 158           } // Attributes
 159         } // end Code
 160       } // Attributes
 161     } // Member
 162     ;
 163     { // Member at 0x0174
 164       0x0008; // access
 165       #20; // name_cpx
 166       #15; // sig_cpx
 167       [1] { // Attributes
 168         Attr(#16, 33) { // Code at 0x017C
 169           1; // max_stack
 170           0; // max_locals
 171           Bytes[9]{
 172             0x1204B80005B30006;
 173             0xB1;
 174           };
 175           [0] { // Traps
 176           } // end Traps
 177           [1] { // Attributes
 178             Attr(#17, 6) { // LineNumberTable at 0x0197
 179               [1] { // LineNumberTable
 180                 0  2; //  at 0x01A3
 181               }
 182             } // end LineNumberTable
 183           } // Attributes
 184         } // end Code
 185       } // Attributes
 186     } // Member
 187   } // methods
 188 
 189   [2] { // Attributes
 190     Attr(#21, 2) { // SourceFile at 0x01A5
 191       #22;
 192     } // end SourceFile
 193     ;
 194     Attr(#10, 4) { // ValueTypes at 0x01AD
 195       0x00010003;
 196     } // end ValueTypes
 197   } // Attributes
 198 } // end class ValueAbstract
 199 
 200 //////////////////////////////////////////////////////////////////////
 201 
 202 // Test that class modifiers cannot have both ACC_VALUE and ACC_ENUM set.
 203 //
 204 class ValueEnum {
 205   0xCAFEBABE;
 206   0; // minor version
 207   55; // version
 208   [28] { // Constant Pool
 209     ; // first element is empty
 210     Method #7 #23; // #1     at 0x0A
 211     Field #3 #24; // #2     at 0x0F
 212     class #9; // #3     at 0x14
 213     int 0x01234567; // #4     at 0x17
 214     Method #3 #25; // #5     at 0x1C
 215     Field #3 #26; // #6     at 0x21
 216     class #27; // #7     at 0x26
 217     Utf8 "VT"; // #8     at 0x29
 218     Utf8 "ValueEnum"; // #9     at 0x2E
 219     Utf8 "ValueTypes"; // #10     at 0x36
 220     Utf8 "LValueEnum;"; // #11     at 0x43
 221     Utf8 "int_v"; // #12     at 0x4D
 222     Utf8 "I"; // #13     at 0x55
 223     Utf8 "<init>"; // #14     at 0x59
 224     Utf8 "()V"; // #15     at 0x62
 225     Utf8 "Code"; // #16     at 0x68
 226     Utf8 "LineNumberTable"; // #17     at 0x6F
 227     Utf8 "makeValueEnum"; // #18     at 0x81
 228     Utf8 "(I)LValueEnum;"; // #19     at 0x8D
 229     Utf8 "<clinit>"; // #20     at 0x9A
 230     Utf8 "SourceFile"; // #21     at 0xA5
 231     Utf8 "ValueEnum.java"; // #22     at 0xB2
 232     NameAndType #14 #15; // #23     at 0xBF
 233     NameAndType #12 #13; // #24     at 0xC4
 234     NameAndType #18 #19; // #25     at 0xC9
 235     NameAndType #8 #11; // #26     at 0xCE
 236     Utf8 "java/lang/Object"; // #27     at 0xD3
 237   } // Constant Pool
 238 
 239   0x04130; // access [  ACC_VALUE ACC_ENUM(bad) ACC_SUPER ACC_FINAL ]
 240   #3;// this_cpx
 241   #7;// super_cpx
 242 
 243   [0] { // Interfaces
 244   } // Interfaces
 245 
 246   [2] { // fields
 247     { // Member at 0xF0
 248       0x0118; // access
 249       #8; // name_cpx
 250       #11; // sig_cpx
 251       [0] { // Attributes
 252       } // Attributes
 253     } // Member
 254     ;
 255     { // Member at 0xF8
 256       0x0010; // access
 257       #12; // name_cpx
 258       #13; // sig_cpx
 259       [0] { // Attributes
 260       } // Attributes
 261     } // Member
 262   } // fields
 263 
 264   [3] { // methods
 265     { // Member at 0x0102
 266       0x0000; // access
 267       #14; // name_cpx
 268       #15; // sig_cpx
 269       [1] { // Attributes
 270         Attr(#16, 42) { // Code at 0x010A
 271           2; // max_stack
 272           1; // max_locals
 273           Bytes[10]{
 274             0x2AB700012A04B500;
 275             0x02B1;
 276           };
 277           [0] { // Traps
 278           } // end Traps
 279           [1] { // Attributes
 280             Attr(#17, 14) { // LineNumberTable at 0x0126
 281               [3] { // LineNumberTable
 282                 0  4; //  at 0x0132
 283                 4  5; //  at 0x0136
 284                 9  6; //  at 0x013A
 285               }
 286             } // end LineNumberTable
 287           } // Attributes
 288         } // end Code
 289       } // Attributes
 290     } // Member
 291     ;
 292     { // Member at 0x013A
 293       0x0008; // access
 294       #18; // name_cpx
 295       #19; // sig_cpx
 296       [1] { // Attributes
 297         Attr(#16, 44) { // Code at 0x0142
 298           2; // max_stack
 299           2; // max_locals
 300           Bytes[12]{
 301             0xCB00034C2B1ACC00;
 302             0x024C2BB0;
 303           };
 304           [0] { // Traps
 305           } // end Traps
 306           [1] { // Attributes
 307             Attr(#17, 14) { // LineNumberTable at 0x0160
 308               [3] { // LineNumberTable
 309                 0  8; //  at 0x016C
 310                 4  9; //  at 0x0170
 311                 10  10; //  at 0x0174
 312               }
 313             } // end LineNumberTable
 314           } // Attributes
 315         } // end Code
 316       } // Attributes
 317     } // Member
 318     ;
 319     { // Member at 0x0174
 320       0x0008; // access
 321       #20; // name_cpx
 322       #15; // sig_cpx
 323       [1] { // Attributes
 324         Attr(#16, 33) { // Code at 0x017C
 325           1; // max_stack
 326           0; // max_locals
 327           Bytes[9]{
 328             0x1204B80005B30006;
 329             0xB1;
 330           };
 331           [0] { // Traps
 332           } // end Traps
 333           [1] { // Attributes
 334             Attr(#17, 6) { // LineNumberTable at 0x0197
 335               [1] { // LineNumberTable
 336                 0  2; //  at 0x01A3
 337               }
 338             } // end LineNumberTable
 339           } // Attributes
 340         } // end Code
 341       } // Attributes
 342     } // Member
 343   } // methods
 344 
 345   [2] { // Attributes
 346     Attr(#21, 2) { // SourceFile at 0x01A5
 347       #22;
 348     } // end SourceFile
 349     ;
 350     Attr(#10, 4) { // ValueTypes at 0x01AD
 351       0x00010003;
 352     } // end ValueTypes
 353   } // Attributes
 354 } // end class ValueEnum
 355 
 356 //////////////////////////////////////////////////////////////////////
 357 
 358 // Test that value type fields must be final.
 359 //
 360 class ValueFieldNotFinal {
 361   0xCAFEBABE;
 362   0; // minor version
 363   55; // version
 364   [28] { // Constant Pool
 365     ; // first element is empty
 366     Method #7 #23; // #1     at 0x0A
 367     Field #3 #24; // #2     at 0x0F
 368     class #9; // #3     at 0x14
 369     int 0x01234567; // #4     at 0x17
 370     Method #3 #25; // #5     at 0x1C
 371     Field #3 #26; // #6     at 0x21
 372     class #27; // #7     at 0x26
 373     Utf8 "VT"; // #8     at 0x29
 374     Utf8 "ValueFieldNotFinal"; // #9     at 0x2E
 375     Utf8 "ValueTypes"; // #10     at 0x36
 376     Utf8 "LValueFieldNotFinal;"; // #11     at 0x43
 377     Utf8 "int_v"; // #12     at 0x4D
 378     Utf8 "I"; // #13     at 0x55
 379     Utf8 "<init>"; // #14     at 0x59
 380     Utf8 "()V"; // #15     at 0x62
 381     Utf8 "Code"; // #16     at 0x68
 382     Utf8 "LineNumberTable"; // #17     at 0x6F
 383     Utf8 "makeValueFieldNotFinal"; // #18     at 0x81
 384     Utf8 "(I)LValueFieldNotFinal;"; // #19     at 0x8D
 385     Utf8 "<clinit>"; // #20     at 0x9A
 386     Utf8 "SourceFile"; // #21     at 0xA5
 387     Utf8 "ValueFieldNotFinal.java"; // #22     at 0xB2
 388     NameAndType #14 #15; // #23     at 0xBF
 389     NameAndType #12 #13; // #24     at 0xC4
 390     NameAndType #18 #19; // #25     at 0xC9
 391     NameAndType #8 #11; // #26     at 0xCE
 392     Utf8 "java/lang/Object"; // #27     at 0xD3
 393   } // Constant Pool
 394 
 395   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 396   #3;// this_cpx
 397   #7;// super_cpx
 398 
 399   [0] { // Interfaces
 400   } // Interfaces
 401 
 402   [2] { // fields
 403     { // Member at 0xF0
 404       0x0118; // access
 405       #8; // name_cpx
 406       #11; // sig_cpx
 407       [0] { // Attributes
 408       } // Attributes
 409     } // Member
 410     ;
 411     { // Member at 0xF8
 412       0x0000; // access [ Field not ACC_FINAL(bad) ]
 413       #12; // name_cpx
 414       #13; // sig_cpx
 415       [0] { // Attributes
 416       } // Attributes
 417     } // Member
 418   } // fields
 419 
 420   [3] { // methods
 421     { // Member at 0x0102
 422       0x0000; // access
 423       #14; // name_cpx
 424       #15; // sig_cpx
 425       [1] { // Attributes
 426         Attr(#16, 42) { // Code at 0x010A
 427           2; // max_stack
 428           1; // max_locals
 429           Bytes[10]{
 430             0x2AB700012A04B500;
 431             0x02B1;
 432           };
 433           [0] { // Traps
 434           } // end Traps
 435           [1] { // Attributes
 436             Attr(#17, 14) { // LineNumberTable at 0x0126
 437               [3] { // LineNumberTable
 438                 0  4; //  at 0x0132
 439                 4  5; //  at 0x0136
 440                 9  6; //  at 0x013A
 441               }
 442             } // end LineNumberTable
 443           } // Attributes
 444         } // end Code
 445       } // Attributes
 446     } // Member
 447     ;
 448     { // Member at 0x013A
 449       0x0008; // access
 450       #18; // name_cpx
 451       #19; // sig_cpx
 452       [1] { // Attributes
 453         Attr(#16, 44) { // Code at 0x0142
 454           2; // max_stack
 455           2; // max_locals
 456           Bytes[12]{
 457             0xCB00034C2B1ACC00;
 458             0x024C2BB0;
 459           };
 460           [0] { // Traps
 461           } // end Traps
 462           [1] { // Attributes
 463             Attr(#17, 14) { // LineNumberTable at 0x0160
 464               [3] { // LineNumberTable
 465                 0  8; //  at 0x016C
 466                 4  9; //  at 0x0170
 467                 10  10; //  at 0x0174
 468               }
 469             } // end LineNumberTable
 470           } // Attributes
 471         } // end Code
 472       } // Attributes
 473     } // Member
 474     ;
 475     { // Member at 0x0174
 476       0x0008; // access
 477       #20; // name_cpx
 478       #15; // sig_cpx
 479       [1] { // Attributes
 480         Attr(#16, 33) { // Code at 0x017C
 481           1; // max_stack
 482           0; // max_locals
 483           Bytes[9]{
 484             0x1204B80005B30006;
 485             0xB1;
 486           };
 487           [0] { // Traps
 488           } // end Traps
 489           [1] { // Attributes
 490             Attr(#17, 6) { // LineNumberTable at 0x0197
 491               [1] { // LineNumberTable
 492                 0  2; //  at 0x01A3
 493               }
 494             } // end LineNumberTable
 495           } // Attributes
 496         } // end Code
 497       } // Attributes
 498     } // Member
 499   } // methods
 500 
 501   [2] { // Attributes
 502     Attr(#21, 2) { // SourceFile at 0x01A5
 503       #22;
 504     } // end SourceFile
 505     ;
 506     Attr(#10, 4) { // ValueTypes at 0x01AD
 507       0x00010003;
 508     } // end ValueTypes
 509   } // Attributes
 510 } // end class ValueFieldNotFinal
 511 
 512 //////////////////////////////////////////////////////////////////////
 513 
 514 // Test that arrays cannot have ACC_FLATTENABLE set.
 515 //
 516 class ValueFlatArray {
 517   0xCAFEBABE;
 518   0; // minor version
 519   55; // version
 520   [32] { // Constant Pool
 521     ; // first element is empty
 522     Method #8 #26; // #1     at 0x0A
 523     Field #4 #27; // #2     at 0x0F
 524     Field #4 #28; // #3     at 0x14
 525     class #10; // #4     at 0x19
 526     int 0x01234567; // #5     at 0x1C
 527     Method #4 #29; // #6     at 0x21
 528     Field #4 #30; // #7     at 0x26
 529     class #31; // #8     at 0x2B
 530     Utf8 "VT"; // #9     at 0x2E
 531     Utf8 "ValueFlatArray"; // #10     at 0x33
 532     Utf8 "ValueTypes"; // #11     at 0x40
 533     Utf8 "LValueFlatArray;"; // #12     at 0x4D
 534     Utf8 "int_v"; // #13     at 0x5C
 535     Utf8 "I"; // #14     at 0x64
 536     Utf8 "int_a"; // #15     at 0x68
 537     Utf8 "[I"; // #16     at 0x70
 538     Utf8 "<init>"; // #17     at 0x75
 539     Utf8 "()V"; // #18     at 0x7E
 540     Utf8 "Code"; // #19     at 0x84
 541     Utf8 "LineNumberTable"; // #20     at 0x8B
 542     Utf8 "makeValueFlatArray"; // #21     at 0x9D
 543     Utf8 "(I)LValueFlatArray;"; // #22     at 0xAE
 544     Utf8 "<clinit>"; // #23     at 0xC0
 545     Utf8 "SourceFile"; // #24     at 0xCB
 546     Utf8 "ValueFlatArray.java"; // #25     at 0xD8
 547     NameAndType #17 #18; // #26     at 0xEA
 548     NameAndType #13 #14; // #27     at 0xEF
 549     NameAndType #15 #16; // #28     at 0xF4
 550     NameAndType #21 #22; // #29     at 0xF9
 551     NameAndType #9 #12; // #30     at 0xFE
 552     Utf8 "java/lang/Object"; // #31     at 0x0103
 553   } // Constant Pool
 554 
 555   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 556   #4;// this_cpx
 557   #8;// super_cpx
 558 
 559   [0] { // Interfaces
 560   } // Interfaces
 561 
 562   [3] { // fields
 563     { // Member at 0x0120
 564       0x0118; // access
 565       #9; // name_cpx
 566       #12; // sig_cpx
 567       [0] { // Attributes
 568       } // Attributes
 569     } // Member
 570     ;
 571     { // Member at 0x0128
 572       0x0010; // access
 573       #13; // name_cpx
 574       #14; // sig_cpx
 575       [0] { // Attributes
 576       } // Attributes
 577     } // Member
 578     ;
 579     { // Member at 0x0130
 580       0x0110; // access // access [ ACC_FINAL ACC_FLATTENABLE(bad) ]
 581       #15; // name_cpx
 582       #16; // sig_cpx
 583       [0] { // Attributes
 584       } // Attributes
 585     } // Member
 586   } // fields
 587 
 588   [3] { // methods
 589     { // Member at 0x013A
 590       0x0000; // access
 591       #17; // name_cpx
 592       #18; // sig_cpx
 593       [1] { // Attributes
 594         Attr(#19, 51) { // Code at 0x0142
 595           2; // max_stack
 596           1; // max_locals
 597           Bytes[15]{
 598             0x2AB700012A04B500;
 599             0x022A01B50003B1;
 600           };
 601           [0] { // Traps
 602           } // end Traps
 603           [1] { // Attributes
 604             Attr(#20, 18) { // LineNumberTable at 0x0163
 605               [4] { // LineNumberTable
 606                 0  5; //  at 0x016F
 607                 4  6; //  at 0x0173
 608                 9  7; //  at 0x0177
 609                 14  8; //  at 0x017B
 610               }
 611             } // end LineNumberTable
 612           } // Attributes
 613         } // end Code
 614       } // Attributes
 615     } // Member
 616     ;
 617     { // Member at 0x017B
 618       0x0008; // access
 619       #21; // name_cpx
 620       #22; // sig_cpx
 621       [1] { // Attributes
 622         Attr(#19, 44) { // Code at 0x0183
 623           2; // max_stack
 624           2; // max_locals
 625           Bytes[12]{
 626             0xCB00044C2B1ACC00;
 627             0x024C2BB0;
 628           };
 629           [0] { // Traps
 630           } // end Traps
 631           [1] { // Attributes
 632             Attr(#20, 14) { // LineNumberTable at 0x01A1
 633               [3] { // LineNumberTable
 634                 0  10; //  at 0x01AD
 635                 4  11; //  at 0x01B1
 636                 10  12; //  at 0x01B5
 637               }
 638             } // end LineNumberTable
 639           } // Attributes
 640         } // end Code
 641       } // Attributes
 642     } // Member
 643     ;
 644     { // Member at 0x01B5
 645       0x0008; // access
 646       #23; // name_cpx
 647       #18; // sig_cpx
 648       [1] { // Attributes
 649         Attr(#19, 33) { // Code at 0x01BD
 650           1; // max_stack
 651           0; // max_locals
 652           Bytes[9]{
 653             0x1205B80006B30007;
 654             0xB1;
 655           };
 656           [0] { // Traps
 657           } // end Traps
 658           [1] { // Attributes
 659             Attr(#20, 6) { // LineNumberTable at 0x01D8
 660               [1] { // LineNumberTable
 661                 0  2; //  at 0x01E4
 662               }
 663             } // end LineNumberTable
 664           } // Attributes
 665         } // end Code
 666       } // Attributes
 667     } // Member
 668   } // methods
 669 
 670   [2] { // Attributes
 671     Attr(#24, 2) { // SourceFile at 0x01E6
 672       #25;
 673     } // end SourceFile
 674     ;
 675     Attr(#11, 4) { // ValueTypes at 0x01EE
 676       0x00010004;
 677     } // end ValueTypes
 678   } // Attributes
 679 } // end class ValueFlatArray
 680 
 681 //////////////////////////////////////////////////////////////////////
 682 
 683 // Test that a value type cannot have a method named <init>.
 684 //
 685 class ValueInitMethod {
 686   0xCAFEBABE;
 687   0; // minor version
 688   55; // version
 689   [28] { // Constant Pool
 690     ; // first element is empty
 691     Method #7 #23; // #1     at 0x0A
 692     Field #3 #24; // #2     at 0x0F
 693     class #9; // #3     at 0x14
 694     int 0x01234567; // #4     at 0x17
 695     Method #3 #25; // #5     at 0x1C
 696     Field #3 #26; // #6     at 0x21
 697     class #27; // #7     at 0x26
 698     Utf8 "VT"; // #8     at 0x29
 699     Utf8 "ValueInitMethod"; // #9     at 0x2E
 700     Utf8 "ValueTypes"; // #10     at 0x36
 701     Utf8 "LValueInitMethod;"; // #11     at 0x43
 702     Utf8 "int_v"; // #12     at 0x4D
 703     Utf8 "I"; // #13     at 0x55
 704     Utf8 "<init>"; // #14     at 0x59
 705     Utf8 "()V"; // #15     at 0x62
 706     Utf8 "Code"; // #16     at 0x68
 707     Utf8 "LineNumberTable"; // #17     at 0x6F
 708     Utf8 "makeValueInitMethod"; // #18     at 0x81
 709     Utf8 "(I)LValueInitMethod;"; // #19     at 0x8D
 710     Utf8 "<clinit>"; // #20     at 0x9A
 711     Utf8 "SourceFile"; // #21     at 0xA5
 712     Utf8 "ValueInitMethod.java"; // #22     at 0xB2
 713     NameAndType #14 #15; // #23     at 0xBF
 714     NameAndType #12 #13; // #24     at 0xC4
 715     NameAndType #18 #19; // #25     at 0xC9
 716     NameAndType #8 #11; // #26     at 0xCE
 717     Utf8 "java/lang/Object"; // #27     at 0xD3
 718   } // Constant Pool
 719 
 720   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 721   #3;// this_cpx
 722   #7;// super_cpx
 723 
 724   [0] { // Interfaces
 725   } // Interfaces
 726 
 727   [2] { // fields
 728     { // Member at 0xF0
 729       0x0118; // access
 730       #8; // name_cpx
 731       #11; // sig_cpx
 732       [0] { // Attributes
 733       } // Attributes
 734     } // Member
 735     ;
 736     { // Member at 0xF8
 737       0x0010; // access
 738       #12; // name_cpx
 739       #13; // sig_cpx
 740       [0] { // Attributes
 741       } // Attributes
 742     } // Member
 743   } // fields
 744 
 745   [3] { // methods
 746     { // Member at 0x0102
 747       0x0000; // access
 748       #14; // name_cpx (bad) <init>
 749       #15; // sig_cpx
 750       [1] { // Attributes
 751         Attr(#16, 42) { // Code at 0x010A
 752           2; // max_stack
 753           1; // max_locals
 754           Bytes[10]{
 755             0x2AB700012A04B500;
 756             0x02B1;
 757           };
 758           [0] { // Traps
 759           } // end Traps
 760           [1] { // Attributes
 761             Attr(#17, 14) { // LineNumberTable at 0x0126
 762               [3] { // LineNumberTable
 763                 0  4; //  at 0x0132
 764                 4  5; //  at 0x0136
 765                 9  6; //  at 0x013A
 766               }
 767             } // end LineNumberTable
 768           } // Attributes
 769         } // end Code
 770       } // Attributes
 771     } // Member
 772     ;
 773     { // Member at 0x013A
 774       0x0008; // access
 775       #18; // name_cpx
 776       #19; // sig_cpx
 777       [1] { // Attributes
 778         Attr(#16, 44) { // Code at 0x0142
 779           2; // max_stack
 780           2; // max_locals
 781           Bytes[12]{
 782             0xCB00034C2B1ACC00;
 783             0x024C2BB0;
 784           };
 785           [0] { // Traps
 786           } // end Traps
 787           [1] { // Attributes
 788             Attr(#17, 14) { // LineNumberTable at 0x0160
 789               [3] { // LineNumberTable
 790                 0  8; //  at 0x016C
 791                 4  9; //  at 0x0170
 792                 10  10; //  at 0x0174
 793               }
 794             } // end LineNumberTable
 795           } // Attributes
 796         } // end Code
 797       } // Attributes
 798     } // Member
 799     ;
 800     { // Member at 0x0174
 801       0x0008; // access
 802       #20; // name_cpx
 803       #15; // sig_cpx
 804       [1] { // Attributes
 805         Attr(#16, 33) { // Code at 0x017C
 806           1; // max_stack
 807           0; // max_locals
 808           Bytes[9]{
 809             0x1204B80005B30006;
 810             0xB1;
 811           };
 812           [0] { // Traps
 813           } // end Traps
 814           [1] { // Attributes
 815             Attr(#17, 6) { // LineNumberTable at 0x0197
 816               [1] { // LineNumberTable
 817                 0  2; //  at 0x01A3
 818               }
 819             } // end LineNumberTable
 820           } // Attributes
 821         } // end Code
 822       } // Attributes
 823     } // Member
 824   } // methods
 825 
 826   [2] { // Attributes
 827     Attr(#21, 2) { // SourceFile at 0x01A5
 828       #22;
 829     } // end SourceFile
 830     ;
 831     Attr(#10, 4) { // ValueTypes at 0x01AD
 832       0x00010003;
 833     } // end ValueTypes
 834   } // Attributes
 835 } // end class ValueInitMethod
 836 
 837 //////////////////////////////////////////////////////////////////////
 838 
 839 // Test that class modifiers cannot have both ACC_VALUE and ACC_INTERFACE set.
 840 //
 841 class ValueInterface {
 842   0xCAFEBABE;
 843   0; // minor version
 844   55; // version
 845   [27] { // Constant Pool
 846     ; // first element is empty
 847     Method #7 #21; // #1     at 0x0A
 848     Field #3 #22; // #2     at 0x0F
 849     class #23; // #3     at 0x14
 850     int 0x01234567; // #4     at 0x17
 851     Method #3 #24; // #5     at 0x1C
 852     Field #3 #25; // #6     at 0x21
 853     class #26; // #7     at 0x26


 924         } // end Code
 925       } // Attributes
 926     } // Member
 927   } // methods
 928 
 929   [1] { // Attributes
 930     Attr(#19, 2) { // SourceFile at 0x01AC
 931       #20;
 932     } // end SourceFile
 933   } // Attributes
 934 } // end class ValueInterface
 935 
 936 //////////////////////////////////////////////////////////////////////
 937 
 938 // Test that value type instance methods cannot be synchronized.
 939 //
 940 class ValueMethodSynch {
 941   0xCAFEBABE;
 942   0; // minor version
 943   55; // version
 944   [29] { // Constant Pool
 945     ; // first element is empty
 946     Method #7 #24; // #1     at 0x0A
 947     Field #3 #25; // #2     at 0x0F
 948     class #9; // #3     at 0x14
 949     int 0x01234567; // #4     at 0x17
 950     Method #3 #26; // #5     at 0x1C
 951     Field #3 #27; // #6     at 0x21
 952     class #28; // #7     at 0x26
 953     Utf8 "VT"; // #8     at 0x29
 954     Utf8 "ValueMethodSynch"; // #9     at 0x2E
 955     Utf8 "ValueTypes"; // #10     at 0x41
 956     Utf8 "LValueMethodSynch;"; // #11     at 0x4E
 957     Utf8 "int_v"; // #12     at 0x63
 958     Utf8 "I"; // #13     at 0x6B
 959     Utf8 "<init>"; // #14     at 0x6F
 960     Utf8 "()V"; // #15     at 0x78
 961     Utf8 "Code"; // #16     at 0x7E
 962     Utf8 "LineNumberTable"; // #17     at 0x85
 963     Utf8 "instanceMethod"; // #18     at 0x97
 964     Utf8 "makeValueMethodSynch"; // #19     at 0xA8
 965     Utf8 "(I)LValueMethodSynch;"; // #20     at 0xBF
 966     Utf8 "<clinit>"; // #21     at 0xD7
 967     Utf8 "SourceFile"; // #22     at 0xE2
 968     Utf8 "ValueMethodSynch.java"; // #23     at 0xEF
 969     NameAndType #14 #15; // #24     at 0x0107
 970     NameAndType #12 #13; // #25     at 0x010C
 971     NameAndType #19 #20; // #26     at 0x0111
 972     NameAndType #8 #11; // #27     at 0x0116
 973     Utf8 "java/lang/Object"; // #28     at 0x011B
 974   } // Constant Pool
 975 
 976   0x0130; // access [ ACC_VALUE ACC_SUPER ACC_FINAL ]
 977   #3;// this_cpx
 978   #7;// super_cpx
 979 
 980   [0] { // Interfaces
 981   } // Interfaces
 982 
 983   [2] { // fields
 984     { // Member at 0x0138
 985       0x0118; // access
 986       #8; // name_cpx
 987       #11; // sig_cpx
 988       [0] { // Attributes
 989       } // Attributes
 990     } // Member
 991     ;
 992     { // Member at 0x0140
 993       0x0010; // access
 994       #12; // name_cpx
 995       #13; // sig_cpx
 996       [0] { // Attributes
 997       } // Attributes
 998     } // Member
 999   } // fields
1000 
1001   [4] { // methods
1002     { // Member at 0x014A
1003       0x0000; // access
1004       #14; // name_cpx
1005       #15; // sig_cpx
1006       [1] { // Attributes
1007         Attr(#16, 42) { // Code at 0x0152
1008           2; // max_stack
1009           1; // max_locals
1010           Bytes[10]{
1011             0x2AB700012A04B500;
1012             0x02B1;
1013           };
1014           [0] { // Traps
1015           } // end Traps
1016           [1] { // Attributes
1017             Attr(#17, 14) { // LineNumberTable at 0x016E
1018               [3] { // LineNumberTable
1019                 0  4; //  at 0x017A
1020                 4  5; //  at 0x017E
1021                 9  6; //  at 0x0182
1022               }
1023             } // end LineNumberTable
1024           } // Attributes
1025         } // end Code
1026       } // Attributes
1027     } // Member
1028     ;
1029     { // Member at 0x0182
1030       0x0020; // access [ ACC_SYNCHRONIZED(bad) ]
1031       #18; // name_cpx
1032       #15; // sig_cpx
1033       [1] { // Attributes
1034         Attr(#16, 25) { // Code at 0x018A
1035           0; // max_stack
1036           1; // max_locals
1037           Bytes[1]{
1038             0xB1;
1039           };
1040           [0] { // Traps
1041           } // end Traps
1042           [1] { // Attributes
1043             Attr(#17, 6) { // LineNumberTable at 0x019D
1044               [1] { // LineNumberTable
1045                 0  8; //  at 0x01A9
1046               }
1047             } // end LineNumberTable
1048           } // Attributes
1049         } // end Code
1050       } // Attributes
1051     } // Member
1052     ;
1053     { // Member at 0x01A9
1054       0x0008; // access
1055       #19; // name_cpx
1056       #20; // sig_cpx
1057       [1] { // Attributes
1058         Attr(#16, 44) { // Code at 0x01B1
1059           2; // max_stack
1060           2; // max_locals
1061           Bytes[12]{
1062             0xCB00034C2B1ACC00;
1063             0x024C2BB0;
1064           };
1065           [0] { // Traps
1066           } // end Traps
1067           [1] { // Attributes
1068             Attr(#17, 14) { // LineNumberTable at 0x01CF
1069               [3] { // LineNumberTable
1070                 0  11; //  at 0x01DB
1071                 4  12; //  at 0x01DF
1072                 10  13; //  at 0x01E3
1073               }
1074             } // end LineNumberTable
1075           } // Attributes
1076         } // end Code
1077       } // Attributes
1078     } // Member
1079     ;
1080     { // Member at 0x01E3
1081       0x0008; // access
1082       #21; // name_cpx
1083       #15; // sig_cpx
1084       [1] { // Attributes
1085         Attr(#16, 33) { // Code at 0x01EB
1086           1; // max_stack
1087           0; // max_locals
1088           Bytes[9]{
1089             0x1204B80005B30006;
1090             0xB1;
1091           };
1092           [0] { // Traps
1093           } // end Traps
1094           [1] { // Attributes
1095             Attr(#17, 6) { // LineNumberTable at 0x0206
1096               [1] { // LineNumberTable
1097                 0  2; //  at 0x0212
1098               }
1099             } // end LineNumberTable
1100           } // Attributes
1101         } // end Code
1102       } // Attributes
1103     } // Member
1104   } // methods
1105 
1106   [2] { // Attributes
1107     Attr(#22, 2) { // SourceFile at 0x0214
1108       #23;
1109     } // end SourceFile
1110     ;
1111     Attr(#10, 4) { // ValueTypes at 0x021C
1112       0x00010003;
1113     } // end ValueTypes
1114   } // Attributes
1115 } // end class ValueMethodSynch
1116 
1117 //////////////////////////////////////////////////////////////////////
1118 
1119 // Test that a value type's super class must be java.lang.Object.
1120 //
1121 class ValueSuperClass {
1122   0xCAFEBABE;
1123   0; // minor version
1124   55; // version
1125   [30] { // Constant Pool
1126     ; // first element is empty
1127     Method #7 #23; // #1     at 0x0A
1128     Field #3 #24; // #2     at 0x0F
1129     class #9; // #3     at 0x14
1130     int 0x01234567; // #4     at 0x17
1131     Method #3 #25; // #5     at 0x1C
1132     Field #3 #26; // #6     at 0x21
1133     class #27; // #7     at 0x26
1134     Utf8 "VT"; // #8     at 0x29
1135     Utf8 "ValueSuperClass"; // #9     at 0x2E
1136     Utf8 "ValueTypes"; // #10     at 0x36
1137     Utf8 "LValueSuperClass;"; // #11     at 0x43
1138     Utf8 "int_v"; // #12     at 0x4D
1139     Utf8 "I"; // #13     at 0x55
1140     Utf8 "<init>"; // #14     at 0x59
1141     Utf8 "()V"; // #15     at 0x62
1142     Utf8 "Code"; // #16     at 0x68
1143     Utf8 "LineNumberTable"; // #17     at 0x6F
1144     Utf8 "makeValueSuperClass"; // #18     at 0x81
1145     Utf8 "(I)LValueSuperClass;"; // #19     at 0x8D
1146     Utf8 "<clinit>"; // #20     at 0x9A
1147     Utf8 "SourceFile"; // #21     at 0xA5
1148     Utf8 "ValueSuperClass.java"; // #22     at 0xB2
1149     NameAndType #14 #15; // #23     at 0xBF
1150     NameAndType #12 #13; // #24     at 0xC4
1151     NameAndType #18 #19; // #25     at 0xC9
1152     NameAndType #8 #11; // #26     at 0xCE
1153     Utf8 "java/lang/Object"; // #27     at 0xD3
1154     class #29; // #28
1155     Utf8 "java/lang/Throwable"; // #29
1156   } // Constant Pool
1157 
1158   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1159   #3;// this_cpx
1160   #28;// super_cpx
1161 
1162   [0] { // Interfaces
1163   } // Interfaces
1164 
1165   [2] { // fields
1166     { // Member at 0xF0
1167       0x0118; // access
1168       #8; // name_cpx
1169       #11; // sig_cpx
1170       [0] { // Attributes
1171       } // Attributes
1172     } // Member
1173     ;
1174     { // Member at 0xF8
1175       0x0010; // access
1176       #12; // name_cpx
1177       #13; // sig_cpx
1178       [0] { // Attributes
1179       } // Attributes
1180     } // Member
1181   } // fields
1182 
1183   [3] { // methods
1184     { // Member at 0x0102
1185       0x0000; // access
1186       #14; // name_cpx
1187       #15; // sig_cpx
1188       [1] { // Attributes
1189         Attr(#16, 42) { // Code at 0x010A
1190           2; // max_stack
1191           1; // max_locals
1192           Bytes[10]{
1193             0x2AB700012A04B500;
1194             0x02B1;
1195           };
1196           [0] { // Traps
1197           } // end Traps
1198           [1] { // Attributes
1199             Attr(#17, 14) { // LineNumberTable at 0x0126
1200               [3] { // LineNumberTable
1201                 0  4; //  at 0x0132
1202                 4  5; //  at 0x0136
1203                 9  6; //  at 0x013A
1204               }
1205             } // end LineNumberTable
1206           } // Attributes
1207         } // end Code
1208       } // Attributes
1209     } // Member
1210     ;
1211     { // Member at 0x013A
1212       0x0008; // access
1213       #18; // name_cpx
1214       #19; // sig_cpx
1215       [1] { // Attributes
1216         Attr(#16, 44) { // Code at 0x0142
1217           2; // max_stack
1218           2; // max_locals
1219           Bytes[12]{
1220             0xCB00034C2B1ACC00;
1221             0x024C2BB0;
1222           };
1223           [0] { // Traps
1224           } // end Traps
1225           [1] { // Attributes
1226             Attr(#17, 14) { // LineNumberTable at 0x0160
1227               [3] { // LineNumberTable
1228                 0  8; //  at 0x016C
1229                 4  9; //  at 0x0170
1230                 10  10; //  at 0x0174
1231               }
1232             } // end LineNumberTable
1233           } // Attributes
1234         } // end Code
1235       } // Attributes
1236     } // Member
1237     ;
1238     { // Member at 0x0174


1239       0x0008; // access
1240       #20; // name_cpx
1241       #15; // sig_cpx
1242       [1] { // Attributes
1243         Attr(#16, 33) { // Code at 0x017C
1244           1; // max_stack
1245           0; // max_locals
1246           Bytes[9]{
1247             0x1204B80005B30006;
1248             0xB1;
1249           };
1250           [0] { // Traps
1251           } // end Traps
1252           [1] { // Attributes
1253             Attr(#17, 6) { // LineNumberTable at 0x0197
1254               [1] { // LineNumberTable
1255                 0  2; //  at 0x01A3
1256               }
1257             } // end LineNumberTable
1258           } // Attributes
1259         } // end Code
1260       } // Attributes
1261     } // Member
1262   } // methods
1263 
1264   [2] { // Attributes
1265     Attr(#21, 2) { // SourceFile at 0x01A5
1266       #22;
1267     } // end SourceFile
1268     ;
1269     Attr(#10, 4) { // ValueTypes at 0x01AD
1270       0x00010003;
1271     } // end ValueTypes
1272   } // Attributes
1273 } // end class ValueSuperClass
1274 
1275 //////////////////////////////////////////////////////////////////////
1276 
1277 // Value types Circ and Circ2 have fields of each other's type.  This should
1278 // cause a ClassCircularityError exception when one of them is being loaded.
1279 //
1280 // The value types are based on these two Java classes:
1281 //
1282 // final __ByValue class Circ {
1283 //     static final Circ VT = makeCirc(0x01234567);
1284 //     final int int_v;
1285 //     __Flattenable final Circ2 v2;
1286 //     Circ() {
1287 //         int_v = 1;
1288 //         v2 = __MakeDefault Circ2();
1289 //     }
1290 //     static Circ makeCirc(int x) {
1291 //         Circ v = __MakeDefault Circ();
1292 //         v = __WithField(v.int_v, x);
1293 //         return v;
1294 //     }
1295 // }
1296 //----------------------------------------------------------------
1297 // final __ByValue class Circ2 {
1298 //     static final Circ2 VT = makeCirc2('\u0123');
1299 //     final char char_v;
1300 //     __Flattenable final Circ vv;
1301 //     Circ2() {
1302 //         char_v = 'z';
1303 //         vv = __MakeDefault Circ();
1304 //     }
1305 //     static Circ2 makeCirc2(char c) {
1306 //         Circ2 v = __MakeDefault Circ2();
1307 //         v = __WithField(v.char_v, c);
1308 //         return v;
1309 //     }
1310 // }
1311 
1312 class Circ {
1313   0xCAFEBABE;
1314   0; // minor version
1315   55; // version
1316   [34] { // Constant Pool
1317     ; // first element is empty
1318     Method #9 #28; // #1     at 0x0A
1319     Field #5 #29; // #2     at 0x0F
1320     class #17; // #3     at 0x14
1321     Field #5 #30; // #4     at 0x17
1322     class #11; // #5     at 0x1C
1323     int 0x01234567; // #6     at 0x1F
1324     Method #5 #31; // #7     at 0x24
1325     Field #5 #32; // #8     at 0x29
1326     class #33; // #9     at 0x2E
1327     Utf8 "VT"; // #10     at 0x31
1328     Utf8 "Circ"; // #11     at 0x36
1329     Utf8 "ValueTypes"; // #12     at 0x3D
1330     Utf8 "LCirc;"; // #13     at 0x4A
1331     Utf8 "int_v"; // #14     at 0x53
1332     Utf8 "I"; // #15     at 0x5B
1333     Utf8 "v2"; // #16     at 0x5F
1334     Utf8 "Circ2"; // #17     at 0x64
1335     Utf8 "LCirc2;"; // #18     at 0x6C
1336     Utf8 "<init>"; // #19     at 0x76
1337     Utf8 "()V"; // #20     at 0x7F
1338     Utf8 "Code"; // #21     at 0x85
1339     Utf8 "LineNumberTable"; // #22     at 0x8C
1340     Utf8 "makeCirc"; // #23     at 0x9E
1341     Utf8 "(I)LCirc;"; // #24     at 0xA9
1342     Utf8 "<clinit>"; // #25     at 0xB5
1343     Utf8 "SourceFile"; // #26     at 0xC0
1344     Utf8 "Circ.java"; // #27     at 0xCD
1345     NameAndType #19 #20; // #28     at 0xD9
1346     NameAndType #14 #15; // #29     at 0xDE
1347     NameAndType #16 #18; // #30     at 0xE3
1348     NameAndType #23 #24; // #31     at 0xE8
1349     NameAndType #10 #13; // #32     at 0xED
1350     Utf8 "java/lang/Object"; // #33     at 0xF2
1351   } // Constant Pool
1352 
1353   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1354   #5;// this_cpx
1355   #9;// super_cpx
1356 
1357   [0] { // Interfaces
1358   } // Interfaces
1359 
1360   [3] { // fields
1361     { // Member at 0x010F
1362       0x0118; // access
1363       #10; // name_cpx
1364       #13; // sig_cpx
1365       [0] { // Attributes
1366       } // Attributes
1367     } // Member
1368     ;
1369     { // Member at 0x0117
1370       0x0010; // access
1371       #14; // name_cpx
1372       #15; // sig_cpx
1373       [0] { // Attributes
1374       } // Attributes
1375     } // Member
1376     ;
1377     { // Member at 0x011F
1378       0x0110; // access
1379       #16; // name_cpx
1380       #18; // sig_cpx
1381       [0] { // Attributes
1382       } // Attributes
1383     } // Member
1384   } // fields
1385 
1386   [3] { // methods
1387     { // Member at 0x0129
1388       0x0000; // access
1389       #19; // name_cpx
1390       #20; // sig_cpx
1391       [1] { // Attributes
1392         Attr(#21, 53) { // Code at 0x0131
1393           2; // max_stack
1394           1; // max_locals
1395           Bytes[17]{
1396             0x2AB700012A04B500;
1397             0x022ACB0003B50004;
1398             0xB1;
1399           };
1400           [0] { // Traps
1401           } // end Traps
1402           [1] { // Attributes
1403             Attr(#22, 18) { // LineNumberTable at 0x0154
1404               [4] { // LineNumberTable
1405                 0  5; //  at 0x0160
1406                 4  6; //  at 0x0164
1407                 9  7; //  at 0x0168
1408                 16  8; //  at 0x016C
1409               }
1410             } // end LineNumberTable
1411           } // Attributes
1412         } // end Code
1413       } // Attributes
1414     } // Member
1415     ;
1416     { // Member at 0x016C
1417       0x0008; // access
1418       #23; // name_cpx
1419       #24; // sig_cpx
1420       [1] { // Attributes
1421         Attr(#21, 44) { // Code at 0x0174
1422           2; // max_stack
1423           2; // max_locals
1424           Bytes[12]{
1425             0xCB00054C2B1ACC00;
1426             0x024C2BB0;
1427           };
1428           [0] { // Traps
1429           } // end Traps
1430           [1] { // Attributes
1431             Attr(#22, 14) { // LineNumberTable at 0x0192
1432               [3] { // LineNumberTable
1433                 0  10; //  at 0x019E
1434                 4  11; //  at 0x01A2
1435                 10  12; //  at 0x01A6
1436               }
1437             } // end LineNumberTable
1438           } // Attributes
1439         } // end Code
1440       } // Attributes
1441     } // Member
1442     ;
1443     { // Member at 0x01A6
1444       0x0008; // access
1445       #25; // name_cpx
1446       #20; // sig_cpx
1447       [1] { // Attributes
1448         Attr(#21, 33) { // Code at 0x01AE
1449           1; // max_stack
1450           0; // max_locals
1451           Bytes[9]{
1452             0x1206B80007B30008;
1453             0xB1;
1454           };
1455           [0] { // Traps
1456           } // end Traps
1457           [1] { // Attributes
1458             Attr(#22, 6) { // LineNumberTable at 0x01C9
1459               [1] { // LineNumberTable
1460                 0  2; //  at 0x01D5
1461               }
1462             } // end LineNumberTable
1463           } // Attributes
1464         } // end Code
1465       } // Attributes
1466     } // Member
1467   } // methods
1468 
1469   [2] { // Attributes
1470     Attr(#26, 2) { // SourceFile at 0x01D7
1471       #27;
1472     } // end SourceFile
1473     ;
1474     Attr(#12, 6) { // ValueTypes at 0x01DF
1475       0x000200050003;
1476     } // end ValueTypes
1477   } // Attributes
1478 } // end class Circ
1479 

1480 class Circ2 {
1481   0xCAFEBABE;
1482   0; // minor version
1483   55; // version
1484   [33] { // Constant Pool
1485     ; // first element is empty
1486     Method #8 #27; // #1     at 0x0A
1487     Field #5 #28; // #2     at 0x0F
1488     class #16; // #3     at 0x14
1489     Field #5 #29; // #4     at 0x17
1490     class #10; // #5     at 0x1C
1491     Method #5 #30; // #6     at 0x1F
1492     Field #5 #31; // #7     at 0x24
1493     class #32; // #8     at 0x29
1494     Utf8 "VT"; // #9     at 0x2C
1495     Utf8 "Circ2"; // #10     at 0x31
1496     Utf8 "ValueTypes"; // #11     at 0x39
1497     Utf8 "LCirc2;"; // #12     at 0x46
1498     Utf8 "char_v"; // #13     at 0x50
1499     Utf8 "C"; // #14     at 0x59
1500     Utf8 "vv"; // #15     at 0x5D
1501     Utf8 "Circ"; // #16     at 0x62
1502     Utf8 "LCirc;"; // #17     at 0x69
1503     Utf8 "<init>"; // #18     at 0x72
1504     Utf8 "()V"; // #19     at 0x7B
1505     Utf8 "Code"; // #20     at 0x81
1506     Utf8 "LineNumberTable"; // #21     at 0x88
1507     Utf8 "makeCirc2"; // #22     at 0x9A
1508     Utf8 "(C)LCirc2;"; // #23     at 0xA6
1509     Utf8 "<clinit>"; // #24     at 0xB3
1510     Utf8 "SourceFile"; // #25     at 0xBE
1511     Utf8 "Circ2.java"; // #26     at 0xCB
1512     NameAndType #18 #19; // #27     at 0xD8
1513     NameAndType #13 #14; // #28     at 0xDD
1514     NameAndType #15 #17; // #29     at 0xE2
1515     NameAndType #22 #23; // #30     at 0xE7
1516     NameAndType #9 #12; // #31     at 0xEC
1517     Utf8 "java/lang/Object"; // #32     at 0xF1
1518   } // Constant Pool
1519 
1520   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1521   #5;// this_cpx
1522   #8;// super_cpx
1523 
1524   [0] { // Interfaces
1525   } // Interfaces
1526 
1527   [3] { // fields
1528     { // Member at 0x010E
1529       0x0118; // access
1530       #9; // name_cpx
1531       #12; // sig_cpx
1532       [0] { // Attributes
1533       } // Attributes
1534     } // Member
1535     ;
1536     { // Member at 0x0116
1537       0x0010; // access
1538       #13; // name_cpx
1539       #14; // sig_cpx
1540       [0] { // Attributes
1541       } // Attributes
1542     } // Member
1543     ;
1544     { // Member at 0x011E
1545       0x0110; // access
1546       #15; // name_cpx
1547       #17; // sig_cpx
1548       [0] { // Attributes
1549       } // Attributes
1550     } // Member
1551   } // fields
1552 
1553   [3] { // methods
1554     { // Member at 0x0128
1555       0x0000; // access
1556       #18; // name_cpx
1557       #19; // sig_cpx
1558       [1] { // Attributes
1559         Attr(#20, 54) { // Code at 0x0130
1560           2; // max_stack
1561           1; // max_locals
1562           Bytes[18]{
1563             0x2AB700012A107AB5;
1564             0x00022ACB0003B500;
1565             0x04B1;
1566           };
1567           [0] { // Traps
1568           } // end Traps
1569           [1] { // Attributes
1570             Attr(#21, 18) { // LineNumberTable at 0x0154
1571               [4] { // LineNumberTable
1572                 0  5; //  at 0x0160
1573                 4  6; //  at 0x0164
1574                 10  7; //  at 0x0168
1575                 17  8; //  at 0x016C
1576               }
1577             } // end LineNumberTable
1578           } // Attributes
1579         } // end Code
1580       } // Attributes
1581     } // Member
1582     ;
1583     { // Member at 0x016C
1584       0x0008; // access
1585       #22; // name_cpx
1586       #23; // sig_cpx
1587       [1] { // Attributes
1588         Attr(#20, 44) { // Code at 0x0174
1589           2; // max_stack
1590           2; // max_locals
1591           Bytes[12]{
1592             0xCB00054C2B1ACC00;
1593             0x024C2BB0;
1594           };
1595           [0] { // Traps
1596           } // end Traps
1597           [1] { // Attributes
1598             Attr(#21, 14) { // LineNumberTable at 0x0192
1599               [3] { // LineNumberTable
1600                 0  10; //  at 0x019E
1601                 4  11; //  at 0x01A2
1602                 10  12; //  at 0x01A6
1603               }
1604             } // end LineNumberTable
1605           } // Attributes
1606         } // end Code
1607       } // Attributes
1608     } // Member
1609     ;
1610     { // Member at 0x01A6
1611       0x0008; // access
1612       #24; // name_cpx
1613       #19; // sig_cpx
1614       [1] { // Attributes
1615         Attr(#20, 34) { // Code at 0x01AE
1616           1; // max_stack
1617           0; // max_locals
1618           Bytes[10]{
1619             0x110123B80006B300;
1620             0x07B1;
1621           };
1622           [0] { // Traps
1623           } // end Traps
1624           [1] { // Attributes
1625             Attr(#21, 6) { // LineNumberTable at 0x01CA
1626               [1] { // LineNumberTable
1627                 0  2; //  at 0x01D6
1628               }
1629             } // end LineNumberTable
1630           } // Attributes
1631         } // end Code
1632       } // Attributes
1633     } // Member
1634   } // methods
1635 
1636   [2] { // Attributes
1637     Attr(#25, 2) { // SourceFile at 0x01D8
1638       #26;
1639     } // end SourceFile
1640     ;
1641     Attr(#11, 6) { // ValueTypes at 0x01E0
1642       0x000200030005;
1643     } // end ValueTypes
1644   } // Attributes
1645 } // end class Circ2
1646 
1647 //////////////////////////////////////////////////////////////////////
1648 
1649 // Value types CircStaticA and CircStaticB have static fields of each other's
1650 // type.  This should cause a ClassCircularityError exception when one of them
1651 // is being loaded.
1652 //
1653 // The value types are based on these two Java classes:
1654 //
1655 // final __ByValue class CircStaticA {
1656 //     static final CircStaticA VT = makeCircStaticA(0x01234567);
1657 //     final int int_v;
1658 //     __Flattenable static final CircStaticB v2 = __MakeDefault CircStaticB();
1659 //     CircStaticA() {
1660 //         int_v = 1;
1661 //     }
1662 //     static CircStaticA makeCircStaticA(int x) {
1663 //         CircStaticA v = __MakeDefault CircStaticA();


1667 // }
1668 //----------------------------------------------------------------
1669 // final __ByValue class CircStaticB {
1670 //     static final CircStaticB VT = makeCircStaticB(0x01234567);
1671 //     final int int_v;
1672 //     __Flattenable static final CircStaticA v2 = __MakeDefault CircStaticA();
1673 //     CircStaticB() {
1674 //         int_v = 1;
1675 //     }
1676 //     static CircStaticB makeCircStaticB(int x) {
1677 //         CircStaticB v = __MakeDefault CircStaticB();
1678 //         v = __WithField(v.int_v, x);
1679 //         return v;
1680 //     }
1681 // }
1682 
1683 class CircStaticA {
1684   0xCAFEBABE;
1685   0; // minor version
1686   55; // version
1687   [34] { // Constant Pool
1688     ; // first element is empty
1689     Method #9 #28; // #1     at 0x0A
1690     Field #3 #29; // #2     at 0x0F
1691     class #11; // #3     at 0x14
1692     int 0x01234567; // #4     at 0x17
1693     Method #3 #30; // #5     at 0x1C
1694     Field #3 #31; // #6     at 0x21
1695     class #17; // #7     at 0x26
1696     Field #3 #32; // #8     at 0x29
1697     class #33; // #9     at 0x2E
1698     Utf8 "VT"; // #10     at 0x31
1699     Utf8 "CircStaticA"; // #11     at 0x36
1700     Utf8 "ValueTypes"; // #12     at 0x44
1701     Utf8 "LCircStaticA;"; // #13     at 0x51
1702     Utf8 "int_v"; // #14     at 0x61
1703     Utf8 "I"; // #15     at 0x69
1704     Utf8 "v2"; // #16     at 0x6D
1705     Utf8 "CircStaticB"; // #17     at 0x72
1706     Utf8 "LCircStaticB;"; // #18     at 0x80
1707     Utf8 "<init>"; // #19     at 0x90
1708     Utf8 "()V"; // #20     at 0x99
1709     Utf8 "Code"; // #21     at 0x9F
1710     Utf8 "LineNumberTable"; // #22     at 0xA6
1711     Utf8 "makeCircStaticA"; // #23     at 0xB8
1712     Utf8 "(I)LCircStaticA;"; // #24     at 0xCA
1713     Utf8 "<clinit>"; // #25     at 0xDD
1714     Utf8 "SourceFile"; // #26     at 0xE8
1715     Utf8 "CircStaticA.java"; // #27     at 0xF5
1716     NameAndType #19 #20; // #28     at 0x0108
1717     NameAndType #14 #15; // #29     at 0x010D
1718     NameAndType #23 #24; // #30     at 0x0112
1719     NameAndType #10 #13; // #31     at 0x0117
1720     NameAndType #16 #18; // #32     at 0x011C
1721     Utf8 "java/lang/Object"; // #33     at 0x0121
1722   } // Constant Pool
1723 
1724   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1725   #3;// this_cpx
1726   #9;// super_cpx
1727 
1728   [0] { // Interfaces
1729   } // Interfaces
1730 
1731   [3] { // fields
1732     { // Member at 0x013E
1733       0x0118; // access
1734       #10; // name_cpx
1735       #13; // sig_cpx
1736       [0] { // Attributes
1737       } // Attributes
1738     } // Member
1739     ;
1740     { // Member at 0x0146
1741       0x0010; // access
1742       #14; // name_cpx
1743       #15; // sig_cpx
1744       [0] { // Attributes
1745       } // Attributes
1746     } // Member
1747     ;
1748     { // Member at 0x014E
1749       0x0118; // access
1750       #16; // name_cpx
1751       #18; // sig_cpx
1752       [0] { // Attributes
1753       } // Attributes
1754     } // Member
1755   } // fields
1756 
1757   [3] { // methods
1758     { // Member at 0x0158
1759       0x0000; // access
1760       #19; // name_cpx
1761       #20; // sig_cpx
1762       [1] { // Attributes
1763         Attr(#21, 42) { // Code at 0x0160
1764           2; // max_stack
1765           1; // max_locals
1766           Bytes[10]{
1767             0x2AB700012A04B500;
1768             0x02B1;
1769           };
1770           [0] { // Traps
1771           } // end Traps
1772           [1] { // Attributes
1773             Attr(#22, 14) { // LineNumberTable at 0x017C
1774               [3] { // LineNumberTable
1775                 0  5; //  at 0x0188
1776                 4  6; //  at 0x018C
1777                 9  7; //  at 0x0190
1778               }
1779             } // end LineNumberTable
1780           } // Attributes
1781         } // end Code
1782       } // Attributes
1783     } // Member
1784     ;
1785     { // Member at 0x0190
1786       0x0008; // access
1787       #23; // name_cpx
1788       #24; // sig_cpx
1789       [1] { // Attributes
1790         Attr(#21, 44) { // Code at 0x0198
1791           2; // max_stack
1792           2; // max_locals
1793           Bytes[12]{
1794             0xCB00034C2B1ACC00;
1795             0x024C2BB0;
1796           };
1797           [0] { // Traps
1798           } // end Traps
1799           [1] { // Attributes
1800             Attr(#22, 14) { // LineNumberTable at 0x01B6
1801               [3] { // LineNumberTable
1802                 0  9; //  at 0x01C2
1803                 4  10; //  at 0x01C6
1804                 10  11; //  at 0x01CA
1805               }
1806             } // end LineNumberTable
1807           } // Attributes
1808         } // end Code
1809       } // Attributes
1810     } // Member
1811     ;
1812     { // Member at 0x01CA
1813       0x0008; // access
1814       #25; // name_cpx
1815       #20; // sig_cpx
1816       [1] { // Attributes
1817         Attr(#21, 43) { // Code at 0x01D2
1818           1; // max_stack
1819           0; // max_locals
1820           Bytes[15]{
1821             0x1204B80005B30006;
1822             0xCB0007B30008B1;
1823           };
1824           [0] { // Traps
1825           } // end Traps
1826           [1] { // Attributes
1827             Attr(#22, 10) { // LineNumberTable at 0x01F3
1828               [2] { // LineNumberTable
1829                 0  2; //  at 0x01FF
1830                 8  4; //  at 0x0203
1831               }
1832             } // end LineNumberTable
1833           } // Attributes
1834         } // end Code
1835       } // Attributes
1836     } // Member
1837   } // methods
1838 
1839   [2] { // Attributes
1840     Attr(#26, 2) { // SourceFile at 0x0205
1841       #27;
1842     } // end SourceFile
1843     ;
1844     Attr(#12, 6) { // ValueTypes at 0x020D
1845       0x000200030007;
1846     } // end ValueTypes
1847   } // Attributes
1848 } // end class CircStaticA
1849 
1850 class CircStaticB {
1851   0xCAFEBABE;
1852   0; // minor version
1853   55; // version
1854   [34] { // Constant Pool
1855     ; // first element is empty
1856     Method #9 #28; // #1     at 0x0A
1857     Field #3 #29; // #2     at 0x0F
1858     class #11; // #3     at 0x14
1859     int 0x01234567; // #4     at 0x17
1860     Method #3 #30; // #5     at 0x1C
1861     Field #3 #31; // #6     at 0x21
1862     class #17; // #7     at 0x26
1863     Field #3 #32; // #8     at 0x29
1864     class #33; // #9     at 0x2E
1865     Utf8 "VT"; // #10     at 0x31
1866     Utf8 "CircStaticB"; // #11     at 0x36
1867     Utf8 "ValueTypes"; // #12     at 0x44
1868     Utf8 "LCircStaticB;"; // #13     at 0x51
1869     Utf8 "int_v"; // #14     at 0x61
1870     Utf8 "I"; // #15     at 0x69
1871     Utf8 "v2"; // #16     at 0x6D
1872     Utf8 "CircStaticA"; // #17     at 0x72
1873     Utf8 "LCircStaticA;"; // #18     at 0x80
1874     Utf8 "<init>"; // #19     at 0x90
1875     Utf8 "()V"; // #20     at 0x99
1876     Utf8 "Code"; // #21     at 0x9F
1877     Utf8 "LineNumberTable"; // #22     at 0xA6
1878     Utf8 "makeCircStaticB"; // #23     at 0xB8
1879     Utf8 "(I)LCircStaticB;"; // #24     at 0xCA
1880     Utf8 "<clinit>"; // #25     at 0xDD
1881     Utf8 "SourceFile"; // #26     at 0xE8
1882     Utf8 "CircStaticB.java"; // #27     at 0xF5
1883     NameAndType #19 #20; // #28     at 0x0108
1884     NameAndType #14 #15; // #29     at 0x010D
1885     NameAndType #23 #24; // #30     at 0x0112
1886     NameAndType #10 #13; // #31     at 0x0117
1887     NameAndType #16 #18; // #32     at 0x011C
1888     Utf8 "java/lang/Object"; // #33     at 0x0121
1889   } // Constant Pool
1890 
1891   0x0130; // access [ ACC_SUPER ACC_FINAL ]
1892   #3;// this_cpx
1893   #9;// super_cpx
1894 
1895   [0] { // Interfaces
1896   } // Interfaces
1897 
1898   [3] { // fields
1899     { // Member at 0x013E
1900       0x0118; // access
1901       #10; // name_cpx
1902       #13; // sig_cpx
1903       [0] { // Attributes
1904       } // Attributes
1905     } // Member
1906     ;
1907     { // Member at 0x0146
1908       0x0010; // access
1909       #14; // name_cpx
1910       #15; // sig_cpx
1911       [0] { // Attributes
1912       } // Attributes
1913     } // Member
1914     ;
1915     { // Member at 0x014E
1916       0x0118; // access
1917       #16; // name_cpx
1918       #18; // sig_cpx
1919       [0] { // Attributes
1920       } // Attributes
1921     } // Member
1922   } // fields
1923 
1924   [3] { // methods
1925     { // Member at 0x0158
1926       0x0000; // access
1927       #19; // name_cpx
1928       #20; // sig_cpx
1929       [1] { // Attributes
1930         Attr(#21, 42) { // Code at 0x0160
1931           2; // max_stack
1932           1; // max_locals
1933           Bytes[10]{
1934             0x2AB700012A04B500;
1935             0x02B1;
1936           };
1937           [0] { // Traps
1938           } // end Traps
1939           [1] { // Attributes
1940             Attr(#22, 14) { // LineNumberTable at 0x017C
1941               [3] { // LineNumberTable
1942                 0  5; //  at 0x0188
1943                 4  6; //  at 0x018C
1944                 9  7; //  at 0x0190
1945               }
1946             } // end LineNumberTable
1947           } // Attributes
1948         } // end Code
1949       } // Attributes
1950     } // Member
1951     ;
1952     { // Member at 0x0190
1953       0x0008; // access
1954       #23; // name_cpx
1955       #24; // sig_cpx
1956       [1] { // Attributes
1957         Attr(#21, 44) { // Code at 0x0198
1958           2; // max_stack
1959           2; // max_locals
1960           Bytes[12]{
1961             0xCB00034C2B1ACC00;
1962             0x024C2BB0;
1963           };
1964           [0] { // Traps
1965           } // end Traps
1966           [1] { // Attributes
1967             Attr(#22, 14) { // LineNumberTable at 0x01B6
1968               [3] { // LineNumberTable
1969                 0  9; //  at 0x01C2
1970                 4  10; //  at 0x01C6
1971                 10  11; //  at 0x01CA
1972               }
1973             } // end LineNumberTable
1974           } // Attributes
1975         } // end Code
1976       } // Attributes
1977     } // Member
1978     ;
1979     { // Member at 0x01CA
1980       0x0008; // access
1981       #25; // name_cpx
1982       #20; // sig_cpx
1983       [1] { // Attributes
1984         Attr(#21, 43) { // Code at 0x01D2
1985           1; // max_stack
1986           0; // max_locals
1987           Bytes[15]{
1988             0x1204B80005B30006;
1989             0xCB0007B30008B1;
1990           };
1991           [0] { // Traps
1992           } // end Traps
1993           [1] { // Attributes
1994             Attr(#22, 10) { // LineNumberTable at 0x01F3
1995               [2] { // LineNumberTable
1996                 0  2; //  at 0x01FF
1997                 8  4; //  at 0x0203
1998               }
1999             } // end LineNumberTable
2000           } // Attributes
2001         } // end Code
2002       } // Attributes
2003     } // Member
2004   } // methods
2005 
2006   [2] { // Attributes
2007     Attr(#26, 2) { // SourceFile at 0x0205
2008       #27;
2009     } // end SourceFile
2010     ;
2011     Attr(#12, 6) { // ValueTypes at 0x020D
2012       0x000200070003;
2013     } // end ValueTypes
2014   } // Attributes
2015 } // end class CircStaticB
2016 
2017 //////////////////////////////////////////////////////////////////////
2018 
2019 // Test that a value type cannot be Cloneable.
2020 //
2021 // final __ByValue class ValueCloneable implements Cloneable {
2022 //    final int field;
2023 //    private ValueCloneable() { field = 0; }
2024 //}
2025 
2026 class ValueCloneable {
2027   0xCAFEBABE;
2028   0; // minor version
2029   55; // version
2030   [20] { // Constant Pool
2031     ; // first element is empty
2032     Method #4 #14; // #1     at 0x0A
2033     Field #3 #15; // #2     at 0x0F
2034     class #16; // #3     at 0x14
2035     class #18; // #4     at 0x17
2036     class #19; // #5     at 0x1A
2037     Utf8 "field"; // #6     at 0x1D
2038     Utf8 "I"; // #7     at 0x25
2039     Utf8 "<init>"; // #8     at 0x29
2040     Utf8 "()V"; // #9     at 0x32
2041     Utf8 "Code"; // #10     at 0x38
2042     Utf8 "LineNumberTable"; // #11     at 0x3F
2043     Utf8 "SourceFile"; // #12     at 0x51
2044     Utf8 "ValueCloneable.java"; // #13     at 0x5E
2045     NameAndType #8 #9; // #14     at 0x74
2046     NameAndType #6 #7; // #15     at 0x79
2047     Utf8 "ValueCloneable"; // #16     at 0x7E
2048     Utf8 "ValueTypes"; // #17     at 0x8F
2049     Utf8 "java/lang/Object"; // #18     at 0x9C
2050     Utf8 "java/lang/Cloneable"; // #19     at 0xAF
2051   } // Constant Pool
2052 
2053   0x0130; // access [ ACC_SUPER ACC_FINAL ]
2054   #3;// this_cpx
2055   #4;// super_cpx
2056 
2057   [1] { // Interfaces
2058     #5;
2059   } // Interfaces
2060 
2061   [1] { // fields
2062     { // Member at 0xD1
2063       0x0010; // access
2064       #6; // name_cpx
2065       #7; // sig_cpx
2066       [0] { // Attributes
2067       } // Attributes
2068     } // Member
2069   } // fields
2070 
2071   [1] { // methods
2072     { // Member at 0xDB
2073       0x0002; // access
2074       #8; // name_cpx
2075       #9; // sig_cpx
2076       [1] { // Attributes
2077         Attr(#10, 34) { // Code at 0xE3
2078           2; // max_stack
2079           1; // max_locals
2080           Bytes[10]{
2081             0x2AB700012A03B500;
2082             0x02B1;
2083           };
2084           [0] { // Traps
2085           } // end Traps
2086           [1] { // Attributes
2087             Attr(#11, 6) { // LineNumberTable at 0xFF
2088               [1] { // LineNumberTable
2089                 0  3; //  at 0x010B
2090               }
2091             } // end LineNumberTable
2092           } // Attributes
2093         } // end Code
2094       } // Attributes
2095     } // Member
2096   } // methods
2097 
2098   [2] { // Attributes
2099     Attr(#12, 2) { // SourceFile at 0x010D
2100       #13;
2101     } // end SourceFile
2102     ;
2103     Attr(#17, 4) { // ValueTypes at 0x0115
2104       0x00010003;
2105     } // end ValueTypes
2106   } // Attributes
2107 } // end class ValueCloneable
< prev index next >