test/hotspot/jtreg/runtime/linkResolver/TestDeletedMethod_Sub.jcod
changeset 52066 49a21be61dcd
equal deleted inserted replaced
52065:dea8a62cdfc3 52066:49a21be61dcd
       
     1 /*
       
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.
       
     8  *
       
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    12  * version 2 for more details (a copy is included in the LICENSE file that
       
    13  * accompanied this code).
       
    14  *
       
    15  * You should have received a copy of the GNU General Public License version
       
    16  * 2 along with this work; if not, write to the Free Software Foundation,
       
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    18  *
       
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    20  * or visit www.oracle.com if you need additional information or have any
       
    21  * questions.
       
    22  */
       
    23 
       
    24 // We have deleted the local method m() by renaming it
       
    25 // We have set the class file version to 49 to allow relaxed access checks
       
    26 
       
    27 class TestDeletedMethod_Sub {
       
    28   0xCAFEBABE;
       
    29   0; // minor version
       
    30   49; // version
       
    31   [] { // Constant Pool
       
    32     ; // first element is empty
       
    33     Method #7 #21; // #1
       
    34     Field #22 #23; // #2
       
    35     String #24; // #3
       
    36     Method #25 #26; // #4
       
    37     class #27; // #5
       
    38     Method #5 #28; // #6
       
    39     class #29; // #7
       
    40     Utf8 "ID"; // #8
       
    41     Utf8 "I"; // #9
       
    42     Utf8 "ConstantValue"; // #10
       
    43     int 0x00000001; // #11
       
    44     Utf8 "<init>"; // #12
       
    45     Utf8 "()V"; // #13
       
    46     Utf8 "Code"; // #14
       
    47     Utf8 "LineNumberTable"; // #15
       
    48     Utf8 "m"; // #16
       
    49     Utf8 "()I"; // #17
       
    50     Utf8 "test"; // #18
       
    51     Utf8 "SourceFile"; // #19
       
    52     Utf8 "TestDeletedMethod.java"; // #20
       
    53     NameAndType #12 #13; // #21
       
    54     class #30; // #22
       
    55     NameAndType #31 #32; // #23
       
    56     Utf8 "Sub.m"; // #24
       
    57     class #33; // #25
       
    58     NameAndType #34 #35; // #26
       
    59     Utf8 "TestDeletedMethod_Sub"; // #27
       
    60     NameAndType #16 #17; // #28
       
    61     Utf8 "TestDeletedMethod_Super"; // #29
       
    62     Utf8 "java/lang/System"; // #30
       
    63     Utf8 "out"; // #31
       
    64     Utf8 "Ljava/io/PrintStream;"; // #32
       
    65     Utf8 "java/io/PrintStream"; // #33
       
    66     Utf8 "println"; // #34
       
    67     Utf8 "(Ljava/lang/String;)V"; // #35
       
    68     Utf8 "m_renamed"; // #36 added
       
    69   } // Constant Pool
       
    70 
       
    71   0x0020; // access
       
    72   #5;// this_cpx
       
    73   #7;// super_cpx
       
    74 
       
    75   [] { // Interfaces
       
    76   } // Interfaces
       
    77 
       
    78   [] { // fields
       
    79     { // Member
       
    80       0x0019; // access
       
    81       #8; // name_cpx
       
    82       #9; // sig_cpx
       
    83       [] { // Attributes
       
    84         Attr(#10) { // ConstantValue
       
    85           #11;
       
    86         } // end ConstantValue
       
    87       } // Attributes
       
    88     } // Member
       
    89   } // fields
       
    90 
       
    91   [] { // methods
       
    92     { // Member
       
    93       0x0000; // access
       
    94       #12; // name_cpx
       
    95       #13; // sig_cpx
       
    96       [] { // Attributes
       
    97         Attr(#14) { // Code
       
    98           1; // max_stack
       
    99           1; // max_locals
       
   100           Bytes[]{
       
   101             0x2AB70001B1;
       
   102           };
       
   103           [] { // Traps
       
   104           } // end Traps
       
   105           [] { // Attributes
       
   106             Attr(#15) { // LineNumberTable
       
   107               [] { // LineNumberTable
       
   108                 0  43;
       
   109               }
       
   110             } // end LineNumberTable
       
   111           } // Attributes
       
   112         } // end Code
       
   113       } // Attributes
       
   114     } // Member
       
   115     ;
       
   116     { // Member
       
   117       0x000A; // access
       
   118       #36; // name_cpx UPDATED to rename method
       
   119       #17; // sig_cpx
       
   120       [] { // Attributes
       
   121         Attr(#14) { // Code
       
   122           2; // max_stack
       
   123           0; // max_locals
       
   124           Bytes[]{
       
   125             0xB200021203B60004;
       
   126             0x04AC;
       
   127           };
       
   128           [] { // Traps
       
   129           } // end Traps
       
   130           [] { // Attributes
       
   131             Attr(#15) { // LineNumberTable
       
   132               [] { // LineNumberTable
       
   133                 0  47;
       
   134                 8  48;
       
   135               }
       
   136             } // end LineNumberTable
       
   137           } // Attributes
       
   138         } // end Code
       
   139       } // Attributes
       
   140     } // Member
       
   141     ;
       
   142     { // Member
       
   143       0x0009; // access
       
   144       #18; // name_cpx
       
   145       #17; // sig_cpx
       
   146       [] { // Attributes
       
   147         Attr(#14) { // Code
       
   148           1; // max_stack
       
   149           0; // max_locals
       
   150           Bytes[]{
       
   151             0xB80006AC;
       
   152           };
       
   153           [] { // Traps
       
   154           } // end Traps
       
   155           [] { // Attributes
       
   156             Attr(#15) { // LineNumberTable
       
   157               [] { // LineNumberTable
       
   158                 0  51;
       
   159               }
       
   160             } // end LineNumberTable
       
   161           } // Attributes
       
   162         } // end Code
       
   163       } // Attributes
       
   164     } // Member
       
   165   } // methods
       
   166 
       
   167   [] { // Attributes
       
   168     Attr(#19) { // SourceFile
       
   169       #20;
       
   170     } // end SourceFile
       
   171   } // Attributes
       
   172 } // end class TestDeletedMethod_Sub