|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.oklab.compiler.syntaxtree.Node
org.oklab.compiler.syntaxtree.expression.Expression
org.oklab.compiler.syntaxtree.expression.Variable
org.oklab.compiler.syntaxtree.expression.VariableOfLocal
public class VariableOfLocal
ローカル変数を表現するクラス. ローカル変数やグローバル変数が共通して持つ情報は親クラスのVariableで定義してある.
| フィールドの概要 | |
|---|---|
private int |
storedIndex
ローカル変数が保存されている場所のインデックス. |
| クラス org.oklab.compiler.syntaxtree.expression.Variable から継承されたフィールド |
|---|
type |
| クラス org.oklab.compiler.syntaxtree.Node から継承されたフィールド |
|---|
parent |
| コンストラクタの概要 | |
|---|---|
VariableOfLocal(Node parent,
int type,
int storedIndex)
ローカル変数を保持する領域の生成. |
|
| メソッドの概要 | |
|---|---|
Variable |
createReference(Node parent)
|
protected void |
emitCode(CodeBufferManager code,
boolean isLoad)
フィールドからの読み込みか、書き込みのバイトコードを出力. |
| クラス org.oklab.compiler.syntaxtree.expression.Variable から継承されたメソッド |
|---|
emitCode, emitCode, 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 storedIndex
| コンストラクタの詳細 |
|---|
public VariableOfLocal(Node parent,
int type,
int storedIndex)
parent - 親ノード.type - 型(Tokenクラス参照).storedIndex - 保存先のindex.| メソッドの詳細 |
|---|
public Variable createReference(Node parent)
Variable 内の createReference
protected void emitCode(CodeBufferManager code,
boolean isLoad)
throws CompileError
Variable 内の emitCodecode - 書き込み先バッファisLoad - trueの場合、フィールドの読み込み,falseの場合フィールドの書き込み
バイトコードを出力する.
CompileError
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||