comparisons

package
v0.0.0-...-2ded9d7 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DCMPG

type DCMPG struct {
	base.NoOperandsInstruction
}

*

浮点数计算有可能产生NAN not a number , 所以比较两个浮点数时,除了大于等于小于之外还无法比较

func (*DCMPG) Execute

func (self *DCMPG) Execute(frame *chapter4_rtdt.Frame)

type DCMPL

type DCMPL struct {
	base.NoOperandsInstruction
}

func (*DCMPL) Execute

func (self *DCMPL) Execute(frame *chapter4_rtdt.Frame)

type FCMPG

type FCMPG struct {
	base.NoOperandsInstruction
}

*

浮点数计算有可能产生NAN not a number , 所以比较两个浮点数时,除了大于等于小于之外还无法比较

func (*FCMPG) Execute

func (self *FCMPG) Execute(frame *chapter4_rtdt.Frame)

type FCMPL

type FCMPL struct {
	base.NoOperandsInstruction
}

func (*FCMPL) Execute

func (self *FCMPL) Execute(frame *chapter4_rtdt.Frame)

type IFEQ

type IFEQ struct {
	base.BranchInstruction
}

*

以下皆假设弹出的值是x,则指令跳转操作的条件如下:
x == 0

func (*IFEQ) Execute

func (self *IFEQ) Execute(frame *chapter4_rtdt.Frame)

type IFGE

type IFGE struct {
	base.BranchInstruction
}

*

x >= 0

func (*IFGE) Execute

func (self *IFGE) Execute(frame *chapter4_rtdt.Frame)

type IFGT

type IFGT struct {
	base.BranchInstruction
}

*

x > 0

func (*IFGT) Execute

func (self *IFGT) Execute(frame *chapter4_rtdt.Frame)

type IFLE

type IFLE struct {
	base.BranchInstruction
}

*

x <= 0

func (*IFLE) Execute

func (self *IFLE) Execute(frame *chapter4_rtdt.Frame)

type IFLT

type IFLT struct {
	base.BranchInstruction
}

*

x < 0

func (*IFLT) Execute

func (self *IFLT) Execute(frame *chapter4_rtdt.Frame)

type IFNE

type IFNE struct {
	base.BranchInstruction
}

*

x != 0

func (*IFNE) Execute

func (self *IFNE) Execute(frame *chapter4_rtdt.Frame)

type IF_ACMPEQ

type IF_ACMPEQ struct {
	base.BranchInstruction
}

*

obj == obj

func (*IF_ACMPEQ) Execute

func (self *IF_ACMPEQ) Execute(frame *chapter4_rtdt.Frame)

type IF_ACMPNE

type IF_ACMPNE struct {
	base.BranchInstruction
}

*

obj != obj

func (*IF_ACMPNE) Execute

func (self *IF_ACMPNE) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPEQ

type IF_ICMPEQ struct {
	base.BranchInstruction
}

*

把栈顶的两个int变量弹出,然后进行比较,满足条件则跳转
x == 0

func (*IF_ICMPEQ) Execute

func (self *IF_ICMPEQ) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPGE

type IF_ICMPGE struct {
	base.BranchInstruction
}

*

x >= 0

func (*IF_ICMPGE) Execute

func (self *IF_ICMPGE) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPGT

type IF_ICMPGT struct {
	base.BranchInstruction
}

*

x > 0

func (*IF_ICMPGT) Execute

func (self *IF_ICMPGT) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPLE

type IF_ICMPLE struct {
	base.BranchInstruction
}

*

x <= 0

func (*IF_ICMPLE) Execute

func (self *IF_ICMPLE) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPLT

type IF_ICMPLT struct {
	base.BranchInstruction
}

*

x < 0

func (*IF_ICMPLT) Execute

func (self *IF_ICMPLT) Execute(frame *chapter4_rtdt.Frame)

type IF_ICMPNE

type IF_ICMPNE struct {
	base.BranchInstruction
}

*

x != 0

func (*IF_ICMPNE) Execute

func (self *IF_ICMPNE) Execute(frame *chapter4_rtdt.Frame)

type LCMP

type LCMP struct {
	base.NoOperandsInstruction
}

*

比较long

func (*LCMP) Execute

func (self *LCMP) Execute(frame *chapter4_rtdt.Frame)

*

注意这里需要把比较结果推到栈顶

Jump to

Keyboard shortcuts

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