jdk/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java
author martin
Tue, 15 Sep 2015 21:56:04 -0700
changeset 32649 2ee9017c7597
parent 27195 b33768211561
child 36635 f0147be2f50f
permissions -rw-r--r--
8136583: Core libraries should use blessed modifier order Summary: Run blessed-modifier-order script (see bug) Reviewed-by: psandoz, chegar, alanb, plevart
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     1
/*
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     3
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
     9
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    14
 * accompanied this code).
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    15
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    19
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    22
 * questions.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    23
 */
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    24
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    25
/*
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    26
 * This file is available under and governed by the GNU General Public
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    27
 * License version 2 only, as published by the Free Software Foundation.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    28
 * However, the following notice accompanied the original version of this
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    29
 * file:
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    30
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    31
 * ASM: a very small and fast Java bytecode manipulation framework
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    32
 * Copyright (c) 2000-2011 INRIA, France Telecom
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    33
 * All rights reserved.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    34
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    35
 * Redistribution and use in source and binary forms, with or without
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    36
 * modification, are permitted provided that the following conditions
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    37
 * are met:
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    38
 * 1. Redistributions of source code must retain the above copyright
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    39
 *    notice, this list of conditions and the following disclaimer.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    40
 * 2. Redistributions in binary form must reproduce the above copyright
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    41
 *    notice, this list of conditions and the following disclaimer in the
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    42
 *    documentation and/or other materials provided with the distribution.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    43
 * 3. Neither the name of the copyright holders nor the names of its
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    44
 *    contributors may be used to endorse or promote products derived from
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    45
 *    this software without specific prior written permission.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    46
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    47
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    48
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    49
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    50
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    51
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    52
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    53
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    54
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    55
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    56
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    57
 * THE POSSIBILITY OF SUCH DAMAGE.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    58
 */
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    59
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    60
package jdk.internal.org.objectweb.asm.commons;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    61
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    62
import jdk.internal.org.objectweb.asm.Handle;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    63
import jdk.internal.org.objectweb.asm.Label;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    64
import jdk.internal.org.objectweb.asm.MethodVisitor;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    65
import jdk.internal.org.objectweb.asm.Opcodes;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    66
import jdk.internal.org.objectweb.asm.Type;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    67
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    68
/**
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    69
 * A {@link MethodVisitor} providing a more detailed API to generate and
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    70
 * transform instructions.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    71
 *
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    72
 * @author Eric Bruneton
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    73
 */
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    74
public class InstructionAdapter extends MethodVisitor {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    75
32649
2ee9017c7597 8136583: Core libraries should use blessed modifier order
martin
parents: 27195
diff changeset
    76
    public static final Type OBJECT_TYPE = Type.getType("Ljava/lang/Object;");
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    77
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    78
    /**
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    79
     * Creates a new {@link InstructionAdapter}. <i>Subclasses must not use this
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    80
     * constructor</i>. Instead, they must use the
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    81
     * {@link #InstructionAdapter(int, MethodVisitor)} version.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    82
     *
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
    83
     * @param mv
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
    84
     *            the method visitor to which this adapter delegates calls.
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
    85
     * @throws IllegalStateException
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
    86
     *             If a subclass calls this constructor.
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    87
     */
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    88
    public InstructionAdapter(final MethodVisitor mv) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
    89
        this(Opcodes.ASM5, mv);
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
    90
        if (getClass() != InstructionAdapter.class) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
    91
            throw new IllegalStateException();
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
    92
        }
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    93
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    94
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    95
    /**
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    96
     * Creates a new {@link InstructionAdapter}.
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
    97
     *
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
    98
     * @param api
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
    99
     *            the ASM API version implemented by this visitor. Must be one
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   100
     *            of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   101
     * @param mv
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   102
     *            the method visitor to which this adapter delegates calls.
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   103
     */
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   104
    protected InstructionAdapter(final int api, final MethodVisitor mv) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   105
        super(api, mv);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   106
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   107
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   108
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   109
    public void visitInsn(final int opcode) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   110
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   111
        case Opcodes.NOP:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   112
            nop();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   113
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   114
        case Opcodes.ACONST_NULL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   115
            aconst(null);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   116
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   117
        case Opcodes.ICONST_M1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   118
        case Opcodes.ICONST_0:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   119
        case Opcodes.ICONST_1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   120
        case Opcodes.ICONST_2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   121
        case Opcodes.ICONST_3:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   122
        case Opcodes.ICONST_4:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   123
        case Opcodes.ICONST_5:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   124
            iconst(opcode - Opcodes.ICONST_0);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   125
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   126
        case Opcodes.LCONST_0:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   127
        case Opcodes.LCONST_1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   128
            lconst(opcode - Opcodes.LCONST_0);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   129
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   130
        case Opcodes.FCONST_0:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   131
        case Opcodes.FCONST_1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   132
        case Opcodes.FCONST_2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   133
            fconst(opcode - Opcodes.FCONST_0);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   134
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   135
        case Opcodes.DCONST_0:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   136
        case Opcodes.DCONST_1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   137
            dconst(opcode - Opcodes.DCONST_0);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   138
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   139
        case Opcodes.IALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   140
            aload(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   141
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   142
        case Opcodes.LALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   143
            aload(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   144
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   145
        case Opcodes.FALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   146
            aload(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   147
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   148
        case Opcodes.DALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   149
            aload(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   150
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   151
        case Opcodes.AALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   152
            aload(OBJECT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   153
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   154
        case Opcodes.BALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   155
            aload(Type.BYTE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   156
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   157
        case Opcodes.CALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   158
            aload(Type.CHAR_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   159
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   160
        case Opcodes.SALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   161
            aload(Type.SHORT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   162
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   163
        case Opcodes.IASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   164
            astore(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   165
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   166
        case Opcodes.LASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   167
            astore(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   168
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   169
        case Opcodes.FASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   170
            astore(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   171
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   172
        case Opcodes.DASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   173
            astore(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   174
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   175
        case Opcodes.AASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   176
            astore(OBJECT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   177
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   178
        case Opcodes.BASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   179
            astore(Type.BYTE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   180
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   181
        case Opcodes.CASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   182
            astore(Type.CHAR_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   183
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   184
        case Opcodes.SASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   185
            astore(Type.SHORT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   186
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   187
        case Opcodes.POP:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   188
            pop();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   189
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   190
        case Opcodes.POP2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   191
            pop2();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   192
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   193
        case Opcodes.DUP:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   194
            dup();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   195
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   196
        case Opcodes.DUP_X1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   197
            dupX1();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   198
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   199
        case Opcodes.DUP_X2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   200
            dupX2();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   201
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   202
        case Opcodes.DUP2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   203
            dup2();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   204
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   205
        case Opcodes.DUP2_X1:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   206
            dup2X1();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   207
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   208
        case Opcodes.DUP2_X2:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   209
            dup2X2();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   210
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   211
        case Opcodes.SWAP:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   212
            swap();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   213
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   214
        case Opcodes.IADD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   215
            add(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   216
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   217
        case Opcodes.LADD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   218
            add(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   219
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   220
        case Opcodes.FADD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   221
            add(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   222
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   223
        case Opcodes.DADD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   224
            add(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   225
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   226
        case Opcodes.ISUB:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   227
            sub(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   228
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   229
        case Opcodes.LSUB:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   230
            sub(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   231
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   232
        case Opcodes.FSUB:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   233
            sub(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   234
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   235
        case Opcodes.DSUB:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   236
            sub(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   237
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   238
        case Opcodes.IMUL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   239
            mul(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   240
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   241
        case Opcodes.LMUL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   242
            mul(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   243
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   244
        case Opcodes.FMUL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   245
            mul(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   246
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   247
        case Opcodes.DMUL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   248
            mul(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   249
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   250
        case Opcodes.IDIV:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   251
            div(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   252
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   253
        case Opcodes.LDIV:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   254
            div(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   255
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   256
        case Opcodes.FDIV:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   257
            div(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   258
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   259
        case Opcodes.DDIV:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   260
            div(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   261
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   262
        case Opcodes.IREM:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   263
            rem(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   264
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   265
        case Opcodes.LREM:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   266
            rem(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   267
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   268
        case Opcodes.FREM:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   269
            rem(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   270
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   271
        case Opcodes.DREM:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   272
            rem(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   273
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   274
        case Opcodes.INEG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   275
            neg(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   276
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   277
        case Opcodes.LNEG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   278
            neg(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   279
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   280
        case Opcodes.FNEG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   281
            neg(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   282
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   283
        case Opcodes.DNEG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   284
            neg(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   285
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   286
        case Opcodes.ISHL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   287
            shl(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   288
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   289
        case Opcodes.LSHL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   290
            shl(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   291
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   292
        case Opcodes.ISHR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   293
            shr(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   294
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   295
        case Opcodes.LSHR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   296
            shr(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   297
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   298
        case Opcodes.IUSHR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   299
            ushr(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   300
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   301
        case Opcodes.LUSHR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   302
            ushr(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   303
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   304
        case Opcodes.IAND:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   305
            and(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   306
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   307
        case Opcodes.LAND:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   308
            and(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   309
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   310
        case Opcodes.IOR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   311
            or(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   312
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   313
        case Opcodes.LOR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   314
            or(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   315
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   316
        case Opcodes.IXOR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   317
            xor(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   318
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   319
        case Opcodes.LXOR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   320
            xor(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   321
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   322
        case Opcodes.I2L:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   323
            cast(Type.INT_TYPE, Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   324
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   325
        case Opcodes.I2F:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   326
            cast(Type.INT_TYPE, Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   327
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   328
        case Opcodes.I2D:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   329
            cast(Type.INT_TYPE, Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   330
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   331
        case Opcodes.L2I:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   332
            cast(Type.LONG_TYPE, Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   333
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   334
        case Opcodes.L2F:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   335
            cast(Type.LONG_TYPE, Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   336
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   337
        case Opcodes.L2D:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   338
            cast(Type.LONG_TYPE, Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   339
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   340
        case Opcodes.F2I:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   341
            cast(Type.FLOAT_TYPE, Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   342
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   343
        case Opcodes.F2L:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   344
            cast(Type.FLOAT_TYPE, Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   345
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   346
        case Opcodes.F2D:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   347
            cast(Type.FLOAT_TYPE, Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   348
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   349
        case Opcodes.D2I:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   350
            cast(Type.DOUBLE_TYPE, Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   351
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   352
        case Opcodes.D2L:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   353
            cast(Type.DOUBLE_TYPE, Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   354
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   355
        case Opcodes.D2F:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   356
            cast(Type.DOUBLE_TYPE, Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   357
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   358
        case Opcodes.I2B:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   359
            cast(Type.INT_TYPE, Type.BYTE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   360
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   361
        case Opcodes.I2C:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   362
            cast(Type.INT_TYPE, Type.CHAR_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   363
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   364
        case Opcodes.I2S:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   365
            cast(Type.INT_TYPE, Type.SHORT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   366
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   367
        case Opcodes.LCMP:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   368
            lcmp();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   369
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   370
        case Opcodes.FCMPL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   371
            cmpl(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   372
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   373
        case Opcodes.FCMPG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   374
            cmpg(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   375
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   376
        case Opcodes.DCMPL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   377
            cmpl(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   378
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   379
        case Opcodes.DCMPG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   380
            cmpg(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   381
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   382
        case Opcodes.IRETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   383
            areturn(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   384
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   385
        case Opcodes.LRETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   386
            areturn(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   387
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   388
        case Opcodes.FRETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   389
            areturn(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   390
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   391
        case Opcodes.DRETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   392
            areturn(Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   393
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   394
        case Opcodes.ARETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   395
            areturn(OBJECT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   396
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   397
        case Opcodes.RETURN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   398
            areturn(Type.VOID_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   399
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   400
        case Opcodes.ARRAYLENGTH:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   401
            arraylength();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   402
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   403
        case Opcodes.ATHROW:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   404
            athrow();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   405
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   406
        case Opcodes.MONITORENTER:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   407
            monitorenter();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   408
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   409
        case Opcodes.MONITOREXIT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   410
            monitorexit();
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   411
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   412
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   413
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   414
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   415
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   416
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   417
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   418
    public void visitIntInsn(final int opcode, final int operand) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   419
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   420
        case Opcodes.BIPUSH:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   421
            iconst(operand);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   422
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   423
        case Opcodes.SIPUSH:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   424
            iconst(operand);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   425
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   426
        case Opcodes.NEWARRAY:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   427
            switch (operand) {
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   428
            case Opcodes.T_BOOLEAN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   429
                newarray(Type.BOOLEAN_TYPE);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   430
                break;
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   431
            case Opcodes.T_CHAR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   432
                newarray(Type.CHAR_TYPE);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   433
                break;
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   434
            case Opcodes.T_BYTE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   435
                newarray(Type.BYTE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   436
                break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   437
            case Opcodes.T_SHORT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   438
                newarray(Type.SHORT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   439
                break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   440
            case Opcodes.T_INT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   441
                newarray(Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   442
                break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   443
            case Opcodes.T_FLOAT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   444
                newarray(Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   445
                break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   446
            case Opcodes.T_LONG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   447
                newarray(Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   448
                break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   449
            case Opcodes.T_DOUBLE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   450
                newarray(Type.DOUBLE_TYPE);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   451
                break;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   452
            default:
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   453
                throw new IllegalArgumentException();
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   454
            }
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   455
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   456
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   457
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   458
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   459
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   460
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   461
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   462
    public void visitVarInsn(final int opcode, final int var) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   463
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   464
        case Opcodes.ILOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   465
            load(var, Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   466
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   467
        case Opcodes.LLOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   468
            load(var, Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   469
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   470
        case Opcodes.FLOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   471
            load(var, Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   472
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   473
        case Opcodes.DLOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   474
            load(var, Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   475
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   476
        case Opcodes.ALOAD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   477
            load(var, OBJECT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   478
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   479
        case Opcodes.ISTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   480
            store(var, Type.INT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   481
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   482
        case Opcodes.LSTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   483
            store(var, Type.LONG_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   484
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   485
        case Opcodes.FSTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   486
            store(var, Type.FLOAT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   487
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   488
        case Opcodes.DSTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   489
            store(var, Type.DOUBLE_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   490
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   491
        case Opcodes.ASTORE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   492
            store(var, OBJECT_TYPE);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   493
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   494
        case Opcodes.RET:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   495
            ret(var);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   496
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   497
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   498
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   499
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   500
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   501
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   502
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   503
    public void visitTypeInsn(final int opcode, final String type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   504
        Type t = Type.getObjectType(type);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   505
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   506
        case Opcodes.NEW:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   507
            anew(t);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   508
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   509
        case Opcodes.ANEWARRAY:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   510
            newarray(t);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   511
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   512
        case Opcodes.CHECKCAST:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   513
            checkcast(t);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   514
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   515
        case Opcodes.INSTANCEOF:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   516
            instanceOf(t);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   517
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   518
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   519
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   520
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   521
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   522
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   523
    @Override
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   524
    public void visitFieldInsn(final int opcode, final String owner,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   525
            final String name, final String desc) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   526
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   527
        case Opcodes.GETSTATIC:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   528
            getstatic(owner, name, desc);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   529
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   530
        case Opcodes.PUTSTATIC:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   531
            putstatic(owner, name, desc);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   532
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   533
        case Opcodes.GETFIELD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   534
            getfield(owner, name, desc);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   535
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   536
        case Opcodes.PUTFIELD:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   537
            putfield(owner, name, desc);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   538
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   539
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   540
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   541
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   542
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   543
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   544
    @Deprecated
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   545
    @Override
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   546
    public void visitMethodInsn(final int opcode, final String owner,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   547
            final String name, final String desc) {
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   548
        if (api >= Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   549
            super.visitMethodInsn(opcode, owner, name, desc);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   550
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   551
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   552
        doVisitMethodInsn(opcode, owner, name, desc,
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   553
                opcode == Opcodes.INVOKEINTERFACE);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   554
    }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   555
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   556
    @Override
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   557
    public void visitMethodInsn(final int opcode, final String owner,
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   558
            final String name, final String desc, final boolean itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   559
        if (api < Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   560
            super.visitMethodInsn(opcode, owner, name, desc, itf);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   561
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   562
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   563
        doVisitMethodInsn(opcode, owner, name, desc, itf);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   564
    }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   565
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   566
    private void doVisitMethodInsn(int opcode, final String owner,
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   567
            final String name, final String desc, final boolean itf) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   568
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   569
        case Opcodes.INVOKESPECIAL:
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   570
            invokespecial(owner, name, desc, itf);
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   571
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   572
        case Opcodes.INVOKEVIRTUAL:
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   573
            invokevirtual(owner, name, desc, itf);
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   574
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   575
        case Opcodes.INVOKESTATIC:
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
   576
            invokestatic(owner, name, desc, itf);
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   577
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   578
        case Opcodes.INVOKEINTERFACE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   579
            invokeinterface(owner, name, desc);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   580
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   581
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   582
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   583
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   584
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   585
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   586
    @Override
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   587
    public void visitInvokeDynamicInsn(String name, String desc, Handle bsm,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   588
            Object... bsmArgs) {
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   589
        invokedynamic(name, desc, bsm, bsmArgs);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   590
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   591
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   592
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   593
    public void visitJumpInsn(final int opcode, final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   594
        switch (opcode) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   595
        case Opcodes.IFEQ:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   596
            ifeq(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   597
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   598
        case Opcodes.IFNE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   599
            ifne(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   600
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   601
        case Opcodes.IFLT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   602
            iflt(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   603
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   604
        case Opcodes.IFGE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   605
            ifge(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   606
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   607
        case Opcodes.IFGT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   608
            ifgt(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   609
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   610
        case Opcodes.IFLE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   611
            ifle(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   612
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   613
        case Opcodes.IF_ICMPEQ:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   614
            ificmpeq(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   615
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   616
        case Opcodes.IF_ICMPNE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   617
            ificmpne(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   618
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   619
        case Opcodes.IF_ICMPLT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   620
            ificmplt(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   621
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   622
        case Opcodes.IF_ICMPGE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   623
            ificmpge(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   624
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   625
        case Opcodes.IF_ICMPGT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   626
            ificmpgt(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   627
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   628
        case Opcodes.IF_ICMPLE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   629
            ificmple(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   630
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   631
        case Opcodes.IF_ACMPEQ:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   632
            ifacmpeq(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   633
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   634
        case Opcodes.IF_ACMPNE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   635
            ifacmpne(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   636
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   637
        case Opcodes.GOTO:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   638
            goTo(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   639
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   640
        case Opcodes.JSR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   641
            jsr(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   642
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   643
        case Opcodes.IFNULL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   644
            ifnull(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   645
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   646
        case Opcodes.IFNONNULL:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   647
            ifnonnull(label);
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   648
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   649
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   650
            throw new IllegalArgumentException();
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   651
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   652
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   653
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   654
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   655
    public void visitLabel(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   656
        mark(label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   657
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   658
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   659
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   660
    public void visitLdcInsn(final Object cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   661
        if (cst instanceof Integer) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   662
            int val = ((Integer) cst).intValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   663
            iconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   664
        } else if (cst instanceof Byte) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   665
            int val = ((Byte) cst).intValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   666
            iconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   667
        } else if (cst instanceof Character) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   668
            int val = ((Character) cst).charValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   669
            iconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   670
        } else if (cst instanceof Short) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   671
            int val = ((Short) cst).intValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   672
            iconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   673
        } else if (cst instanceof Boolean) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   674
            int val = ((Boolean) cst).booleanValue() ? 1 : 0;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   675
            iconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   676
        } else if (cst instanceof Float) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   677
            float val = ((Float) cst).floatValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   678
            fconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   679
        } else if (cst instanceof Long) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   680
            long val = ((Long) cst).longValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   681
            lconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   682
        } else if (cst instanceof Double) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   683
            double val = ((Double) cst).doubleValue();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   684
            dconst(val);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   685
        } else if (cst instanceof String) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   686
            aconst(cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   687
        } else if (cst instanceof Type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   688
            tconst((Type) cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   689
        } else if (cst instanceof Handle) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   690
            hconst((Handle) cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   691
        } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   692
            throw new IllegalArgumentException();
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   693
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   694
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   695
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   696
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   697
    public void visitIincInsn(final int var, final int increment) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   698
        iinc(var, increment);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   699
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   700
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   701
    @Override
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   702
    public void visitTableSwitchInsn(final int min, final int max,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   703
            final Label dflt, final Label... labels) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   704
        tableswitch(min, max, dflt, labels);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   705
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   706
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   707
    @Override
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   708
    public void visitLookupSwitchInsn(final Label dflt, final int[] keys,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
   709
            final Label[] labels) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   710
        lookupswitch(dflt, keys, labels);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   711
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   712
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   713
    @Override
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   714
    public void visitMultiANewArrayInsn(final String desc, final int dims) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   715
        multianewarray(desc, dims);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   716
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   717
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   718
    // -----------------------------------------------------------------------
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   719
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   720
    public void nop() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   721
        mv.visitInsn(Opcodes.NOP);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   722
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   723
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   724
    public void aconst(final Object cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   725
        if (cst == null) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   726
            mv.visitInsn(Opcodes.ACONST_NULL);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   727
        } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   728
            mv.visitLdcInsn(cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   729
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   730
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   731
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   732
    public void iconst(final int cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   733
        if (cst >= -1 && cst <= 5) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   734
            mv.visitInsn(Opcodes.ICONST_0 + cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   735
        } else if (cst >= Byte.MIN_VALUE && cst <= Byte.MAX_VALUE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   736
            mv.visitIntInsn(Opcodes.BIPUSH, cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   737
        } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   738
            mv.visitIntInsn(Opcodes.SIPUSH, cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   739
        } else {
27195
b33768211561 8061830: [asm] refresh internal ASM version v5.0.3
ksrini
parents: 25859
diff changeset
   740
            mv.visitLdcInsn(cst);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   741
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   742
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   743
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   744
    public void lconst(final long cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   745
        if (cst == 0L || cst == 1L) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   746
            mv.visitInsn(Opcodes.LCONST_0 + (int) cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   747
        } else {
27195
b33768211561 8061830: [asm] refresh internal ASM version v5.0.3
ksrini
parents: 25859
diff changeset
   748
            mv.visitLdcInsn(cst);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   749
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   750
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   751
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   752
    public void fconst(final float cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   753
        int bits = Float.floatToIntBits(cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   754
        if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   755
            mv.visitInsn(Opcodes.FCONST_0 + (int) cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   756
        } else {
27195
b33768211561 8061830: [asm] refresh internal ASM version v5.0.3
ksrini
parents: 25859
diff changeset
   757
            mv.visitLdcInsn(cst);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   758
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   759
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   760
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   761
    public void dconst(final double cst) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   762
        long bits = Double.doubleToLongBits(cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   763
        if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   764
            mv.visitInsn(Opcodes.DCONST_0 + (int) cst);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   765
        } else {
27195
b33768211561 8061830: [asm] refresh internal ASM version v5.0.3
ksrini
parents: 25859
diff changeset
   766
            mv.visitLdcInsn(cst);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   767
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   768
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   769
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   770
    public void tconst(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   771
        mv.visitLdcInsn(type);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   772
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   773
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   774
    public void hconst(final Handle handle) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   775
        mv.visitLdcInsn(handle);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   776
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   777
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   778
    public void load(final int var, final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   779
        mv.visitVarInsn(type.getOpcode(Opcodes.ILOAD), var);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   780
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   781
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   782
    public void aload(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   783
        mv.visitInsn(type.getOpcode(Opcodes.IALOAD));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   784
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   785
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   786
    public void store(final int var, final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   787
        mv.visitVarInsn(type.getOpcode(Opcodes.ISTORE), var);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   788
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   789
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   790
    public void astore(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   791
        mv.visitInsn(type.getOpcode(Opcodes.IASTORE));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   792
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   793
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   794
    public void pop() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   795
        mv.visitInsn(Opcodes.POP);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   796
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   797
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   798
    public void pop2() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   799
        mv.visitInsn(Opcodes.POP2);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   800
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   801
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   802
    public void dup() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   803
        mv.visitInsn(Opcodes.DUP);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   804
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   805
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   806
    public void dup2() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   807
        mv.visitInsn(Opcodes.DUP2);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   808
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   809
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   810
    public void dupX1() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   811
        mv.visitInsn(Opcodes.DUP_X1);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   812
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   813
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   814
    public void dupX2() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   815
        mv.visitInsn(Opcodes.DUP_X2);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   816
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   817
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   818
    public void dup2X1() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   819
        mv.visitInsn(Opcodes.DUP2_X1);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   820
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   821
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   822
    public void dup2X2() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   823
        mv.visitInsn(Opcodes.DUP2_X2);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   824
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   825
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   826
    public void swap() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   827
        mv.visitInsn(Opcodes.SWAP);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   828
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   829
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   830
    public void add(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   831
        mv.visitInsn(type.getOpcode(Opcodes.IADD));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   832
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   833
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   834
    public void sub(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   835
        mv.visitInsn(type.getOpcode(Opcodes.ISUB));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   836
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   837
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   838
    public void mul(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   839
        mv.visitInsn(type.getOpcode(Opcodes.IMUL));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   840
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   841
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   842
    public void div(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   843
        mv.visitInsn(type.getOpcode(Opcodes.IDIV));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   844
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   845
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   846
    public void rem(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   847
        mv.visitInsn(type.getOpcode(Opcodes.IREM));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   848
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   849
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   850
    public void neg(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   851
        mv.visitInsn(type.getOpcode(Opcodes.INEG));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   852
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   853
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   854
    public void shl(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   855
        mv.visitInsn(type.getOpcode(Opcodes.ISHL));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   856
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   857
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   858
    public void shr(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   859
        mv.visitInsn(type.getOpcode(Opcodes.ISHR));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   860
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   861
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   862
    public void ushr(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   863
        mv.visitInsn(type.getOpcode(Opcodes.IUSHR));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   864
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   865
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   866
    public void and(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   867
        mv.visitInsn(type.getOpcode(Opcodes.IAND));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   868
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   869
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   870
    public void or(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   871
        mv.visitInsn(type.getOpcode(Opcodes.IOR));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   872
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   873
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   874
    public void xor(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   875
        mv.visitInsn(type.getOpcode(Opcodes.IXOR));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   876
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   877
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   878
    public void iinc(final int var, final int increment) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   879
        mv.visitIincInsn(var, increment);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   880
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   881
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   882
    public void cast(final Type from, final Type to) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   883
        if (from != to) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   884
            if (from == Type.DOUBLE_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   885
                if (to == Type.FLOAT_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   886
                    mv.visitInsn(Opcodes.D2F);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   887
                } else if (to == Type.LONG_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   888
                    mv.visitInsn(Opcodes.D2L);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   889
                } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   890
                    mv.visitInsn(Opcodes.D2I);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   891
                    cast(Type.INT_TYPE, to);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   892
                }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   893
            } else if (from == Type.FLOAT_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   894
                if (to == Type.DOUBLE_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   895
                    mv.visitInsn(Opcodes.F2D);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   896
                } else if (to == Type.LONG_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   897
                    mv.visitInsn(Opcodes.F2L);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   898
                } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   899
                    mv.visitInsn(Opcodes.F2I);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   900
                    cast(Type.INT_TYPE, to);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   901
                }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   902
            } else if (from == Type.LONG_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   903
                if (to == Type.DOUBLE_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   904
                    mv.visitInsn(Opcodes.L2D);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   905
                } else if (to == Type.FLOAT_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   906
                    mv.visitInsn(Opcodes.L2F);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   907
                } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   908
                    mv.visitInsn(Opcodes.L2I);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   909
                    cast(Type.INT_TYPE, to);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   910
                }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   911
            } else {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   912
                if (to == Type.BYTE_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   913
                    mv.visitInsn(Opcodes.I2B);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   914
                } else if (to == Type.CHAR_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   915
                    mv.visitInsn(Opcodes.I2C);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   916
                } else if (to == Type.DOUBLE_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   917
                    mv.visitInsn(Opcodes.I2D);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   918
                } else if (to == Type.FLOAT_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   919
                    mv.visitInsn(Opcodes.I2F);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   920
                } else if (to == Type.LONG_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   921
                    mv.visitInsn(Opcodes.I2L);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   922
                } else if (to == Type.SHORT_TYPE) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   923
                    mv.visitInsn(Opcodes.I2S);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   924
                }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   925
            }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   926
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   927
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   928
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   929
    public void lcmp() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   930
        mv.visitInsn(Opcodes.LCMP);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   931
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   932
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   933
    public void cmpl(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   934
        mv.visitInsn(type == Type.FLOAT_TYPE ? Opcodes.FCMPL : Opcodes.DCMPL);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   935
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   936
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   937
    public void cmpg(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   938
        mv.visitInsn(type == Type.FLOAT_TYPE ? Opcodes.FCMPG : Opcodes.DCMPG);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   939
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   940
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   941
    public void ifeq(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   942
        mv.visitJumpInsn(Opcodes.IFEQ, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   943
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   944
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   945
    public void ifne(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   946
        mv.visitJumpInsn(Opcodes.IFNE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   947
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   948
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   949
    public void iflt(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   950
        mv.visitJumpInsn(Opcodes.IFLT, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   951
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   952
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   953
    public void ifge(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   954
        mv.visitJumpInsn(Opcodes.IFGE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   955
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   956
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   957
    public void ifgt(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   958
        mv.visitJumpInsn(Opcodes.IFGT, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   959
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   960
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   961
    public void ifle(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   962
        mv.visitJumpInsn(Opcodes.IFLE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   963
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   964
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   965
    public void ificmpeq(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   966
        mv.visitJumpInsn(Opcodes.IF_ICMPEQ, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   967
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   968
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   969
    public void ificmpne(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   970
        mv.visitJumpInsn(Opcodes.IF_ICMPNE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   971
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   972
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   973
    public void ificmplt(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   974
        mv.visitJumpInsn(Opcodes.IF_ICMPLT, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   975
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   976
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   977
    public void ificmpge(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   978
        mv.visitJumpInsn(Opcodes.IF_ICMPGE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   979
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   980
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   981
    public void ificmpgt(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   982
        mv.visitJumpInsn(Opcodes.IF_ICMPGT, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   983
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   984
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   985
    public void ificmple(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   986
        mv.visitJumpInsn(Opcodes.IF_ICMPLE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   987
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   988
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   989
    public void ifacmpeq(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   990
        mv.visitJumpInsn(Opcodes.IF_ACMPEQ, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   991
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   992
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   993
    public void ifacmpne(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   994
        mv.visitJumpInsn(Opcodes.IF_ACMPNE, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   995
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   996
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   997
    public void goTo(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   998
        mv.visitJumpInsn(Opcodes.GOTO, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
   999
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1000
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1001
    public void jsr(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1002
        mv.visitJumpInsn(Opcodes.JSR, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1003
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1004
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1005
    public void ret(final int var) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1006
        mv.visitVarInsn(Opcodes.RET, var);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1007
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1008
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1009
    public void tableswitch(final int min, final int max, final Label dflt,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1010
            final Label... labels) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1011
        mv.visitTableSwitchInsn(min, max, dflt, labels);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1012
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1013
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1014
    public void lookupswitch(final Label dflt, final int[] keys,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1015
            final Label[] labels) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1016
        mv.visitLookupSwitchInsn(dflt, keys, labels);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1017
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1018
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1019
    public void areturn(final Type t) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1020
        mv.visitInsn(t.getOpcode(Opcodes.IRETURN));
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1021
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1022
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1023
    public void getstatic(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1024
            final String desc) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1025
        mv.visitFieldInsn(Opcodes.GETSTATIC, owner, name, desc);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1026
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1027
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1028
    public void putstatic(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1029
            final String desc) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1030
        mv.visitFieldInsn(Opcodes.PUTSTATIC, owner, name, desc);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1031
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1032
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1033
    public void getfield(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1034
            final String desc) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1035
        mv.visitFieldInsn(Opcodes.GETFIELD, owner, name, desc);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1036
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1037
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1038
    public void putfield(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1039
            final String desc) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1040
        mv.visitFieldInsn(Opcodes.PUTFIELD, owner, name, desc);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1041
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1042
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1043
    @Deprecated
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1044
    public void invokevirtual(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1045
            final String desc) {
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1046
        if (api >= Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1047
            invokevirtual(owner, name, desc, false);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1048
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1049
        }
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1050
        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, desc);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1051
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1052
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1053
    public void invokevirtual(final String owner, final String name,
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1054
            final String desc, final boolean itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1055
        if (api < Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1056
            if (itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1057
                throw new IllegalArgumentException(
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1058
                        "INVOKEVIRTUAL on interfaces require ASM 5");
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1059
            }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1060
            invokevirtual(owner, name, desc);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1061
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1062
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1063
        mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, owner, name, desc, itf);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1064
    }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1065
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1066
    @Deprecated
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1067
    public void invokespecial(final String owner, final String name,
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1068
            final String desc) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1069
        if (api >= Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1070
            invokespecial(owner, name, desc, false);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1071
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1072
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1073
        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, owner, name, desc, false);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1074
    }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1075
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1076
    public void invokespecial(final String owner, final String name,
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1077
            final String desc, final boolean itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1078
        if (api < Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1079
            if (itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1080
                throw new IllegalArgumentException(
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1081
                        "INVOKESPECIAL on interfaces require ASM 5");
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1082
            }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1083
            invokespecial(owner, name, desc);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1084
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1085
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1086
        mv.visitMethodInsn(Opcodes.INVOKESPECIAL, owner, name, desc, itf);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1087
    }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1088
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1089
    @Deprecated
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1090
    public void invokestatic(final String owner, final String name,
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1091
            final String desc) {
24687
a5dfe74199ca 8044046: [asm] refresh internal ASM version to v5.0.3
ksrini
parents: 21617
diff changeset
  1092
        if (api >= Opcodes.ASM5) {
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1093
            invokestatic(owner, name, desc, false);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1094
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1095
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1096
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc, false);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1097
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1098
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1099
    public void invokestatic(final String owner, final String name,
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1100
            final String desc, final boolean itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1101
        if (api < Opcodes.ASM5) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1102
            if (itf) {
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1103
                throw new IllegalArgumentException(
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1104
                        "INVOKESTATIC on interfaces require ASM 5");
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1105
            }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1106
            invokestatic(owner, name, desc);
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1107
            return;
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1108
        }
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1109
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, owner, name, desc, itf);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1110
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1111
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1112
    public void invokeinterface(final String owner, final String name,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1113
            final String desc) {
21617
53b88e4ac6ed 8027227: [asm] generate CONSTANT_InterfaceMethodref for invoke{special/static) of non-abstract methods on ifaces
ksrini
parents: 17420
diff changeset
  1114
        mv.visitMethodInsn(Opcodes.INVOKEINTERFACE, owner, name, desc, true);
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1115
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1116
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1117
    public void invokedynamic(String name, String desc, Handle bsm,
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1118
            Object[] bsmArgs) {
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1119
        mv.visitInvokeDynamicInsn(name, desc, bsm, bsmArgs);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1120
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1121
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1122
    public void anew(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1123
        mv.visitTypeInsn(Opcodes.NEW, type.getInternalName());
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1124
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1125
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1126
    public void newarray(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1127
        int typ;
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1128
        switch (type.getSort()) {
17420
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1129
        case Type.BOOLEAN:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1130
            typ = Opcodes.T_BOOLEAN;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1131
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1132
        case Type.CHAR:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1133
            typ = Opcodes.T_CHAR;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1134
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1135
        case Type.BYTE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1136
            typ = Opcodes.T_BYTE;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1137
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1138
        case Type.SHORT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1139
            typ = Opcodes.T_SHORT;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1140
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1141
        case Type.INT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1142
            typ = Opcodes.T_INT;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1143
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1144
        case Type.FLOAT:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1145
            typ = Opcodes.T_FLOAT;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1146
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1147
        case Type.LONG:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1148
            typ = Opcodes.T_LONG;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1149
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1150
        case Type.DOUBLE:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1151
            typ = Opcodes.T_DOUBLE;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1152
            break;
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1153
        default:
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1154
            mv.visitTypeInsn(Opcodes.ANEWARRAY, type.getInternalName());
6163a8236046 8013225: Refresh jdk's private ASM to the latest.
ksrini
parents: 14198
diff changeset
  1155
            return;
14198
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1156
        }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1157
        mv.visitIntInsn(Opcodes.NEWARRAY, typ);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1158
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1159
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1160
    public void arraylength() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1161
        mv.visitInsn(Opcodes.ARRAYLENGTH);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1162
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1163
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1164
    public void athrow() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1165
        mv.visitInsn(Opcodes.ATHROW);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1166
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1167
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1168
    public void checkcast(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1169
        mv.visitTypeInsn(Opcodes.CHECKCAST, type.getInternalName());
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1170
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1171
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1172
    public void instanceOf(final Type type) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1173
        mv.visitTypeInsn(Opcodes.INSTANCEOF, type.getInternalName());
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1174
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1175
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1176
    public void monitorenter() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1177
        mv.visitInsn(Opcodes.MONITORENTER);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1178
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1179
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1180
    public void monitorexit() {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1181
        mv.visitInsn(Opcodes.MONITOREXIT);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1182
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1183
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1184
    public void multianewarray(final String desc, final int dims) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1185
        mv.visitMultiANewArrayInsn(desc, dims);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1186
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1187
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1188
    public void ifnull(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1189
        mv.visitJumpInsn(Opcodes.IFNULL, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1190
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1191
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1192
    public void ifnonnull(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1193
        mv.visitJumpInsn(Opcodes.IFNONNULL, label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1194
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1195
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1196
    public void mark(final Label label) {
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1197
        mv.visitLabel(label);
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1198
    }
071fd6fd257d 7197401: Add a subset of the org.objectweb.asm packages to jdk8
jjh
parents:
diff changeset
  1199
}