src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/BooleanType.java
author joehw
Wed, 18 Oct 2017 13:25:49 -0700
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 48409 5ab69533994b
permissions -rw-r--r--
8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked Reviewed-by: lancea, rriggs, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
47359
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
     2
 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
     3
 * @LastModified: Oct 2017
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
/*
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     6
 * Licensed to the Apache Software Foundation (ASF) under one or more
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     7
 * contributor license agreements.  See the NOTICE file distributed with
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     8
 * this work for additional information regarding copyright ownership.
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     9
 * The ASF licenses this file to You under the Apache License, Version 2.0
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    10
 * (the "License"); you may not use this file except in compliance with
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    11
 * the License.  You may obtain a copy of the License at
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    13
 *      http://www.apache.org/licenses/LICENSE-2.0
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    15
 * Unless required by applicable law or agreed to in writing, software
7f561c08de6b Initial load
duke
parents:
diff changeset
    16
 * distributed under the License is distributed on an "AS IS" BASIS,
7f561c08de6b Initial load
duke
parents:
diff changeset
    17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7f561c08de6b Initial load
duke
parents:
diff changeset
    18
 * See the License for the specific language governing permissions and
7f561c08de6b Initial load
duke
parents:
diff changeset
    19
 * limitations under the License.
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    21
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
import com.sun.org.apache.bcel.internal.generic.BranchHandle;
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
import com.sun.org.apache.bcel.internal.generic.BranchInstruction;
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import com.sun.org.apache.bcel.internal.generic.CHECKCAST;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
import com.sun.org.apache.bcel.internal.generic.GOTO;
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
import com.sun.org.apache.bcel.internal.generic.IFEQ;
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
import com.sun.org.apache.bcel.internal.generic.IFGE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import com.sun.org.apache.bcel.internal.generic.IFGT;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import com.sun.org.apache.bcel.internal.generic.IFLE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
import com.sun.org.apache.bcel.internal.generic.IFLT;
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
import com.sun.org.apache.bcel.internal.generic.IF_ICMPGE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
import com.sun.org.apache.bcel.internal.generic.IF_ICMPGT;
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
import com.sun.org.apache.bcel.internal.generic.IF_ICMPLE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
import com.sun.org.apache.bcel.internal.generic.IF_ICMPLT;
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
import com.sun.org.apache.bcel.internal.generic.ILOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
import com.sun.org.apache.bcel.internal.generic.ISTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
import com.sun.org.apache.bcel.internal.generic.Instruction;
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
import com.sun.org.apache.bcel.internal.generic.InstructionList;
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
import com.sun.org.apache.bcel.internal.generic.NEW;
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
import com.sun.org.apache.bcel.internal.generic.PUSH;
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
 * @author Jacek Ambroziak
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
 * @author Santiago Pericas-Geertsen
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
public final class BooleanType extends Type {
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
    protected BooleanType() {}
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
    public String toString() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
        return "boolean";
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
    public boolean identicalTo(Type other) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
        return this == other;
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
    public String toSignature() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
        return "Z";
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
    public boolean isSimple() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
        return true;
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
    public com.sun.org.apache.bcel.internal.generic.Type toJCType() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
        return com.sun.org.apache.bcel.internal.generic.Type.BOOLEAN;
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
     * Translates a real into an object of internal type <code>type</code>. The
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
     * translation to int is undefined since booleans are always converted to
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
     * reals in arithmetic expressions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
                            Type type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
        if (type == Type.String) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
            translateTo(classGen, methodGen, (StringType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
        else if (type == Type.Real) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
            translateTo(classGen, methodGen, (RealType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
        else if (type == Type.Reference) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
            translateTo(classGen, methodGen, (ReferenceType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
        else {
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
            ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
                                        toString(), type.toString());
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
            classGen.getParser().reportError(Constants.FATAL, err);
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
     * Expects a boolean on the stack and pushes a string. If the value on the
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
     * stack is zero, then the string 'false' is pushed. Otherwise, the string
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
     * 'true' is pushed.
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
                            StringType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
        final BranchHandle falsec = il.append(new IFEQ(null));
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
        il.append(new PUSH(cpg, "true"));
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
        final BranchHandle truec = il.append(new GOTO(null));
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
        falsec.setTarget(il.append(new PUSH(cpg, "false")));
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
        truec.setTarget(il.append(NOP));
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
     * Expects a boolean on the stack and pushes a real. The value "true" is
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
     * converted to 1.0 and the value "false" to 0.0.
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
                            RealType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
        methodGen.getInstructionList().append(I2D);
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
     * Expects a boolean on the stack and pushes a boxed boolean.
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
     * Boxed booleans are represented by an instance of
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
     * <code>java.lang.Boolean</code>.
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
                            ReferenceType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
        il.append(new NEW(cpg.addClass(BOOLEAN_CLASS)));
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
        il.append(DUP_X1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
        il.append(SWAP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
        il.append(new INVOKESPECIAL(cpg.addMethodref(BOOLEAN_CLASS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
                                                     "<init>",
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
                                                     "(Z)V")));
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
     * Translates an internal boolean into an external (Java) boolean.
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
47359
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
   152
                            Class<?> clazz) {
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
        if (clazz == java.lang.Boolean.TYPE) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
            methodGen.getInstructionList().append(NOP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
        // Is Boolean <: clazz? I.e. clazz in { Boolean, Object }
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
        else if (clazz.isAssignableFrom(java.lang.Boolean.class)) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
            translateTo(classGen, methodGen, Type.Reference);
7f561c08de6b Initial load
duke
parents:
diff changeset
   159
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
        else {
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
            ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
                                        toString(), clazz.getName());
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
            classGen.getParser().reportError(Constants.FATAL, err);
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
     * Translates an external (Java) boolean into internal boolean.
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
    public void translateFrom(ClassGenerator classGen, MethodGenerator methodGen,
47359
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
   171
                              Class<?> clazz) {
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
        translateTo(classGen, methodGen, clazz);
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
     * Translates an object of this type to its boxed representation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   178
    public void translateBox(ClassGenerator classGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
                             MethodGenerator methodGen) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
        translateTo(classGen, methodGen, Type.Reference);
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
     * Translates an object of this type to its unboxed representation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
    public void translateUnBox(ClassGenerator classGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
                               MethodGenerator methodGen) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
        il.append(new CHECKCAST(cpg.addClass(BOOLEAN_CLASS)));
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
        il.append(new INVOKEVIRTUAL(cpg.addMethodref(BOOLEAN_CLASS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
                                                     BOOLEAN_VALUE,
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
                                                     BOOLEAN_VALUE_SIG)));
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
    public Instruction LOAD(int slot) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
        return new ILOAD(slot);
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
    public Instruction STORE(int slot) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
        return new ISTORE(slot);
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
    public BranchInstruction GT(boolean tozero) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
        return tozero ? (BranchInstruction) new IFGT(null) :
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
            (BranchInstruction) new IF_ICMPGT(null);
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
    public BranchInstruction GE(boolean tozero) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
        return tozero ? (BranchInstruction) new IFGE(null) :
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
            (BranchInstruction) new IF_ICMPGE(null);
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
    public BranchInstruction LT(boolean tozero) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
        return tozero ? (BranchInstruction) new IFLT(null) :
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
            (BranchInstruction) new IF_ICMPLT(null);
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
    public BranchInstruction LE(boolean tozero) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
        return tozero ? (BranchInstruction) new IFLE(null) :
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
            (BranchInstruction) new IF_ICMPLE(null);
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
}