hotspot/test/runtime/modules/acc_module.jcod
author iris
Wed, 28 Jun 2017 11:27:28 -0700
changeset 45735 9f2e7fa2d999
parent 43977 bf59cd83ea95
permissions -rw-r--r--
8183142: Add bugids=dup to .jcheck/conf files for JDK 10 Reviewed-by: mr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * questions.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 */
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    23
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    24
/*
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    25
 * This class consists of the following java code, but has an illegal class
43977
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents: 36508
diff changeset
    26
 * access_flags value of 0x8000, that should be ignored by the JVM because
bf59cd83ea95 8174725: JVM should throw NoClassDefFoundError if ACC_MODULE is set in access_flags
hseigel
parents: 36508
diff changeset
    27
 * the class file version is < 53.
36508
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    28
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    29
 *    public class acc_module {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    30
 *       public static void main(String[] args) {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 *            System.out.println("hello");
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    32
 *        }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    33
 *    }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    34
 */
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    35
class acc_module {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    36
  0xCAFEBABE;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    37
  0; // minor version
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    38
  52; // version
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    39
  [29] { // Constant Pool
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    40
    ; // first element is empty
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    41
    Method #6 #15; // #1     at 0x0A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    42
    Field #16 #17; // #2     at 0x0F
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    43
    String #18; // #3     at 0x14
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    44
    Method #19 #20; // #4     at 0x17
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    45
    class #21; // #5     at 0x1C
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    46
    class #22; // #6     at 0x1F
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    47
    Utf8 "<init>"; // #7     at 0x22
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    48
    Utf8 "()V"; // #8     at 0x2B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    49
    Utf8 "Code"; // #9     at 0x31
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    50
    Utf8 "LineNumberTable"; // #10     at 0x38
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    Utf8 "main"; // #11     at 0x4A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    52
    Utf8 "([Ljava/lang/String;)V"; // #12     at 0x51
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    53
    Utf8 "SourceFile"; // #13     at 0x6A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    54
    Utf8 "acc_module.java"; // #14     at 0x77
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    55
    NameAndType #7 #8; // #15     at 0x89
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    56
    class #23; // #16     at 0x8E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    57
    NameAndType #24 #25; // #17     at 0x91
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    58
    Utf8 "hello"; // #18     at 0x96
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    59
    class #26; // #19     at 0x9E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    60
    NameAndType #27 #28; // #20     at 0xA1
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    61
    Utf8 "acc_module"; // #21     at 0xA6
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    Utf8 "java/lang/Object"; // #22     at 0xB3
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    Utf8 "java/lang/System"; // #23     at 0xC6
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    64
    Utf8 "out"; // #24     at 0xD9
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    Utf8 "Ljava/io/PrintStream;"; // #25     at 0xDF
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    66
    Utf8 "java/io/PrintStream"; // #26     at 0xF7
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    67
    Utf8 "println"; // #27     at 0x010D
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    68
    Utf8 "(Ljava/lang/String;)V"; // #28     at 0x0117
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    69
  } // Constant Pool
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    70
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    71
  0x8000; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    72
  #5;// this_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    73
  #6;// super_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    74
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    75
  [0] { // Interfaces
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    76
  } // Interfaces
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    77
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    78
  [0] { // fields
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    79
  } // fields
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    80
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    81
  [2] { // methods
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    82
    { // Member at 0x013B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    83
      0x0001; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    84
      #7; // name_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    85
      #8; // sig_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    86
      [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    87
        Attr(#9, 29) { // Code at 0x0143
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    88
          1; // max_stack
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    89
          1; // max_locals
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    90
          Bytes[5]{
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    91
            0x2AB70001B1;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    92
          };
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    93
          [0] { // Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    94
          } // end Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    95
          [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    96
            Attr(#10, 6) { // LineNumberTable at 0x015A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    97
              [1] { // LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    98
                0  1; //  at 0x0166
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    99
              }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   100
            } // end LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   101
          } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   102
        } // end Code
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   103
      } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   104
    } // Member
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   105
    ;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   106
    { // Member at 0x0166
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   107
      0x0009; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   108
      #11; // name_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   109
      #12; // sig_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   110
      [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   111
        Attr(#9, 37) { // Code at 0x016E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   112
          2; // max_stack
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   113
          1; // max_locals
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   114
          Bytes[9]{
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   115
            0xB200021203B60004;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   116
            0xB1;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   117
          };
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   118
          [0] { // Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   119
          } // end Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   120
          [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   121
            Attr(#10, 10) { // LineNumberTable at 0x0189
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   122
              [2] { // LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   123
                0  3; //  at 0x0195
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   124
                8  4; //  at 0x0199
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   125
              }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   126
            } // end LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   127
          } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   128
        } // end Code
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   129
      } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   130
    } // Member
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   131
  } // methods
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   132
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   133
  [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   134
    Attr(#13, 2) { // SourceFile at 0x019B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   135
      #14;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   136
    } // end SourceFile
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   137
  } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   138
} // end class acc_module