src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/StringType.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.ALOAD;
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
import com.sun.org.apache.bcel.internal.generic.ASTORE;
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import com.sun.org.apache.bcel.internal.generic.BranchHandle;
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.IFNONNULL;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
import com.sun.org.apache.bcel.internal.generic.Instruction;
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
import com.sun.org.apache.bcel.internal.generic.InstructionList;
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
import com.sun.org.apache.bcel.internal.generic.PUSH;
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
import com.sun.org.apache.xalan.internal.xsltc.compiler.FlowList;
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * @author Jacek Ambroziak
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * @author Santiago Pericas-Geertsen
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
public class StringType extends Type {
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
    protected StringType() {}
7f561c08de6b Initial load
duke
parents:
diff changeset
    45
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
    public String toString() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
        return "string";
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
    public boolean identicalTo(Type other) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
        return this == other;
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
    public String toSignature() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
        return "Ljava/lang/String;";
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
    public boolean isSimple() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
        return true;
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
    public com.sun.org.apache.bcel.internal.generic.Type toJCType() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
        return com.sun.org.apache.bcel.internal.generic.Type.STRING;
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
     * Translates a string into an object of internal type <code>type</code>.
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
     * The translation to int is undefined since strings are always converted
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
     * to reals in arithmetic expressions.
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
                            Type type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
        if (type == Type.Boolean) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
            translateTo(classGen, methodGen, (BooleanType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
        else if (type == Type.Real) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
            translateTo(classGen, methodGen, (RealType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
        else if (type == Type.Reference) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
            translateTo(classGen, methodGen, (ReferenceType) type);
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
        else if (type == Type.ObjectString) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
            // NOP -> same representation
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
        else {
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
            ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
                                        toString(), type.toString());
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
            classGen.getParser().reportError(Constants.FATAL, err);
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
     * Translates a string into a synthesized boolean.
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
                            BooleanType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
        FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
        il.append(ICONST_1);
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
        final BranchHandle truec = il.append(new GOTO(null));
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
        falsel.backPatch(il.append(ICONST_0));
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
        truec.setTarget(il.append(NOP));
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
     * Translates a string into a real by calling stringToReal() from the
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
     * basis library.
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
                            RealType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
        il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
                                                    STRING_TO_REAL,
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
                                                    STRING_TO_REAL_SIG)));
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
     * Translates a string into a non-synthesized boolean. It does not push a
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
     * 0 or a 1 but instead returns branchhandle list to be appended to the
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
     * false list.
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateToDesynthesized
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
    public FlowList translateToDesynthesized(ClassGenerator classGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
                                             MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
                                             BooleanType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
        il.append(new INVOKEVIRTUAL(cpg.addMethodref(STRING_CLASS,
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
                                                     "length", "()I")));
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
        return new FlowList(il.append(new IFEQ(null)));
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
     * Expects a string on the stack and pushes a boxed string.
7f561c08de6b Initial load
duke
parents:
diff changeset
   144
     * Strings are already boxed so the translation is just a NOP.
7f561c08de6b Initial load
duke
parents:
diff changeset
   145
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   146
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
7f561c08de6b Initial load
duke
parents:
diff changeset
   147
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   148
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   149
                            ReferenceType type) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   150
        methodGen.getInstructionList().append(NOP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   151
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   152
7f561c08de6b Initial load
duke
parents:
diff changeset
   153
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   154
     * Translates a internal string into an external (Java) string.
7f561c08de6b Initial load
duke
parents:
diff changeset
   155
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   156
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateFrom
7f561c08de6b Initial load
duke
parents:
diff changeset
   157
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   158
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
47359
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
   159
                            Class<?> clazz)
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   160
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   161
        // Is String <: clazz? I.e. clazz in { String, Object }
7f561c08de6b Initial load
duke
parents:
diff changeset
   162
        if (clazz.isAssignableFrom(java.lang.String.class)) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   163
            methodGen.getInstructionList().append(NOP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   164
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   165
        else {
7f561c08de6b Initial load
duke
parents:
diff changeset
   166
            ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
7f561c08de6b Initial load
duke
parents:
diff changeset
   167
                                        toString(), clazz.getName());
7f561c08de6b Initial load
duke
parents:
diff changeset
   168
            classGen.getParser().reportError(Constants.FATAL, err);
7f561c08de6b Initial load
duke
parents:
diff changeset
   169
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   170
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   171
7f561c08de6b Initial load
duke
parents:
diff changeset
   172
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   173
     * Translates an external (primitive) Java type into a string.
7f561c08de6b Initial load
duke
parents:
diff changeset
   174
     *
7f561c08de6b Initial load
duke
parents:
diff changeset
   175
     * @see     com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateFrom
7f561c08de6b Initial load
duke
parents:
diff changeset
   176
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   177
    public void translateFrom(ClassGenerator classGen,
47359
e1a6c0168741 8181150: Fix lint warnings in JAXP repo: rawtypes and unchecked
joehw
parents: 47216
diff changeset
   178
        MethodGenerator methodGen, Class<?> clazz)
6
7f561c08de6b Initial load
duke
parents:
diff changeset
   179
    {
7f561c08de6b Initial load
duke
parents:
diff changeset
   180
        final ConstantPoolGen cpg = classGen.getConstantPool();
7f561c08de6b Initial load
duke
parents:
diff changeset
   181
        final InstructionList il = methodGen.getInstructionList();
7f561c08de6b Initial load
duke
parents:
diff changeset
   182
7f561c08de6b Initial load
duke
parents:
diff changeset
   183
        if (clazz.getName().equals("java.lang.String")) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   184
            // same internal representation, convert null to ""
7f561c08de6b Initial load
duke
parents:
diff changeset
   185
            il.append(DUP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   186
            final BranchHandle ifNonNull = il.append(new IFNONNULL(null));
7f561c08de6b Initial load
duke
parents:
diff changeset
   187
            il.append(POP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   188
            il.append(new PUSH(cpg, ""));
7f561c08de6b Initial load
duke
parents:
diff changeset
   189
            ifNonNull.setTarget(il.append(NOP));
7f561c08de6b Initial load
duke
parents:
diff changeset
   190
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   191
        else {
7f561c08de6b Initial load
duke
parents:
diff changeset
   192
            ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
7f561c08de6b Initial load
duke
parents:
diff changeset
   193
                                        toString(), clazz.getName());
7f561c08de6b Initial load
duke
parents:
diff changeset
   194
            classGen.getParser().reportError(Constants.FATAL, err);
7f561c08de6b Initial load
duke
parents:
diff changeset
   195
        }
7f561c08de6b Initial load
duke
parents:
diff changeset
   196
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   197
7f561c08de6b Initial load
duke
parents:
diff changeset
   198
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   199
     * Translates an object of this type to its boxed representation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   200
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   201
    public void translateBox(ClassGenerator classGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   202
                             MethodGenerator methodGen) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   203
        translateTo(classGen, methodGen, Type.Reference);
7f561c08de6b Initial load
duke
parents:
diff changeset
   204
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   205
7f561c08de6b Initial load
duke
parents:
diff changeset
   206
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   207
     * Translates an object of this type to its unboxed representation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   208
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   209
    public void translateUnBox(ClassGenerator classGen,
7f561c08de6b Initial load
duke
parents:
diff changeset
   210
                               MethodGenerator methodGen) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   211
        methodGen.getInstructionList().append(NOP);
7f561c08de6b Initial load
duke
parents:
diff changeset
   212
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   213
7f561c08de6b Initial load
duke
parents:
diff changeset
   214
    /**
7f561c08de6b Initial load
duke
parents:
diff changeset
   215
     * Returns the class name of an internal type's external representation.
7f561c08de6b Initial load
duke
parents:
diff changeset
   216
     */
7f561c08de6b Initial load
duke
parents:
diff changeset
   217
    public String getClassName() {
7f561c08de6b Initial load
duke
parents:
diff changeset
   218
        return(STRING_CLASS);
7f561c08de6b Initial load
duke
parents:
diff changeset
   219
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   220
7f561c08de6b Initial load
duke
parents:
diff changeset
   221
7f561c08de6b Initial load
duke
parents:
diff changeset
   222
    public Instruction LOAD(int slot) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   223
        return new ALOAD(slot);
7f561c08de6b Initial load
duke
parents:
diff changeset
   224
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   225
7f561c08de6b Initial load
duke
parents:
diff changeset
   226
    public Instruction STORE(int slot) {
7f561c08de6b Initial load
duke
parents:
diff changeset
   227
        return new ASTORE(slot);
7f561c08de6b Initial load
duke
parents:
diff changeset
   228
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   229
}