operand.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 62 行
JAVA
62 行
/*
* $Id: Operand.java,v 1.7 2004/02/16 18:46:32 epr Exp $
*
* mailto:madhu@madhu.com
*/
package org.jnode.vm.compiler.ir;
/**
* @author Madhu Siddalingaiah
*
* An operand of an intermediate operation
* This could be a constant, local variable, or stack entry
*/
public abstract class Operand {
/**
* NOTE: these values *must* be less than 16!!
* @see #getAddressingMode() below
*/
public static final int UNKNOWN = 0;
public static final int BYTE = 1;
public static final int SHORT = 2;
public static final int CHAR = 3;
public static final int INT = 4;
public static final int LONG = 5;
public static final int FLOAT = 6;
public static final int DOUBLE = 7;
public static final int REFERENCE = 8;
/*
* Addressing mode bits
*/
public static final int MODE_CONSTANT = 0x01;
public static final int MODE_REGISTER = 0x02;
public static final int MODE_STACK = 0x03;
private int type; // One of the above
public Operand(int type) {
this.type = type;
}
public int getType() {
return type;
}
/**
* @param type
*/
public void setType(int type) {
this.type = type;
}
public abstract Operand simplify();
/**
* One of MODE_xxx constants defined above
*
* @return
*/
public abstract int getAddressingMode();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?