constants

package
v0.0.0-...-26bd4cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 3 Imported by: 0

README

Constants 指令

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AConstNull

type AConstNull struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf aconst_null Page.370

格式: aconst_null 字节: 0x1 操作: 将 null 对象引用推到操作数栈 描述: JVM 并不限定 null 的具体值

func (*AConstNull) Execute

func (this *AConstNull) Execute(frame *rtda.Frame)

type BIPush

type BIPush struct {
	// contains filtered or unexported fields
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf bipush Page.396

格式: bipush [byte] 字节: 0x10 0x1 //

指令样例      8进制表示    指令含义
bipush 1     0x10 0x01   将 1 转成整数推到操作数栈 (0x01 -> 0x00000001)
bipush -1    0x10 0xFF   将 -1 转成整数推到操作数栈 (0xFF -> 0xFFFFFFFF)

操作: 将指令后面的一字节的立即数【符号拓展(带符号)】为 int 型,推到操作数栈 描述:

func (*BIPush) Execute

func (this *BIPush) Execute(frame *rtda.Frame)

func (*BIPush) FetchOperands

func (this *BIPush) FetchOperands(reader *base.ByteCodeReader)

type DConst0

type DConst0 struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf dconst_<i> Page.396

格式: dconst_<i> 字节:

助记符      8进制表示   对应双进度浮点数
dconst_0     0xe       0.0
dconst_1     0xf       1.0

操作: 将double型(0.0 or 1.0)推到操作数栈 描述:

func (*DConst0) Execute

func (this *DConst0) Execute(frame *rtda.Frame)

type DConst1

type DConst1 struct {
	base.NoOperandsInstruction
}

func (*DConst1) Execute

func (this *DConst1) Execute(frame *rtda.Frame)

type FConst0

type FConst0 struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf fconst_<i> Page.426

格式: fconst_<i> 字节:

助记符      8进制表示   对应浮点数
fconst_0     0xb       0.0
fconst_1     0xc       1.0
fconst_2     0xd       2.0

操作: 将float型(0.0, or 1.0, or 2.0)推到操作数栈 描述:

func (*FConst0) Execute

func (this *FConst0) Execute(frame *rtda.Frame)

type FConst1

type FConst1 struct {
	base.NoOperandsInstruction
}

func (*FConst1) Execute

func (this *FConst1) Execute(frame *rtda.Frame)

type FConst2

type FConst2 struct {
	base.NoOperandsInstruction
}

func (*FConst2) Execute

func (this *FConst2) Execute(frame *rtda.Frame)

type IConst0

type IConst0 struct {
	base.NoOperandsInstruction
}

func (*IConst0) Execute

func (this *IConst0) Execute(frame *rtda.Frame)

type IConst1

type IConst1 struct {
	base.NoOperandsInstruction
}

func (*IConst1) Execute

func (this *IConst1) Execute(frame *rtda.Frame)

type IConst2

type IConst2 struct {
	base.NoOperandsInstruction
}

func (*IConst2) Execute

func (this *IConst2) Execute(frame *rtda.Frame)

type IConst3

type IConst3 struct {
	base.NoOperandsInstruction
}

func (*IConst3) Execute

func (this *IConst3) Execute(frame *rtda.Frame)

type IConst4

type IConst4 struct {
	base.NoOperandsInstruction
}

func (*IConst4) Execute

func (this *IConst4) Execute(frame *rtda.Frame)

type IConst5

type IConst5 struct {
	base.NoOperandsInstruction
}

func (*IConst5) Execute

func (this *IConst5) Execute(frame *rtda.Frame)

type IConstM1

type IConstM1 struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf iconst_<i> Page.456

格式: iconst_<i> 字节:

助记符      8进制表示   对应整数
iconst_m1    0x2       -1
iconst_0     0x3       0
iconst_1     0x4       1
iconst_2     0x5       2
iconst_3     0x6       3
iconst_4     0x7       4
iconst_5     0x8       5

操作: 将整型i推到操作数栈 描述: 该指令族和 bipush [byte num] 指令的效果相同,只不过该指令族在指令中隐含了推到操作数栈的整数

func (*IConstM1) Execute

func (this *IConstM1) Execute(frame *rtda.Frame)

type LConst0

type LConst0 struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf lconst_<i> Page.514

格式: lconst_<i> 字节:

助记符      8进制表示   对应整数
lconst_0     0x9       0
lconst_1     0xa       1

操作: 将long型i推到操作数栈 描述:

func (*LConst0) Execute

func (this *LConst0) Execute(frame *rtda.Frame)

type LConst1

type LConst1 struct {
	base.NoOperandsInstruction
}

func (*LConst1) Execute

func (this *LConst1) Execute(frame *rtda.Frame)

type LDC

type LDC struct {
	base.Index8Instruction
}

func (*LDC) Execute

func (this *LDC) Execute(frame *rtda.Frame)

type LDC2W

type LDC2W struct {
	base.Index16Instruction
}

func (*LDC2W) Execute

func (this *LDC2W) Execute(frame *rtda.Frame)

type LDCW

type LDCW struct {
	base.Index16Instruction
}

func (*LDCW) Execute

func (this *LDCW) Execute(frame *rtda.Frame)

type NOP

type NOP struct {
	base.NoOperandsInstruction
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf nop Page.547

格式: nop 字节: 0x0 操作: do nothing

func (*NOP) Execute

func (this *NOP) Execute(frame *rtda.Frame)

type SIPush

type SIPush struct {
	// contains filtered or unexported fields
}

指令定义来源 The Java® Virtual Machine Specification https://docs.oracle.com/javase/specs/jvms/se8/jvms8.pdf sipush Page.558

格式: sipush [byte1] [byte2] 字节: 0x11 0x00 0x01 //

指令样例      8进制表示         指令含义
sipush 1     0x11 0x00 0x01   将 1 转成整数推到操作数栈 (0x0001 -> 0x00000001)
sipush -1    0x11 0xFF 0xFF   将 -1 转成整数推到操作数栈 (0xFFFF -> 0xFFFFFFFF)

操作: 将指令后面的两字节的立即数【符号拓展(带符号)】为 int 型,推到操作数栈 描述:

func (*SIPush) Execute

func (this *SIPush) Execute(frame *rtda.Frame)

func (*SIPush) FetchOperands

func (this *SIPush) FetchOperands(reader *base.ByteCodeReader)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL