temp.java
来自「A compiler for a subset of the Java lang」· Java 代码 · 共 34 行
JAVA
34 行
package inter;import lexer.*; import symbols.*;public class Temp extends Expr { static int count = 0; int number = 0; public Temp(Type p) { super(Word.temp, p); number = ++count; lvaIdx = LocalVarArray.curlength; LocalVarArray.curlength += type.width; } public String toString() { String s = ""; if(type == Type.Int) { return "iload " + lvaIdx + "\n"; } else if(type == Type.Float) { return "fload " + lvaIdx + "\n"; } else if(type == Type.Complex) { return "fload " + lvaIdx + "\n" + "fload " + (lvaIdx + 4) + "\n"; } return null; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?