jdk/src/jdk.pack200/share/native/common-unpack/constants.h
author mchung
Fri, 06 Mar 2015 09:02:26 -0800
changeset 29368 be944a521c76
parent 25859 jdk/src/jdk.runtime/share/native/common-unpack/constants.h@3317bb8137f4
child 38421 f75f729fdc5c
permissions -rw-r--r--
8074428: Move pack200, unpack200, libpack200 to jdk.pack200 Reviewed-by: alanb, weijun, erikj, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
15261
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
     2
 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
  Java Class Version numbers history
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
  1.0 to 1.3.X 45,3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
  1.4 to 1.4.X 46,0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
  1.5 to 1.5.X 49,0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
  1.6 to 1.5.x 50,0 NOTE Assumed for now
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
// classfile constants
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#define JAVA_MAGIC 0xCAFEBABE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#define JAVA_MIN_MAJOR_VERSION 45
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#define JAVA_MIN_MINOR_VERSION 3
14407
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    38
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#define JAVA5_MAX_MAJOR_VERSION 49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#define JAVA5_MAX_MINOR_VERSION 0
14407
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    41
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#define JAVA6_MAX_MAJOR_VERSION 50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#define JAVA6_MAX_MINOR_VERSION 0
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
14407
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    45
#define JAVA7_MAX_MAJOR_VERSION 51
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    46
#define JAVA7_MAX_MINOR_VERSION 0
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    47
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    48
#define JAVA8_MAX_MAJOR_VERSION 52
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    49
#define JAVA8_MAX_MINOR_VERSION 0
09c87f7a7199 7050936: (pack200) Support version 52.0 class files in langtools
ksrini
parents: 12544
diff changeset
    50
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
// package file constants
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
#define JAVA_PACKAGE_MAGIC 0xCAFED00D
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#define JAVA5_PACKAGE_MAJOR_VERSION 150
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
#define JAVA5_PACKAGE_MINOR_VERSION 7
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#define JAVA6_PACKAGE_MAJOR_VERSION 160
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
#define JAVA6_PACKAGE_MINOR_VERSION 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    59
#define JAVA7_PACKAGE_MAJOR_VERSION 170
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    60
#define JAVA7_PACKAGE_MINOR_VERSION 1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
15261
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
    62
#define JAVA8_PACKAGE_MAJOR_VERSION 171
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
    63
#define JAVA8_PACKAGE_MINOR_VERSION 0
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
    64
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
// magic number for gzip streams (for processing pack200-gzip data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#define GZIP_MAGIC      0x1F8B0800
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#define GZIP_MAGIC_MASK 0xFFFFFF00  // last byte is variable "flg" field
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
enum {
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    70
    CONSTANT_None               = 0,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    71
    CONSTANT_Utf8               = 1,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    72
    CONSTANT_unused             = 2,     /* unused, was Unicode */
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    73
    CONSTANT_Integer            = 3,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    74
    CONSTANT_Float              = 4,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    75
    CONSTANT_Long               = 5,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    76
    CONSTANT_Double             = 6,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    77
    CONSTANT_Class              = 7,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    78
    CONSTANT_String             = 8,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    79
    CONSTANT_Fieldref           = 9,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    80
    CONSTANT_Methodref          = 10,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    81
    CONSTANT_InterfaceMethodref = 11,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    82
    CONSTANT_NameandType        = 12,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    83
    CONSTANT_unused13           = 13,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    84
    CONSTANT_unused14           = 14,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    85
    CONSTANT_MethodHandle       = 15,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    86
    CONSTANT_MethodType         = 16,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    87
    CONSTANT_unused17           = 17,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    88
    CONSTANT_InvokeDynamic      = 18,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    89
    CONSTANT_Limit              = 19,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    90
    CONSTANT_Signature          = CONSTANT_unused13,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    91
    CONSTANT_BootstrapMethod    = CONSTANT_unused17, // used only for InvokeDynamic
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    92
    CONSTANT_All                = 50,                // combined global map
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    93
    CONSTANT_LoadableValue      = 51,                // used for 'KL' and qldc operands
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    94
    CONSTANT_AnyMember          = 52,                // union of refs to field or (interface) method
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    95
    CONSTANT_FieldSpecific      = 53,                // used only for 'KQ' ConstantValue attrs
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    96
    CONSTANT_GroupFirst         = CONSTANT_All,      // start group marker
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    97
    CONSTANT_GroupLimit         = 54,                // end group marker
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
    99
    // CONSTANT_MethodHandle reference kinds
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   100
    REF_getField         = 1,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   101
    REF_getStatic        = 2,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   102
    REF_putField         = 3,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   103
    REF_putStatic        = 4,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   104
    REF_invokeVirtual    = 5,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   105
    REF_invokeStatic     = 6,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   106
    REF_invokeSpecial    = 7,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   107
    REF_newInvokeSpecial = 8,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   108
    REF_invokeInterface  = 9,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    SUBINDEX_BIT = 64,  // combined with CONSTANT_xxx for ixTag
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    ACC_STATIC       = 0x0008,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    ACC_IC_LONG_FORM = (1<<16), //for ic_flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   115
    CLASS_ATTR_SourceFile                            = 17,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   116
    CLASS_ATTR_EnclosingMethod                       = 18,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   117
    CLASS_ATTR_InnerClasses                          = 23,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   118
    CLASS_ATTR_ClassFile_version                     = 24,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   119
    CLASS_ATTR_BootstrapMethods                      = 25,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   120
    FIELD_ATTR_ConstantValue                         = 17,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   121
    METHOD_ATTR_Code                                 = 17,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   122
    METHOD_ATTR_Exceptions                           = 18,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   123
    METHOD_ATTR_RuntimeVisibleParameterAnnotations   = 23,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    METHOD_ATTR_RuntimeInvisibleParameterAnnotations = 24,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   125
    METHOD_ATTR_AnnotationDefault                    = 25,
15261
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
   126
    METHOD_ATTR_MethodParameters                     = 26,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   127
    CODE_ATTR_StackMapTable          = 0,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   128
    CODE_ATTR_LineNumberTable        = 1,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   129
    CODE_ATTR_LocalVariableTable     = 2,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    CODE_ATTR_LocalVariableTypeTable = 3,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    //X_ATTR_Synthetic = 12,  // ACC_SYNTHETIC; not predefined
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   132
    X_ATTR_Signature                   = 19,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   133
    X_ATTR_Deprecated                  = 20,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   134
    X_ATTR_RuntimeVisibleAnnotations   = 21,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    X_ATTR_RuntimeInvisibleAnnotations = 22,
17490
46864558d068 8001163: [pack200] should support attributes introduced by JSR-308
ksrini
parents: 16050
diff changeset
   136
    X_ATTR_RuntimeVisibleTypeAnnotations   = 27,
46864558d068 8001163: [pack200] should support attributes introduced by JSR-308
ksrini
parents: 16050
diff changeset
   137
    X_ATTR_RuntimeInvisibleTypeAnnotations = 28,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   138
    X_ATTR_OVERFLOW                    = 16,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   139
    X_ATTR_LIMIT_NO_FLAGS_HI           = 32,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   140
    X_ATTR_LIMIT_FLAGS_HI              = 63,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
#define O_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
        F(X_ATTR_OVERFLOW,01) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
#define X_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
        O_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
        F(X_ATTR_Signature,Signature) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        F(X_ATTR_Deprecated,Deprecated) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        F(X_ATTR_RuntimeVisibleAnnotations,RuntimeVisibleAnnotations) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
        F(X_ATTR_RuntimeInvisibleAnnotations,RuntimeInvisibleAnnotations) \
17490
46864558d068 8001163: [pack200] should support attributes introduced by JSR-308
ksrini
parents: 16050
diff changeset
   151
        F(X_ATTR_RuntimeVisibleTypeAnnotations,RuntimeVisibleTypeAnnotations) \
46864558d068 8001163: [pack200] should support attributes introduced by JSR-308
ksrini
parents: 16050
diff changeset
   152
        F(X_ATTR_RuntimeInvisibleTypeAnnotations,RuntimeInvisibleTypeAnnotations) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
        /*F(X_ATTR_Synthetic,Synthetic)*/ \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
#define CLASS_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
        F(CLASS_ATTR_SourceFile,SourceFile) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
        F(CLASS_ATTR_InnerClasses,InnerClasses) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        F(CLASS_ATTR_EnclosingMethod,EnclosingMethod) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        F(CLASS_ATTR_ClassFile_version,02) \
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   160
        F(CLASS_ATTR_BootstrapMethods,BootstrapMethods) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
#define FIELD_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
        F(FIELD_ATTR_ConstantValue,ConstantValue) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#define METHOD_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        F(METHOD_ATTR_Code,Code) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
        F(METHOD_ATTR_Exceptions,Exceptions) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
        F(METHOD_ATTR_RuntimeVisibleParameterAnnotations,RuntimeVisibleParameterAnnotations) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
        F(METHOD_ATTR_RuntimeInvisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        F(METHOD_ATTR_AnnotationDefault,AnnotationDefault) \
15261
c5b882836677 8005252: pack200 should support MethodParameters
ksrini
parents: 14407
diff changeset
   171
        F(METHOD_ATTR_MethodParameters,MethodParameters) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
#define CODE_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        F(CODE_ATTR_StackMapTable,StackMapTable) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
        F(CODE_ATTR_LineNumberTable,LineNumberTable) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        F(CODE_ATTR_LocalVariableTable,LocalVariableTable) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
        F(CODE_ATTR_LocalVariableTypeTable,LocalVariableTypeTable) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
#define ALL_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        X_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
        CLASS_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        FIELD_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
        METHOD_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        CODE_ATTR_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    // attribute "context types"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    ATTR_CONTEXT_CLASS  = 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    ATTR_CONTEXT_FIELD  = 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    ATTR_CONTEXT_METHOD = 2,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    ATTR_CONTEXT_CODE   = 3,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    ATTR_CONTEXT_LIMIT  = 4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
    // constants for parsed layouts (stored in band::le_kind)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    EK_NONE = 0,     // not a layout element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
    EK_INT  = 'I',   // B H I SH etc., also FH etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    EK_BCI  = 'P',   // PH etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    EK_BCID = 'Q',   // POH etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    EK_BCO  = 'O',   // OH etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
    EK_REPL = 'N',   // NH[...] etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    EK_REF  = 'R',   // RUH, RUNH, KQH, etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
    EK_UN   = 'T',   // TB(...)[...] etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    EK_CASE = 'K',   // (...)[...] etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    EK_CALL = '(',   // (0), (1), etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
    EK_CBLE = '[',   // [...][...] etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
    NO_BAND_INDEX = -1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    // File option bits, from LSB in ascending bit position.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    FO_DEFLATE_HINT           = 1<<0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    FO_IS_CLASS_STUB          = 1<<1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    // Archive option bits, from LSB in ascending bit position:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    AO_HAVE_SPECIAL_FORMATS   = 1<<0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
    AO_HAVE_CP_NUMBERS        = 1<<1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    AO_HAVE_ALL_CODE_FLAGS    = 1<<2,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   216
    AO_HAVE_CP_EXTRAS         = 1<<3,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    AO_HAVE_FILE_HEADERS      = 1<<4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    AO_DEFLATE_HINT           = 1<<5,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
    AO_HAVE_FILE_MODTIME      = 1<<6,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    AO_HAVE_FILE_OPTIONS      = 1<<7,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
    AO_HAVE_FILE_SIZE_HI      = 1<<8,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
    AO_HAVE_CLASS_FLAGS_HI    = 1<<9,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    AO_HAVE_FIELD_FLAGS_HI    = 1<<10,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
    AO_HAVE_METHOD_FLAGS_HI   = 1<<11,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    AO_HAVE_CODE_FLAGS_HI     = 1<<12,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   226
    AO_UNUSED_MBZ             = (-1)<<13, // options bits reserved for future use.
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   227
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
#define ARCHIVE_BIT_DO(F) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
         F(AO_HAVE_SPECIAL_FORMATS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
         F(AO_HAVE_CP_NUMBERS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
         F(AO_HAVE_ALL_CODE_FLAGS) \
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   232
         F(AO_HAVE_CP_EXTRAS) \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
         F(AO_HAVE_FILE_HEADERS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
         F(AO_DEFLATE_HINT) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
         F(AO_HAVE_FILE_MODTIME) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
         F(AO_HAVE_FILE_OPTIONS) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
         F(AO_HAVE_FILE_SIZE_HI) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
         F(AO_HAVE_CLASS_FLAGS_HI) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
         F(AO_HAVE_FIELD_FLAGS_HI) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
         F(AO_HAVE_METHOD_FLAGS_HI) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
         F(AO_HAVE_CODE_FLAGS_HI) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
          /*(end)*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
    // Constants for decoding attribute definition header bytes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    ADH_CONTEXT_MASK   = 0x3,  // (hdr & ADH_CONTEXT_MASK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
    ADH_BIT_SHIFT      = 0x2,  // (hdr >> ADH_BIT_SHIFT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
    ADH_BIT_IS_LSB     = 1,    // (hdr >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
#define ADH_BYTE(context, index) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
        ((((index) + ADH_BIT_IS_LSB)<<ADH_BIT_SHIFT) + (context))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
#define ADH_BYTE_CONTEXT(adhb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
        ((adhb) & ADH_CONTEXT_MASK)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
#define ADH_BYTE_INDEX(adhb) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
        (((adhb) >> ADH_BIT_SHIFT) - ADH_BIT_IS_LSB)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    NO_MODTIME = 0,  // null modtime value
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
    // meta-coding
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   258
    _meta_default   = 0,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
    _meta_canon_min = 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    _meta_canon_max = 115,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   261
    _meta_arb       = 116,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   262
    _meta_run       = 117,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   263
    _meta_pop       = 141,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   264
    _meta_limit     = 189,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   265
    _meta_error     = 255,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
    _xxx_1_end
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
// Bytecodes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
enum {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
  bc_nop                  =   0, // 0x00
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
  bc_aconst_null          =   1, // 0x01
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
  bc_iconst_m1            =   2, // 0x02
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
  bc_iconst_0             =   3, // 0x03
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
  bc_iconst_1             =   4, // 0x04
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
  bc_iconst_2             =   5, // 0x05
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
  bc_iconst_3             =   6, // 0x06
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
  bc_iconst_4             =   7, // 0x07
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
  bc_iconst_5             =   8, // 0x08
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
  bc_lconst_0             =   9, // 0x09
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
  bc_lconst_1             =  10, // 0x0a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
  bc_fconst_0             =  11, // 0x0b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
  bc_fconst_1             =  12, // 0x0c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
  bc_fconst_2             =  13, // 0x0d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
  bc_dconst_0             =  14, // 0x0e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
  bc_dconst_1             =  15, // 0x0f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
  bc_bipush               =  16, // 0x10
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
  bc_sipush               =  17, // 0x11
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
  bc_ldc                  =  18, // 0x12
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
  bc_ldc_w                =  19, // 0x13
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
  bc_ldc2_w               =  20, // 0x14
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
  bc_iload                =  21, // 0x15
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
  bc_lload                =  22, // 0x16
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
  bc_fload                =  23, // 0x17
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
  bc_dload                =  24, // 0x18
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
  bc_aload                =  25, // 0x19
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
  bc_iload_0              =  26, // 0x1a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
  bc_iload_1              =  27, // 0x1b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
  bc_iload_2              =  28, // 0x1c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
  bc_iload_3              =  29, // 0x1d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
  bc_lload_0              =  30, // 0x1e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
  bc_lload_1              =  31, // 0x1f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
  bc_lload_2              =  32, // 0x20
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
  bc_lload_3              =  33, // 0x21
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
  bc_fload_0              =  34, // 0x22
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
  bc_fload_1              =  35, // 0x23
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
  bc_fload_2              =  36, // 0x24
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
  bc_fload_3              =  37, // 0x25
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
  bc_dload_0              =  38, // 0x26
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
  bc_dload_1              =  39, // 0x27
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
  bc_dload_2              =  40, // 0x28
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
  bc_dload_3              =  41, // 0x29
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
  bc_aload_0              =  42, // 0x2a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
  bc_aload_1              =  43, // 0x2b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
  bc_aload_2              =  44, // 0x2c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
  bc_aload_3              =  45, // 0x2d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
  bc_iaload               =  46, // 0x2e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
  bc_laload               =  47, // 0x2f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
  bc_faload               =  48, // 0x30
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
  bc_daload               =  49, // 0x31
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
  bc_aaload               =  50, // 0x32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
  bc_baload               =  51, // 0x33
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
  bc_caload               =  52, // 0x34
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
  bc_saload               =  53, // 0x35
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
  bc_istore               =  54, // 0x36
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
  bc_lstore               =  55, // 0x37
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
  bc_fstore               =  56, // 0x38
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
  bc_dstore               =  57, // 0x39
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
  bc_astore               =  58, // 0x3a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
  bc_istore_0             =  59, // 0x3b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
  bc_istore_1             =  60, // 0x3c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
  bc_istore_2             =  61, // 0x3d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
  bc_istore_3             =  62, // 0x3e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
  bc_lstore_0             =  63, // 0x3f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
  bc_lstore_1             =  64, // 0x40
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
  bc_lstore_2             =  65, // 0x41
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
  bc_lstore_3             =  66, // 0x42
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
  bc_fstore_0             =  67, // 0x43
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
  bc_fstore_1             =  68, // 0x44
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
  bc_fstore_2             =  69, // 0x45
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
  bc_fstore_3             =  70, // 0x46
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
  bc_dstore_0             =  71, // 0x47
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
  bc_dstore_1             =  72, // 0x48
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
  bc_dstore_2             =  73, // 0x49
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
  bc_dstore_3             =  74, // 0x4a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
  bc_astore_0             =  75, // 0x4b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
  bc_astore_1             =  76, // 0x4c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
  bc_astore_2             =  77, // 0x4d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
  bc_astore_3             =  78, // 0x4e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
  bc_iastore              =  79, // 0x4f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
  bc_lastore              =  80, // 0x50
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
  bc_fastore              =  81, // 0x51
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
  bc_dastore              =  82, // 0x52
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
  bc_aastore              =  83, // 0x53
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
  bc_bastore              =  84, // 0x54
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
  bc_castore              =  85, // 0x55
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
  bc_sastore              =  86, // 0x56
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
  bc_pop                  =  87, // 0x57
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
  bc_pop2                 =  88, // 0x58
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
  bc_dup                  =  89, // 0x59
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
  bc_dup_x1               =  90, // 0x5a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
  bc_dup_x2               =  91, // 0x5b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  bc_dup2                 =  92, // 0x5c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
  bc_dup2_x1              =  93, // 0x5d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
  bc_dup2_x2              =  94, // 0x5e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
  bc_swap                 =  95, // 0x5f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
  bc_iadd                 =  96, // 0x60
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
  bc_ladd                 =  97, // 0x61
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
  bc_fadd                 =  98, // 0x62
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
  bc_dadd                 =  99, // 0x63
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  bc_isub                 = 100, // 0x64
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
  bc_lsub                 = 101, // 0x65
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
  bc_fsub                 = 102, // 0x66
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
  bc_dsub                 = 103, // 0x67
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
  bc_imul                 = 104, // 0x68
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
  bc_lmul                 = 105, // 0x69
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
  bc_fmul                 = 106, // 0x6a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
  bc_dmul                 = 107, // 0x6b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
  bc_idiv                 = 108, // 0x6c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
  bc_ldiv                 = 109, // 0x6d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
  bc_fdiv                 = 110, // 0x6e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
  bc_ddiv                 = 111, // 0x6f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
  bc_irem                 = 112, // 0x70
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
  bc_lrem                 = 113, // 0x71
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
  bc_frem                 = 114, // 0x72
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
  bc_drem                 = 115, // 0x73
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
  bc_ineg                 = 116, // 0x74
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
  bc_lneg                 = 117, // 0x75
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
  bc_fneg                 = 118, // 0x76
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
  bc_dneg                 = 119, // 0x77
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
  bc_ishl                 = 120, // 0x78
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
  bc_lshl                 = 121, // 0x79
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
  bc_ishr                 = 122, // 0x7a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
  bc_lshr                 = 123, // 0x7b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
  bc_iushr                = 124, // 0x7c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
  bc_lushr                = 125, // 0x7d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
  bc_iand                 = 126, // 0x7e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
  bc_land                 = 127, // 0x7f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
  bc_ior                  = 128, // 0x80
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
  bc_lor                  = 129, // 0x81
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
  bc_ixor                 = 130, // 0x82
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
  bc_lxor                 = 131, // 0x83
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
  bc_iinc                 = 132, // 0x84
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
  bc_i2l                  = 133, // 0x85
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
  bc_i2f                  = 134, // 0x86
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
  bc_i2d                  = 135, // 0x87
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
  bc_l2i                  = 136, // 0x88
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
  bc_l2f                  = 137, // 0x89
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
  bc_l2d                  = 138, // 0x8a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
  bc_f2i                  = 139, // 0x8b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
  bc_f2l                  = 140, // 0x8c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
  bc_f2d                  = 141, // 0x8d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
  bc_d2i                  = 142, // 0x8e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
  bc_d2l                  = 143, // 0x8f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
  bc_d2f                  = 144, // 0x90
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
  bc_i2b                  = 145, // 0x91
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
  bc_i2c                  = 146, // 0x92
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
  bc_i2s                  = 147, // 0x93
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
  bc_lcmp                 = 148, // 0x94
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
  bc_fcmpl                = 149, // 0x95
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
  bc_fcmpg                = 150, // 0x96
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
  bc_dcmpl                = 151, // 0x97
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
  bc_dcmpg                = 152, // 0x98
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
  bc_ifeq                 = 153, // 0x99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
  bc_ifne                 = 154, // 0x9a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
  bc_iflt                 = 155, // 0x9b
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
  bc_ifge                 = 156, // 0x9c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   430
  bc_ifgt                 = 157, // 0x9d
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
  bc_ifle                 = 158, // 0x9e
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
  bc_if_icmpeq            = 159, // 0x9f
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
  bc_if_icmpne            = 160, // 0xa0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
  bc_if_icmplt            = 161, // 0xa1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
  bc_if_icmpge            = 162, // 0xa2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
  bc_if_icmpgt            = 163, // 0xa3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
  bc_if_icmple            = 164, // 0xa4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
  bc_if_acmpeq            = 165, // 0xa5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
  bc_if_acmpne            = 166, // 0xa6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
  bc_goto                 = 167, // 0xa7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
  bc_jsr                  = 168, // 0xa8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
  bc_ret                  = 169, // 0xa9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
  bc_tableswitch          = 170, // 0xaa
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
  bc_lookupswitch         = 171, // 0xab
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
  bc_ireturn              = 172, // 0xac
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
  bc_lreturn              = 173, // 0xad
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
  bc_freturn              = 174, // 0xae
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
  bc_dreturn              = 175, // 0xaf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
  bc_areturn              = 176, // 0xb0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
  bc_return               = 177, // 0xb1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
  bc_getstatic            = 178, // 0xb2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
  bc_putstatic            = 179, // 0xb3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
  bc_getfield             = 180, // 0xb4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
  bc_putfield             = 181, // 0xb5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
  bc_invokevirtual        = 182, // 0xb6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
  bc_invokespecial        = 183, // 0xb7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
  bc_invokestatic         = 184, // 0xb8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
  bc_invokeinterface      = 185, // 0xb9
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   459
  bc_invokedynamic        = 186, // 0xba
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
  bc_new                  = 187, // 0xbb
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
  bc_newarray             = 188, // 0xbc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
  bc_anewarray            = 189, // 0xbd
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
  bc_arraylength          = 190, // 0xbe
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
  bc_athrow               = 191, // 0xbf
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
  bc_checkcast            = 192, // 0xc0
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
  bc_instanceof           = 193, // 0xc1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
  bc_monitorenter         = 194, // 0xc2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
  bc_monitorexit          = 195, // 0xc3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
  bc_wide                 = 196, // 0xc4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
  bc_multianewarray       = 197, // 0xc5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
  bc_ifnull               = 198, // 0xc6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
  bc_ifnonnull            = 199, // 0xc7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
  bc_goto_w               = 200, // 0xc8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
  bc_jsr_w                = 201, // 0xc9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
  bc_bytecode_limit       = 202  // 0xca
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
enum {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
  bc_end_marker = 255,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
  bc_byte_escape = 254,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
  bc_ref_escape = 253,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
  _first_linker_op = bc_getstatic,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
  _last_linker_op  = bc_invokestatic,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
  _num_linker_ops  = (_last_linker_op - _first_linker_op) + 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
  _self_linker_op  = bc_bytecode_limit,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
  _self_linker_aload_flag = 1*_num_linker_ops,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
  _self_linker_super_flag = 2*_num_linker_ops,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
  _self_linker_limit = _self_linker_op + 4*_num_linker_ops,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
  _invokeinit_op = _self_linker_limit,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
  _invokeinit_self_option = 0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
  _invokeinit_super_option = 1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
  _invokeinit_new_option = 2,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
  _invokeinit_limit = _invokeinit_op+3,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
  _xldc_op = _invokeinit_limit,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   498
  bc_sldc = bc_ldc,      // previously named bc_aldc
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
  bc_cldc = _xldc_op+0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
  bc_ildc = _xldc_op+1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
  bc_fldc = _xldc_op+2,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   502
  bc_sldc_w = bc_ldc_w,  // previously named bc_aldc_w
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
  bc_cldc_w = _xldc_op+3,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
  bc_ildc_w = _xldc_op+4,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
  bc_fldc_w = _xldc_op+5,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
  bc_lldc2_w = bc_ldc2_w,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
  bc_dldc2_w = _xldc_op+6,
12544
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   508
  // anything other primitive, string, or class must be handled with qldc:
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   509
  bc_qldc    = _xldc_op+7,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   510
  bc_qldc_w  = _xldc_op+8,
5768f2e096de 6981776: Pack200 must support -target 7 bytecodes
ksrini
parents: 5506
diff changeset
   511
  _xldc_limit = _xldc_op+9,
16050
1eee624cddb3 8007297: [pack200] allow opcodes with InterfaceMethodRefs
ksrini
parents: 15261
diff changeset
   512
  _invoke_int_op = _xldc_limit,
1eee624cddb3 8007297: [pack200] allow opcodes with InterfaceMethodRefs
ksrini
parents: 15261
diff changeset
   513
  _invokespecial_int = _invoke_int_op+0,
1eee624cddb3 8007297: [pack200] allow opcodes with InterfaceMethodRefs
ksrini
parents: 15261
diff changeset
   514
  _invokestatic_int = _invoke_int_op+1,
1eee624cddb3 8007297: [pack200] allow opcodes with InterfaceMethodRefs
ksrini
parents: 15261
diff changeset
   515
  _invoke_int_limit =  _invoke_int_op+2,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
  _xxx_3_end
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
};