hotspot/test/runtime/modules/acc_module.jcod
author alanb
Fri, 10 Feb 2017 09:03:55 +0000
changeset 43665 4bb003cad9b9
parent 36508 5f9eee6b383b
child 43977 bf59cd83ea95
permissions -rw-r--r--
8173393: Module system implementation refresh (2/2017) Reviewed-by: lfoltan, acorn, mchung Contributed-by: alan.bateman@oracle.com, george.triantafillou@oracle.com
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
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    26
 * access_flags value of 0x8000, that should be ignored by the JVM.
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    27
 *
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    28
 *    public class acc_module {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    29
 *       public static void main(String[] args) {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    30
 *            System.out.println("hello");
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    31
 *        }
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
class acc_module {
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    35
  0xCAFEBABE;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    36
  0; // minor version
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    37
  52; // version
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    38
  [29] { // Constant Pool
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    39
    ; // first element is empty
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    40
    Method #6 #15; // #1     at 0x0A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    41
    Field #16 #17; // #2     at 0x0F
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    42
    String #18; // #3     at 0x14
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    43
    Method #19 #20; // #4     at 0x17
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    44
    class #21; // #5     at 0x1C
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    45
    class #22; // #6     at 0x1F
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    46
    Utf8 "<init>"; // #7     at 0x22
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    47
    Utf8 "()V"; // #8     at 0x2B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    48
    Utf8 "Code"; // #9     at 0x31
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    49
    Utf8 "LineNumberTable"; // #10     at 0x38
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    50
    Utf8 "main"; // #11     at 0x4A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    51
    Utf8 "([Ljava/lang/String;)V"; // #12     at 0x51
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    52
    Utf8 "SourceFile"; // #13     at 0x6A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    53
    Utf8 "acc_module.java"; // #14     at 0x77
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    54
    NameAndType #7 #8; // #15     at 0x89
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    55
    class #23; // #16     at 0x8E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    56
    NameAndType #24 #25; // #17     at 0x91
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    57
    Utf8 "hello"; // #18     at 0x96
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    58
    class #26; // #19     at 0x9E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    59
    NameAndType #27 #28; // #20     at 0xA1
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    60
    Utf8 "acc_module"; // #21     at 0xA6
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    61
    Utf8 "java/lang/Object"; // #22     at 0xB3
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    62
    Utf8 "java/lang/System"; // #23     at 0xC6
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    63
    Utf8 "out"; // #24     at 0xD9
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    64
    Utf8 "Ljava/io/PrintStream;"; // #25     at 0xDF
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    65
    Utf8 "java/io/PrintStream"; // #26     at 0xF7
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    66
    Utf8 "println"; // #27     at 0x010D
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    67
    Utf8 "(Ljava/lang/String;)V"; // #28     at 0x0117
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    68
  } // Constant Pool
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    69
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    70
  0x8000; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    71
  #5;// this_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    72
  #6;// super_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    73
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    74
  [0] { // Interfaces
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    75
  } // Interfaces
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    76
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    77
  [0] { // fields
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    78
  } // fields
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    79
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    80
  [2] { // methods
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    81
    { // Member at 0x013B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    82
      0x0001; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    83
      #7; // name_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    84
      #8; // sig_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    85
      [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    86
        Attr(#9, 29) { // Code at 0x0143
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    87
          1; // max_stack
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    88
          1; // max_locals
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    89
          Bytes[5]{
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    90
            0x2AB70001B1;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    91
          };
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    92
          [0] { // Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    93
          } // end Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    94
          [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    95
            Attr(#10, 6) { // LineNumberTable at 0x015A
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    96
              [1] { // LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    97
                0  1; //  at 0x0166
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    98
              }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
    99
            } // end LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   100
          } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   101
        } // end Code
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   102
      } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   103
    } // Member
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   104
    ;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   105
    { // Member at 0x0166
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   106
      0x0009; // access
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   107
      #11; // name_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   108
      #12; // sig_cpx
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   109
      [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   110
        Attr(#9, 37) { // Code at 0x016E
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   111
          2; // max_stack
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   112
          1; // max_locals
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   113
          Bytes[9]{
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   114
            0xB200021203B60004;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   115
            0xB1;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   116
          };
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   117
          [0] { // Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   118
          } // end Traps
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   119
          [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   120
            Attr(#10, 10) { // LineNumberTable at 0x0189
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   121
              [2] { // LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   122
                0  3; //  at 0x0195
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   123
                8  4; //  at 0x0199
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   124
              }
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   125
            } // end LineNumberTable
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   126
          } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   127
        } // end Code
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   128
      } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   129
    } // Member
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   130
  } // methods
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   131
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   132
  [1] { // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   133
    Attr(#13, 2) { // SourceFile at 0x019B
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   134
      #14;
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   135
    } // end SourceFile
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   136
  } // Attributes
5f9eee6b383b 8142968: Module System implementation
alanb
parents:
diff changeset
   137
} // end class acc_module