jaxp/src/com/sun/org/apache/bcel/internal/generic/InstructionConstants.java
author dfuchs
Fri, 17 May 2013 10:40:21 +0200
changeset 17538 d8d911c4e5d4
parent 12457 c348e06f0e82
permissions -rw-r--r--
8013900: More warnings compiling jaxp. Summary: Some internal implementation classes in Jaxp were redefining equals() without redefining hashCode(). This patch adds hashCode() methods that are consistent with equals(). Reviewed-by: chegar, joehw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
package com.sun.org.apache.bcel.internal.generic;
7f561c08de6b Initial load
duke
parents:
diff changeset
     6
7f561c08de6b Initial load
duke
parents:
diff changeset
     7
/* ====================================================================
7f561c08de6b Initial load
duke
parents:
diff changeset
     8
 * The Apache Software License, Version 1.1
7f561c08de6b Initial load
duke
parents:
diff changeset
     9
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    10
 * Copyright (c) 2001 The Apache Software Foundation.  All rights
7f561c08de6b Initial load
duke
parents:
diff changeset
    11
 * reserved.
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    13
 * Redistribution and use in source and binary forms, with or without
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 * modification, are permitted provided that the following conditions
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * are met:
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * 1. Redistributions of source code must retain the above copyright
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 *    notice, this list of conditions and the following disclaimer.
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 * 2. Redistributions in binary form must reproduce the above copyright
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
 *    notice, this list of conditions and the following disclaimer in
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
 *    the documentation and/or other materials provided with the
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
 *    distribution.
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
 * 3. The end-user documentation included with the redistribution,
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
 *    if any, must include the following acknowledgment:
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
 *       "This product includes software developed by the
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
 *        Apache Software Foundation (http://www.apache.org/)."
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
 *    Alternately, this acknowledgment may appear in the software itself,
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
 *    if and wherever such third-party acknowledgments normally appear.
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
 * 4. The names "Apache" and "Apache Software Foundation" and
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
 *    "Apache BCEL" must not be used to endorse or promote products
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
 *    derived from this software without prior written permission. For
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
 *    written permission, please contact apache@apache.org.
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * 5. Products derived from this software may not be called "Apache",
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 *    "Apache BCEL", nor may "Apache" appear in their name, without
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 *    prior written permission of the Apache Software Foundation.
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
 * SUCH DAMAGE.
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
 * ====================================================================
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
 * This software consists of voluntary contributions made by many
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
 * individuals on behalf of the Apache Software Foundation.  For more
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
 * information on the Apache Software Foundation, please see
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
 * <http://www.apache.org/>.
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
import com.sun.org.apache.bcel.internal.Constants;
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
 * This interface contains shareable instruction objects.
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
 * In order to save memory you can use some instructions multiply,
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
 * since they have an immutable state and are directly derived from
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
 * Instruction.  I.e. they have no instance fields that could be
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
 * changed. Since some of these instructions like ICONST_0 occur
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
 * very frequently this can save a lot of time and space. This
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
 * feature is an adaptation of the FlyWeight design pattern, we
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
 * just use an array instead of a factory.
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
 * The Instructions can also accessed directly under their names, so
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
 * it's possible to write il.append(Instruction.ICONST_0);
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
 * @author  <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
public interface InstructionConstants {
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
  /** Predefined instruction objects
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
  public static final Instruction           NOP          = new NOP();
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
  public static final Instruction           ACONST_NULL  = new ACONST_NULL();
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
  public static final Instruction           ICONST_M1    = new ICONST(-1);
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
  public static final Instruction           ICONST_0     = new ICONST(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
  public static final Instruction           ICONST_1     = new ICONST(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
  public static final Instruction           ICONST_2     = new ICONST(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
  public static final Instruction           ICONST_3     = new ICONST(3);
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
  public static final Instruction           ICONST_4     = new ICONST(4);
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
  public static final Instruction           ICONST_5     = new ICONST(5);
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
  public static final Instruction           LCONST_0     = new LCONST(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
  public static final Instruction           LCONST_1     = new LCONST(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
  public static final Instruction           FCONST_0     = new FCONST(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
  public static final Instruction           FCONST_1     = new FCONST(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
  public static final Instruction           FCONST_2     = new FCONST(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
  public static final Instruction           DCONST_0     = new DCONST(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
  public static final Instruction           DCONST_1     = new DCONST(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
  public static final ArrayInstruction      IALOAD       = new IALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
  public static final ArrayInstruction      LALOAD       = new LALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
  public static final ArrayInstruction      FALOAD       = new FALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
  public static final ArrayInstruction      DALOAD       = new DALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
  public static final ArrayInstruction      AALOAD       = new AALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
  public static final ArrayInstruction      BALOAD       = new BALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
  public static final ArrayInstruction      CALOAD       = new CALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
  public static final ArrayInstruction      SALOAD       = new SALOAD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
  public static final ArrayInstruction      IASTORE      = new IASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
  public static final ArrayInstruction      LASTORE      = new LASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
  public static final ArrayInstruction      FASTORE      = new FASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
  public static final ArrayInstruction      DASTORE      = new DASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
  public static final ArrayInstruction      AASTORE      = new AASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
  public static final ArrayInstruction      BASTORE      = new BASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
  public static final ArrayInstruction      CASTORE      = new CASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
  public static final ArrayInstruction      SASTORE      = new SASTORE();
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
  public static final StackInstruction      POP          = new POP();
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
  public static final StackInstruction      POP2         = new POP2();
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
  public static final StackInstruction      DUP          = new DUP();
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
  public static final StackInstruction      DUP_X1       = new DUP_X1();
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
  public static final StackInstruction      DUP_X2       = new DUP_X2();
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
  public static final StackInstruction      DUP2         = new DUP2();
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
  public static final StackInstruction      DUP2_X1      = new DUP2_X1();
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
  public static final StackInstruction      DUP2_X2      = new DUP2_X2();
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
  public static final StackInstruction      SWAP         = new SWAP();
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
  public static final ArithmeticInstruction IADD         = new IADD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
  public static final ArithmeticInstruction LADD         = new LADD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
  public static final ArithmeticInstruction FADD         = new FADD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
  public static final ArithmeticInstruction DADD         = new DADD();
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
  public static final ArithmeticInstruction ISUB         = new ISUB();
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
  public static final ArithmeticInstruction LSUB         = new LSUB();
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
  public static final ArithmeticInstruction FSUB         = new FSUB();
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
  public static final ArithmeticInstruction DSUB         = new DSUB();
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
  public static final ArithmeticInstruction IMUL         = new IMUL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
  public static final ArithmeticInstruction LMUL         = new LMUL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
  public static final ArithmeticInstruction FMUL         = new FMUL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
  public static final ArithmeticInstruction DMUL         = new DMUL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
  public static final ArithmeticInstruction IDIV         = new IDIV();
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
  public static final ArithmeticInstruction LDIV         = new LDIV();
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
  public static final ArithmeticInstruction FDIV         = new FDIV();
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
  public static final ArithmeticInstruction DDIV         = new DDIV();
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
  public static final ArithmeticInstruction IREM         = new IREM();
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
  public static final ArithmeticInstruction LREM         = new LREM();
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
  public static final ArithmeticInstruction FREM         = new FREM();
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
  public static final ArithmeticInstruction DREM         = new DREM();
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
  public static final ArithmeticInstruction INEG         = new INEG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
  public static final ArithmeticInstruction LNEG         = new LNEG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
  public static final ArithmeticInstruction FNEG         = new FNEG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
  public static final ArithmeticInstruction DNEG         = new DNEG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
  public static final ArithmeticInstruction ISHL         = new ISHL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
  public static final ArithmeticInstruction LSHL         = new LSHL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
  public static final ArithmeticInstruction ISHR         = new ISHR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
  public static final ArithmeticInstruction LSHR         = new LSHR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
  public static final ArithmeticInstruction IUSHR        = new IUSHR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
  public static final ArithmeticInstruction LUSHR        = new LUSHR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
  public static final ArithmeticInstruction IAND         = new IAND();
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
  public static final ArithmeticInstruction LAND         = new LAND();
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
  public static final ArithmeticInstruction IOR          = new IOR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
  public static final ArithmeticInstruction LOR          = new LOR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
  public static final ArithmeticInstruction IXOR         = new IXOR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
  public static final ArithmeticInstruction LXOR         = new LXOR();
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
  public static final ConversionInstruction I2L          = new I2L();
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
  public static final ConversionInstruction I2F          = new I2F();
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
  public static final ConversionInstruction I2D          = new I2D();
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
  public static final ConversionInstruction L2I          = new L2I();
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
  public static final ConversionInstruction L2F          = new L2F();
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
  public static final ConversionInstruction L2D          = new L2D();
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
  public static final ConversionInstruction F2I          = new F2I();
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
  public static final ConversionInstruction F2L          = new F2L();
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
  public static final ConversionInstruction F2D          = new F2D();
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
  public static final ConversionInstruction D2I          = new D2I();
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
  public static final ConversionInstruction D2L          = new D2L();
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
  public static final ConversionInstruction D2F          = new D2F();
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
  public static final ConversionInstruction I2B          = new I2B();
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
  public static final ConversionInstruction I2C          = new I2C();
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
  public static final ConversionInstruction I2S          = new I2S();
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
  public static final Instruction           LCMP         = new LCMP();
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
  public static final Instruction           FCMPL        = new FCMPL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
  public static final Instruction           FCMPG        = new FCMPG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
  public static final Instruction           DCMPL        = new DCMPL();
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
  public static final Instruction           DCMPG        = new DCMPG();
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
  public static final ReturnInstruction     IRETURN      = new IRETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
  public static final ReturnInstruction     LRETURN      = new LRETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
  public static final ReturnInstruction     FRETURN      = new FRETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
  public static final ReturnInstruction     DRETURN      = new DRETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
  public static final ReturnInstruction     ARETURN      = new ARETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
  public static final ReturnInstruction     RETURN       = new RETURN();
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
  public static final Instruction           ARRAYLENGTH  = new ARRAYLENGTH();
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
  public static final Instruction           ATHROW       = new ATHROW();
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
  public static final Instruction           MONITORENTER = new MONITORENTER();
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
  public static final Instruction           MONITOREXIT  = new MONITOREXIT();
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
  /** You can use these constants in multiple places safely, if you can guarantee
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
   * that you will never alter their internal values, e.g. call setIndex().
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
  public static final LocalVariableInstruction THIS    = new ALOAD(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
  public static final LocalVariableInstruction ALOAD_0 = THIS;
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
  public static final LocalVariableInstruction ALOAD_1 = new ALOAD(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
  public static final LocalVariableInstruction ALOAD_2 = new ALOAD(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
  public static final LocalVariableInstruction ILOAD_0 = new ILOAD(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
  public static final LocalVariableInstruction ILOAD_1 = new ILOAD(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
  public static final LocalVariableInstruction ILOAD_2 = new ILOAD(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
  public static final LocalVariableInstruction ASTORE_0 = new ASTORE(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
  public static final LocalVariableInstruction ASTORE_1 = new ASTORE(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
  public static final LocalVariableInstruction ASTORE_2 = new ASTORE(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
  public static final LocalVariableInstruction ISTORE_0 = new ISTORE(0);
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
  public static final LocalVariableInstruction ISTORE_1 = new ISTORE(1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
  public static final LocalVariableInstruction ISTORE_2 = new ISTORE(2);
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
  /** Get object via its opcode, for immutable instructions like
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
   * branch instructions entries are set to null.
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
  public static final Instruction[] INSTRUCTIONS = new Instruction[256];
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
  /** Interfaces may have no static initializers, so we simulate this
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
   * with an inner class.
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
   */
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
  static final Clinit bla = new Clinit();
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
  static class Clinit {
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
    Clinit() {
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
      INSTRUCTIONS[Constants.NOP] = NOP;
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
      INSTRUCTIONS[Constants.ACONST_NULL] = ACONST_NULL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
      INSTRUCTIONS[Constants.ICONST_M1] = ICONST_M1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
      INSTRUCTIONS[Constants.ICONST_0] = ICONST_0;
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
      INSTRUCTIONS[Constants.ICONST_1] = ICONST_1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
      INSTRUCTIONS[Constants.ICONST_2] = ICONST_2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
      INSTRUCTIONS[Constants.ICONST_3] = ICONST_3;
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
      INSTRUCTIONS[Constants.ICONST_4] = ICONST_4;
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
      INSTRUCTIONS[Constants.ICONST_5] = ICONST_5;
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
      INSTRUCTIONS[Constants.LCONST_0] = LCONST_0;
7f561c08de6b Initial load
duke
parents:
diff changeset
   230
      INSTRUCTIONS[Constants.LCONST_1] = LCONST_1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   231
      INSTRUCTIONS[Constants.FCONST_0] = FCONST_0;
7f561c08de6b Initial load
duke
parents:
diff changeset
   232
      INSTRUCTIONS[Constants.FCONST_1] = FCONST_1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   233
      INSTRUCTIONS[Constants.FCONST_2] = FCONST_2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   234
      INSTRUCTIONS[Constants.DCONST_0] = DCONST_0;
7f561c08de6b Initial load
duke
parents:
diff changeset
   235
      INSTRUCTIONS[Constants.DCONST_1] = DCONST_1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   236
      INSTRUCTIONS[Constants.IALOAD] = IALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   237
      INSTRUCTIONS[Constants.LALOAD] = LALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   238
      INSTRUCTIONS[Constants.FALOAD] = FALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   239
      INSTRUCTIONS[Constants.DALOAD] = DALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   240
      INSTRUCTIONS[Constants.AALOAD] = AALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   241
      INSTRUCTIONS[Constants.BALOAD] = BALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   242
      INSTRUCTIONS[Constants.CALOAD] = CALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   243
      INSTRUCTIONS[Constants.SALOAD] = SALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   244
      INSTRUCTIONS[Constants.IASTORE] = IASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   245
      INSTRUCTIONS[Constants.LASTORE] = LASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   246
      INSTRUCTIONS[Constants.FASTORE] = FASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   247
      INSTRUCTIONS[Constants.DASTORE] = DASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   248
      INSTRUCTIONS[Constants.AASTORE] = AASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   249
      INSTRUCTIONS[Constants.BASTORE] = BASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   250
      INSTRUCTIONS[Constants.CASTORE] = CASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   251
      INSTRUCTIONS[Constants.SASTORE] = SASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
   252
      INSTRUCTIONS[Constants.POP] = POP;
7f561c08de6b Initial load
duke
parents:
diff changeset
   253
      INSTRUCTIONS[Constants.POP2] = POP2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   254
      INSTRUCTIONS[Constants.DUP] = DUP;
7f561c08de6b Initial load
duke
parents:
diff changeset
   255
      INSTRUCTIONS[Constants.DUP_X1] = DUP_X1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   256
      INSTRUCTIONS[Constants.DUP_X2] = DUP_X2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   257
      INSTRUCTIONS[Constants.DUP2] = DUP2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   258
      INSTRUCTIONS[Constants.DUP2_X1] = DUP2_X1;
7f561c08de6b Initial load
duke
parents:
diff changeset
   259
      INSTRUCTIONS[Constants.DUP2_X2] = DUP2_X2;
7f561c08de6b Initial load
duke
parents:
diff changeset
   260
      INSTRUCTIONS[Constants.SWAP] = SWAP;
7f561c08de6b Initial load
duke
parents:
diff changeset
   261
      INSTRUCTIONS[Constants.IADD] = IADD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   262
      INSTRUCTIONS[Constants.LADD] = LADD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   263
      INSTRUCTIONS[Constants.FADD] = FADD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   264
      INSTRUCTIONS[Constants.DADD] = DADD;
7f561c08de6b Initial load
duke
parents:
diff changeset
   265
      INSTRUCTIONS[Constants.ISUB] = ISUB;
7f561c08de6b Initial load
duke
parents:
diff changeset
   266
      INSTRUCTIONS[Constants.LSUB] = LSUB;
7f561c08de6b Initial load
duke
parents:
diff changeset
   267
      INSTRUCTIONS[Constants.FSUB] = FSUB;
7f561c08de6b Initial load
duke
parents:
diff changeset
   268
      INSTRUCTIONS[Constants.DSUB] = DSUB;
7f561c08de6b Initial load
duke
parents:
diff changeset
   269
      INSTRUCTIONS[Constants.IMUL] = IMUL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   270
      INSTRUCTIONS[Constants.LMUL] = LMUL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   271
      INSTRUCTIONS[Constants.FMUL] = FMUL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   272
      INSTRUCTIONS[Constants.DMUL] = DMUL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   273
      INSTRUCTIONS[Constants.IDIV] = IDIV;
7f561c08de6b Initial load
duke
parents:
diff changeset
   274
      INSTRUCTIONS[Constants.LDIV] = LDIV;
7f561c08de6b Initial load
duke
parents:
diff changeset
   275
      INSTRUCTIONS[Constants.FDIV] = FDIV;
7f561c08de6b Initial load
duke
parents:
diff changeset
   276
      INSTRUCTIONS[Constants.DDIV] = DDIV;
7f561c08de6b Initial load
duke
parents:
diff changeset
   277
      INSTRUCTIONS[Constants.IREM] = IREM;
7f561c08de6b Initial load
duke
parents:
diff changeset
   278
      INSTRUCTIONS[Constants.LREM] = LREM;
7f561c08de6b Initial load
duke
parents:
diff changeset
   279
      INSTRUCTIONS[Constants.FREM] = FREM;
7f561c08de6b Initial load
duke
parents:
diff changeset
   280
      INSTRUCTIONS[Constants.DREM] = DREM;
7f561c08de6b Initial load
duke
parents:
diff changeset
   281
      INSTRUCTIONS[Constants.INEG] = INEG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   282
      INSTRUCTIONS[Constants.LNEG] = LNEG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   283
      INSTRUCTIONS[Constants.FNEG] = FNEG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   284
      INSTRUCTIONS[Constants.DNEG] = DNEG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   285
      INSTRUCTIONS[Constants.ISHL] = ISHL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   286
      INSTRUCTIONS[Constants.LSHL] = LSHL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   287
      INSTRUCTIONS[Constants.ISHR] = ISHR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   288
      INSTRUCTIONS[Constants.LSHR] = LSHR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   289
      INSTRUCTIONS[Constants.IUSHR] = IUSHR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   290
      INSTRUCTIONS[Constants.LUSHR] = LUSHR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   291
      INSTRUCTIONS[Constants.IAND] = IAND;
7f561c08de6b Initial load
duke
parents:
diff changeset
   292
      INSTRUCTIONS[Constants.LAND] = LAND;
7f561c08de6b Initial load
duke
parents:
diff changeset
   293
      INSTRUCTIONS[Constants.IOR] = IOR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   294
      INSTRUCTIONS[Constants.LOR] = LOR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   295
      INSTRUCTIONS[Constants.IXOR] = IXOR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   296
      INSTRUCTIONS[Constants.LXOR] = LXOR;
7f561c08de6b Initial load
duke
parents:
diff changeset
   297
      INSTRUCTIONS[Constants.I2L] = I2L;
7f561c08de6b Initial load
duke
parents:
diff changeset
   298
      INSTRUCTIONS[Constants.I2F] = I2F;
7f561c08de6b Initial load
duke
parents:
diff changeset
   299
      INSTRUCTIONS[Constants.I2D] = I2D;
7f561c08de6b Initial load
duke
parents:
diff changeset
   300
      INSTRUCTIONS[Constants.L2I] = L2I;
7f561c08de6b Initial load
duke
parents:
diff changeset
   301
      INSTRUCTIONS[Constants.L2F] = L2F;
7f561c08de6b Initial load
duke
parents:
diff changeset
   302
      INSTRUCTIONS[Constants.L2D] = L2D;
7f561c08de6b Initial load
duke
parents:
diff changeset
   303
      INSTRUCTIONS[Constants.F2I] = F2I;
7f561c08de6b Initial load
duke
parents:
diff changeset
   304
      INSTRUCTIONS[Constants.F2L] = F2L;
7f561c08de6b Initial load
duke
parents:
diff changeset
   305
      INSTRUCTIONS[Constants.F2D] = F2D;
7f561c08de6b Initial load
duke
parents:
diff changeset
   306
      INSTRUCTIONS[Constants.D2I] = D2I;
7f561c08de6b Initial load
duke
parents:
diff changeset
   307
      INSTRUCTIONS[Constants.D2L] = D2L;
7f561c08de6b Initial load
duke
parents:
diff changeset
   308
      INSTRUCTIONS[Constants.D2F] = D2F;
7f561c08de6b Initial load
duke
parents:
diff changeset
   309
      INSTRUCTIONS[Constants.I2B] = I2B;
7f561c08de6b Initial load
duke
parents:
diff changeset
   310
      INSTRUCTIONS[Constants.I2C] = I2C;
7f561c08de6b Initial load
duke
parents:
diff changeset
   311
      INSTRUCTIONS[Constants.I2S] = I2S;
7f561c08de6b Initial load
duke
parents:
diff changeset
   312
      INSTRUCTIONS[Constants.LCMP] = LCMP;
7f561c08de6b Initial load
duke
parents:
diff changeset
   313
      INSTRUCTIONS[Constants.FCMPL] = FCMPL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   314
      INSTRUCTIONS[Constants.FCMPG] = FCMPG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   315
      INSTRUCTIONS[Constants.DCMPL] = DCMPL;
7f561c08de6b Initial load
duke
parents:
diff changeset
   316
      INSTRUCTIONS[Constants.DCMPG] = DCMPG;
7f561c08de6b Initial load
duke
parents:
diff changeset
   317
      INSTRUCTIONS[Constants.IRETURN] = IRETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   318
      INSTRUCTIONS[Constants.LRETURN] = LRETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   319
      INSTRUCTIONS[Constants.FRETURN] = FRETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   320
      INSTRUCTIONS[Constants.DRETURN] = DRETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   321
      INSTRUCTIONS[Constants.ARETURN] = ARETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   322
      INSTRUCTIONS[Constants.RETURN] = RETURN;
7f561c08de6b Initial load
duke
parents:
diff changeset
   323
      INSTRUCTIONS[Constants.ARRAYLENGTH] = ARRAYLENGTH;
7f561c08de6b Initial load
duke
parents:
diff changeset
   324
      INSTRUCTIONS[Constants.ATHROW] = ATHROW;
7f561c08de6b Initial load
duke
parents:
diff changeset
   325
      INSTRUCTIONS[Constants.MONITORENTER] = MONITORENTER;
7f561c08de6b Initial load
duke
parents:
diff changeset
   326
      INSTRUCTIONS[Constants.MONITOREXIT] = MONITOREXIT;
7f561c08de6b Initial load
duke
parents:
diff changeset
   327
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   328
  }
7f561c08de6b Initial load
duke
parents:
diff changeset
   329
}