extended

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GOTO_W

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

func (*GOTO_W) Execute

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

func (*GOTO_W) FetchOperands

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

*

与goto唯一的区别在于索引从2字节变成了4字节

type IFNONNULL

type IFNONNULL struct {
	base.BranchInstruction
}

*

ref != null

func (*IFNONNULL) Execute

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

type IFNULL

type IFNULL struct {
	base.BranchInstruction
}

*

根据引用是否为null来跳转
ref == null

func (*IFNULL) Execute

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

type WIDE

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

*

一般情况下,一个方法的局部变量表的大小都不会超过256,及1字节。
但是如果有方法的局部变量表超过256,用wide指令来扩展一些指令

func (*WIDE) Execute

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

*

只改变索引宽度,不改变指令操作

func (*WIDE) FetchOperands

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

*

读取1字节的操作码,然后创建子指令实例,最后读取子指令的操作数,加载指令和存储指令都只有一个操作数,需要扩展成两个字节

Jump to

Keyboard shortcuts

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