org.oklab.compiler.generatecode
クラス Mnemonics
java.lang.Object
org.oklab.compiler.generatecode.Mnemonics
public class Mnemonics
- extends java.lang.Object
JAVA仮想マシン(JVM=Java Virtual Machine)のニーモニックを管理する.
JAVA仮想マシンは、それ独自のマシン語を持っている.一般的にアセンブラなどと呼ばれるものは、
プログラミング言語のメソッド集のように命令セット(インストラクションセット)を持っている.
この命令セットは、通常以下のような構造を持つ.Java言語で言うとメソッド名、引数のような構造を
もつ.
マシン語
命令コード 引数1 引数2 ...
アセンブラの用語だと以下のようになる.
オペレーション
ニーモニック オペランド1 オペランド2 ...
- 導入されたバージョン:
- 1.0
- バージョン:
- 1.0
- 作成者:
- Satoshi Okita satoshiokita@gmail.com
- 関連項目:
- VM Spec 2nd - Instructions,
VM Spec 2nd - Mnemonics,
Wikipedia Java bytecode,
Java Virtual Machine - Online Instruction Reference Manual
| クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nop
public static short nop
aconst_null
public static short aconst_null
iconst_m1
public static short iconst_m1
iconst_0
public static short iconst_0
iconst_1
public static short iconst_1
iconst_2
public static short iconst_2
iconst_3
public static short iconst_3
iconst_4
public static short iconst_4
iconst_5
public static short iconst_5
lconst_0
public static short lconst_0
lconst_1
public static short lconst_1
fconst_0
public static short fconst_0
fconst_1
public static short fconst_1
fconst_2
public static short fconst_2
dconst_0
public static short dconst_0
dconst_1
public static short dconst_1
bipush
public static short bipush
sipush
public static short sipush
ldc
public static short ldc
ldc_w
public static short ldc_w
ldc2_w
public static short ldc2_w
iload
public static short iload
lload
public static short lload
fload
public static short fload
dload
public static short dload
aload
public static short aload
iload_0
public static short iload_0
iload_1
public static short iload_1
iload_2
public static short iload_2
iload_3
public static short iload_3
lload_0
public static short lload_0
lload_1
public static short lload_1
lload_2
public static short lload_2
lload_3
public static short lload_3
fload_0
public static short fload_0
fload_1
public static short fload_1
fload_2
public static short fload_2
fload_3
public static short fload_3
dload_0
public static short dload_0
dload_1
public static short dload_1
dload_2
public static short dload_2
dload_3
public static short dload_3
aload_0
public static short aload_0
aload_1
public static short aload_1
aload_2
public static short aload_2
aload_3
public static short aload_3
iaload
public static short iaload
laload
public static short laload
faload
public static short faload
daload
public static short daload
aaload
public static short aaload
baload
public static short baload
caload
public static short caload
saload
public static short saload
istore
public static short istore
lstore
public static short lstore
fstore
public static short fstore
dstore
public static short dstore
astore
public static short astore
istore_0
public static short istore_0
istore_1
public static short istore_1
istore_2
public static short istore_2
istore_3
public static short istore_3
lstore_0
public static short lstore_0
lstore_1
public static short lstore_1
lstore_2
public static short lstore_2
lstore_3
public static short lstore_3
fstore_0
public static short fstore_0
fstore_1
public static short fstore_1
fstore_2
public static short fstore_2
fstore_3
public static short fstore_3
dstore_0
public static short dstore_0
dstore_1
public static short dstore_1
dstore_2
public static short dstore_2
dstore_3
public static short dstore_3
astore_0
public static short astore_0
astore_1
public static short astore_1
astore_2
public static short astore_2
astore_3
public static short astore_3
iastore
public static short iastore
lastore
public static short lastore
fastore
public static short fastore
dastore
public static short dastore
aastore
public static short aastore
bastore
public static short bastore
castore
public static short castore
sastore
public static short sastore
pop
public static short pop
pop2
public static short pop2
dup
public static short dup
dup_x1
public static short dup_x1
dup_x2
public static short dup_x2
dup2
public static short dup2
dup2_x1
public static short dup2_x1
dup2_x2
public static short dup2_x2
swap
public static short swap
iadd
public static short iadd
ladd
public static short ladd
fadd
public static short fadd
dadd
public static short dadd
isub
public static short isub
lsub
public static short lsub
fsub
public static short fsub
dsub
public static short dsub
imul
public static short imul
lmul
public static short lmul
fmul
public static short fmul
dmul
public static short dmul
idiv
public static short idiv
ldiv
public static short ldiv
fdiv
public static short fdiv
ddiv
public static short ddiv
irem
public static short irem
lrem
public static short lrem
frem
public static short frem
drem
public static short drem
ineg
public static short ineg
lneg
public static short lneg
fneg
public static short fneg
dneg
public static short dneg
ishl
public static short ishl
lshl
public static short lshl
ishr
public static short ishr
lshr
public static short lshr
iushr
public static short iushr
lushr
public static short lushr
iand
public static short iand
land
public static short land
ior
public static short ior
lor
public static short lor
ixor
public static short ixor
lxor
public static short lxor
iinc
public static short iinc
i2l
public static short i2l
i2f
public static short i2f
i2d
public static short i2d
l2i
public static short l2i
l2f
public static short l2f
l2d
public static short l2d
f2i
public static short f2i
f2l
public static short f2l
f2d
public static short f2d
d2i
public static short d2i
d2l
public static short d2l
d2f
public static short d2f
i2b
public static short i2b
i2c
public static short i2c
i2s
public static short i2s
lcmp
public static short lcmp
fcmpl
public static short fcmpl
fcmpg
public static short fcmpg
dcmpl
public static short dcmpl
dcmpg
public static short dcmpg
ifeq
public static short ifeq
ifne
public static short ifne
iflt
public static short iflt
ifge
public static short ifge
ifgt
public static short ifgt
ifle
public static short ifle
if_icmpeq
public static short if_icmpeq
if_icmpne
public static short if_icmpne
if_icmplt
public static short if_icmplt
if_icmpge
public static short if_icmpge
if_icmpgt
public static short if_icmpgt
if_icmple
public static short if_icmple
if_acmpeq
public static short if_acmpeq
if_acmpne
public static short if_acmpne
goto_
public static short goto_
jsr
public static short jsr
ret
public static short ret
tableswitch
public static short tableswitch
lookupswitch
public static short lookupswitch
ireturn
public static short ireturn
lreturn
public static short lreturn
freturn
public static short freturn
dreturn
public static short dreturn
areturn
public static short areturn
return_
public static short return_
getstatic
public static short getstatic
putstatic
public static short putstatic
getfield
public static short getfield
putfield
public static short putfield
invokevirtual
public static short invokevirtual
invokespecial
public static short invokespecial
invokestatic
public static short invokestatic
invokeinterface
public static short invokeinterface
xxxunusedxxx1
public static short xxxunusedxxx1
new_
public static short new_
newarray
public static short newarray
anewarray
public static short anewarray
arraylength
public static short arraylength
athrow
public static short athrow
checkcast
public static short checkcast
instanceof_
public static short instanceof_
monitorenter
public static short monitorenter
monitorexit
public static short monitorexit
wide
public static short wide
multianewarray
public static short multianewarray
ifnull
public static short ifnull
ifnonnull
public static short ifnonnull
goto_w
public static short goto_w
jsr_w
public static short jsr_w
breakpoint
public static short breakpoint
impdep1
public static short impdep1
impdep2
public static short impdep2
Mnemonics
public Mnemonics()
getConditionBytecode
public static short getConditionBytecode(int condition)
throws CompileError
- 比較演算子のバイトコードを生成する.
- パラメータ:
condition - 比較演算子トークン.
- 例外:
CompileError - Tokenクラスに定義されていないデータの場合に発生する.
getConditionBytecode
public static short getConditionBytecode(int condition,
boolean isReversed)
throws CompileError
- 比較演算子のバイトコードを生成する.
- パラメータ:
condition - 比較演算子トークン.isShort - byte値の場合条件フラグが反転する.short値の場合反転しない.
- 例外:
CompileError - Tokenクラスに定義されていないデータの場合に発生する.