|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.oklab.compiler.syntaxtree.Node
org.oklab.compiler.syntaxtree.expression.Expression
org.oklab.compiler.syntaxtree.expression.ConstantInt
public class ConstantInt
int型の定数を表す.
| フィールドの概要 | |
|---|---|
private int |
constantValue
定数の値. |
private int |
index
コンテントプール格納先index. |
| クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド |
|---|
parent |
| コンストラクタの概要 | |
|---|---|
ConstantInt(Node parentNode,
int constantValue)
定数はすぐにコンテントプールに格納する. |
|
| メソッドの概要 | |
|---|---|
int |
emitCode(CodeBufferManager code,
int stackPointer)
バイトコードをバッファに出力する. |
| クラス org.oklab.compiler.syntaxtree.expression.Expression から継承されたメソッド |
|---|
parseXStatement |
| クラス org.oklab.compiler.syntaxtree.Node から継承されたメソッド |
|---|
getReturnType, localVariableCount, parseExpression, parseFactor, parseRefferenceOrCall, parseStatement, parseTerm, setParent |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
private int index
private int constantValue
| コンストラクタの詳細 |
|---|
public ConstantInt(Node parentNode,
int constantValue)
parentNode - 構文木の親ノード.constantValue - 定数値.| メソッドの詳細 |
|---|
public int emitCode(CodeBufferManager code,
int stackPointer)
throws CompileError
Expression 内の emitCodecode - バイトコードの出力先バッファ.stackPointer - スタックの最大値.
CompileError
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||