math

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DADD

type DADD struct {
	base.NoOperandsInstruction
}

func (*DADD) Execute

func (self *DADD) Execute(frame *rtda.Frame)

type DDIV

type DDIV struct {
	base.NoOperandsInstruction
}

func (DDIV) Execute

func (self DDIV) Execute(frame rtda.Frame)

type DMUL

type DMUL struct {
	base.NoOperandsInstruction
}

func (DMUL) Execute

func (self DMUL) Execute(frame *rtda.Frame)

type DNEG

type DNEG struct {
	base.NoOperandsInstruction
}

func (DNEG) Execute

func (self DNEG) Execute(frame rtda.Frame)

type DREM

type DREM struct {
	base.NoOperandsInstruction
}

REM为求余指令

func (*DREM) Execute

func (self *DREM) Execute(frame *rtda.Frame)

type DSHL

type DSHL struct {
	base.NoOperandsInstruction
}

type DSHR

type DSHR struct {
	base.NoOperandsInstruction
}

type DSHUR

type DSHUR struct {
	base.NoOperandsInstruction
}

type DSUB

type DSUB struct {
	base.NoOperandsInstruction
}

func (*DSUB) Execute

func (self *DSUB) Execute(frame *rtda.Frame)

type FADD

type FADD struct {
	base.NoOperandsInstruction
}

func (*FADD) Execute

func (self *FADD) Execute(frame *rtda.Frame)

type FDIV

type FDIV struct {
	base.NoOperandsInstruction
}

func (FDIV) Execute

func (self FDIV) Execute(frame rtda.Frame)

type FMUL

type FMUL struct {
	base.NoOperandsInstruction
}

func (FMUL) Execute

func (self FMUL) Execute(frame *rtda.Frame)

type FNEG

type FNEG struct {
	base.NoOperandsInstruction
}

func (FNEG) Execute

func (self FNEG) Execute(frame rtda.Frame)

type FREM

type FREM struct {
	base.NoOperandsInstruction
}

func (*FREM) Execute

func (self *FREM) Execute(frame *rtda.Frame)

type FSHL

type FSHL struct {
	base.NoOperandsInstruction
}

type FSHR

type FSHR struct {
	base.NoOperandsInstruction
}

type FSHUR

type FSHUR struct {
	base.NoOperandsInstruction
}

type FSUB

type FSUB struct {
	base.NoOperandsInstruction
}

func (*FSUB) Execute

func (self *FSUB) Execute(frame *rtda.Frame)

type IADD

type IADD struct {
	base.NoOperandsInstruction
}

func (*IADD) Execute

func (self *IADD) Execute(frame *rtda.Frame)

type IAND

type IAND struct {
	base.NoOperandsInstruction
}

func (IAND) Execute

func (self IAND) Execute(frame *rtda.Frame)

type IDIV

type IDIV struct {
	base.NoOperandsInstruction
}

func (IDIV) Execute

func (self IDIV) Execute(frame rtda.Frame)

type IINC

type IINC struct {
	// 局部变量表下标
	Index uint

	// 操作数
	Const int32
}

func (*IINC) Execute

func (self *IINC) Execute(frame *rtda.Frame)

func (*IINC) FetchOperands

func (self *IINC) FetchOperands(reader *base.BytecodeReader)

type IMUL

type IMUL struct {
	base.NoOperandsInstruction
}

func (IMUL) Execute

func (self IMUL) Execute(frame *rtda.Frame)

type INEG

type INEG struct {
	base.NoOperandsInstruction
}

func (INEG) Execute

func (self INEG) Execute(frame rtda.Frame)

type IREM

type IREM struct {
	base.NoOperandsInstruction
}

func (*IREM) Execute

func (self *IREM) Execute(frame *rtda.Frame)

一般取余代码为 int result = val_1 % val_2 所以对于操作数栈来说,val1 是先压入栈的,然后是val2压入栈 所以先出栈的数(val_2)在数学层面不能为零 最后结果result压入栈中

type ISHL

type ISHL struct {
	base.NoOperandsInstruction
}

算数左移,无符号左移

func (ISHL) Execute

func (self ISHL) Execute(frame *rtda.Frame)

int字符的算数左移, i << x,i左移x位

type ISHR

type ISHR struct {
	base.NoOperandsInstruction
}

算数右移,无符号右移

func (ISHR) Execute

func (self ISHR) Execute(frame *rtda.Frame)

int字符的算数右移 i >> x , i右移动x位

type ISHUR

type ISHUR struct {
	base.NoOperandsInstruction
}

逻辑右移,有符号右移动

func (ISHUR) Execute

func (self ISHUR) Execute(frame *rtda.Frame)

int字符的逻辑右移 i >>> x , i右移动x位 go中没有 >>> 运算符,所以先转换成无符号整数,再转换成有符号整数

type ISUB

type ISUB struct {
	base.NoOperandsInstruction
}

func (*ISUB) Execute

func (self *ISUB) Execute(frame *rtda.Frame)

type LADD

type LADD struct {
	base.NoOperandsInstruction
}

func (*LADD) Execute

func (self *LADD) Execute(frame *rtda.Frame)

type LAND

type LAND struct {
	base.NoOperandsInstruction
}

func (LAND) Execute

func (self LAND) Execute(frame *rtda.Frame)

type LDIV

type LDIV struct {
	base.NoOperandsInstruction
}

func (LDIV) Execute

func (self LDIV) Execute(frame rtda.Frame)

type LMUL

type LMUL struct {
	base.NoOperandsInstruction
}

func (LMUL) Execute

func (self LMUL) Execute(frame *rtda.Frame)

type LNEG

type LNEG struct {
	base.NoOperandsInstruction
}

func (LNEG) Execute

func (self LNEG) Execute(frame rtda.Frame)

type LREM

type LREM struct {
	base.NoOperandsInstruction
}

func (*LREM) Execute

func (self *LREM) Execute(frame *rtda.Frame)

type LSHL

type LSHL struct {
	base.NoOperandsInstruction
}

long整型算数左移

func (LSHL) Execute

func (self LSHL) Execute(frame *rtda.Frame)

long 算数左移

type LSHR

type LSHR struct {
	base.NoOperandsInstruction
}

long整形算数右移

func (LSHR) Execute

func (self LSHR) Execute(frame *rtda.Frame)

long 算数右移 算数移动不带符号的,对于整数而言就是补0,对于负数就是补1

type LSHUR

type LSHUR struct {
	base.NoOperandsInstruction
}

long整形逻辑右移

func (LSHUR) Execute

func (self LSHUR) Execute(frame *rtda.Frame)

long 逻辑右移

type LSUB

type LSUB struct {
	base.NoOperandsInstruction
}

func (*LSUB) Execute

func (self *LSUB) Execute(frame *rtda.Frame)

Jump to

Keyboard shortcuts

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