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

フィールドの概要
static short aaload
           
static short aastore
           
static short aconst_null
           
static short aload
           
static short aload_0
           
static short aload_1
           
static short aload_2
           
static short aload_3
           
static short anewarray
           
static short areturn
           
static short arraylength
           
static short astore
           
static short astore_0
           
static short astore_1
           
static short astore_2
           
static short astore_3
           
static short athrow
           
static short baload
           
static short bastore
           
static short bipush
           
static short breakpoint
           
static short caload
           
static short castore
           
static short checkcast
           
static short d2f
           
static short d2i
           
static short d2l
           
static short dadd
           
static short daload
           
static short dastore
           
static short dcmpg
           
static short dcmpl
           
static short dconst_0
           
static short dconst_1
           
static short ddiv
           
static short dload
           
static short dload_0
           
static short dload_1
           
static short dload_2
           
static short dload_3
           
static short dmul
           
static short dneg
           
static short drem
           
static short dreturn
           
static short dstore
           
static short dstore_0
           
static short dstore_1
           
static short dstore_2
           
static short dstore_3
           
static short dsub
           
static short dup
           
static short dup_x1
           
static short dup_x2
           
static short dup2
           
static short dup2_x1
           
static short dup2_x2
           
static short f2d
           
static short f2i
           
static short f2l
           
static short fadd
           
static short faload
           
static short fastore
           
static short fcmpg
           
static short fcmpl
           
static short fconst_0
           
static short fconst_1
           
static short fconst_2
           
static short fdiv
           
static short fload
           
static short fload_0
           
static short fload_1
           
static short fload_2
           
static short fload_3
           
static short fmul
           
static short fneg
           
static short frem
           
static short freturn
           
static short fstore
           
static short fstore_0
           
static short fstore_1
           
static short fstore_2
           
static short fstore_3
           
static short fsub
           
static short getfield
           
static short getstatic
           
static short goto_
           
static short goto_w
           
static short i2b
           
static short i2c
           
static short i2d
           
static short i2f
           
static short i2l
           
static short i2s
           
static short iadd
           
static short iaload
           
static short iand
           
static short iastore
           
static short iconst_0
           
static short iconst_1
           
static short iconst_2
           
static short iconst_3
           
static short iconst_4
           
static short iconst_5
           
static short iconst_m1
           
static short idiv
           
static short if_acmpeq
           
static short if_acmpne
           
static short if_icmpeq
           
static short if_icmpge
           
static short if_icmpgt
           
static short if_icmple
           
static short if_icmplt
           
static short if_icmpne
           
static short ifeq
           
static short ifge
           
static short ifgt
           
static short ifle
           
static short iflt
           
static short ifne
           
static short ifnonnull
           
static short ifnull
           
static short iinc
           
static short iload
           
static short iload_0
           
static short iload_1
           
static short iload_2
           
static short iload_3
           
static short impdep1
           
static short impdep2
           
static short imul
           
static short ineg
           
static short instanceof_
           
static short invokeinterface
           
static short invokespecial
           
static short invokestatic
           
static short invokevirtual
           
static short ior
           
static short irem
           
static short ireturn
           
static short ishl
           
static short ishr
           
static short istore
           
static short istore_0
           
static short istore_1
           
static short istore_2
           
static short istore_3
           
static short isub
           
static short iushr
           
static short ixor
           
static short jsr
           
static short jsr_w
           
static short l2d
           
static short l2f
           
static short l2i
           
static short ladd
           
static short laload
           
static short land
           
static short lastore
           
static short lcmp
           
static short lconst_0
           
static short lconst_1
           
static short ldc
           
static short ldc_w
           
static short ldc2_w
           
static short ldiv
           
static short lload
           
static short lload_0
           
static short lload_1
           
static short lload_2
           
static short lload_3
           
static short lmul
           
static short lneg
           
static short lookupswitch
           
static short lor
           
static short lrem
           
static short lreturn
           
static short lshl
           
static short lshr
           
static short lstore
           
static short lstore_0
           
static short lstore_1
           
static short lstore_2
           
static short lstore_3
           
static short lsub
           
static short lushr
           
static short lxor
           
static short monitorenter
           
static short monitorexit
           
static short multianewarray
           
static short new_
           
static short newarray
           
static short nop
           
static short pop
           
static short pop2
           
static short putfield
           
static short putstatic
           
static short ret
           
static short return_
           
static short saload
           
static short sastore
           
static short sipush
           
static short swap
           
static short tableswitch
           
static short wide
           
static short xxxunusedxxx1
           
 
コンストラクタの概要
Mnemonics()
           
 
メソッドの概要
static short getConditionBytecode(int condition)
          比較演算子のバイトコードを生成する.
static short getConditionBytecode(int condition, boolean isReversed)
          比較演算子のバイトコードを生成する.
 
クラス 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クラスに定義されていないデータの場合に発生する.