本文整理汇总了Golang中github.com/zxh0/jvm/go/jvmgo/instructions/base.BytecodeReader类的典型用法代码示例。如果您正苦于以下问题:Golang BytecodeReader类的具体用法?Golang BytecodeReader怎么用?Golang BytecodeReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BytecodeReader类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: FetchOperands
func (self *TABLE_SWITCH) FetchOperands(reader *base.BytecodeReader) {
reader.SkipPadding()
self.defaultOffset = reader.ReadInt32()
self.low = reader.ReadInt32()
self.high = reader.ReadInt32()
jumpOffsetsCount := self.high - self.low + 1
self.jumpOffsets = reader.ReadInt32s(jumpOffsetsCount)
}
开发者ID:b-xiang,项目名称:jvm.go,代码行数:8,代码来源:tableswitch.go
示例2: FetchOperands
func (self *IINC) FetchOperands(reader *base.BytecodeReader) {
self.Index = uint(reader.ReadUint8())
self.Const = int32(reader.ReadInt8())
}
开发者ID:b-xiang,项目名称:jvm.go,代码行数:4,代码来源:iinc.go
示例3: FetchOperands
func (self *INVOKE_INTERFACE) FetchOperands(reader *base.BytecodeReader) {
self.index = uint(reader.ReadUint16())
reader.ReadUint8() // count
reader.ReadUint8() // must be 0
}
开发者ID:zaishihuang,项目名称:jvm.go,代码行数:5,代码来源:invokeinterface.go
示例4: FetchOperands
func (self *LOOKUP_SWITCH) FetchOperands(reader *base.BytecodeReader) {
reader.SkipPadding()
self.defaultOffset = reader.ReadInt32()
self.npairs = reader.ReadInt32()
self.matchOffsets = reader.ReadInt32s(self.npairs * 2)
}
开发者ID:kingljl,项目名称:jvm.go,代码行数:6,代码来源:lookupswitch.go
示例5: FetchOperands
func (self *MULTI_ANEW_ARRAY) FetchOperands(reader *base.BytecodeReader) {
self.index = reader.ReadUint16()
self.dimensions = reader.ReadUint8()
}
开发者ID:Rearcher,项目名称:jvm.go,代码行数:4,代码来源:newarray.go
示例6: FetchOperands
func (self *JSR_W) FetchOperands(reader *base.BytecodeReader) {
self.offset = int(reader.ReadInt32())
}
开发者ID:Rearcher,项目名称:jvm.go,代码行数:3,代码来源:jsr.go
示例7: FetchOperands
func (self *SIPUSH) FetchOperands(reader *base.BytecodeReader) {
self.val = reader.ReadInt16()
}
开发者ID:b-xiang,项目名称:jvm.go,代码行数:3,代码来源:xipush.go
示例8: FetchOperands
func (self *INVOKE_DYNAMIC) FetchOperands(reader *base.BytecodeReader) {
self.index = reader.ReadUint16()
reader.ReadUint8() // must be 0
reader.ReadUint8() // must be 0
}
开发者ID:zaishihuang,项目名称:jvm.go,代码行数:5,代码来源:invokedynamic.go
示例9: FetchOperands
func (self *WIDE) FetchOperands(reader *base.BytecodeReader) {
opcode := reader.ReadUint8()
switch opcode {
case 0x15:
inst := &loads.ILOAD{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x16:
inst := &loads.LLOAD{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x17:
inst := &loads.FLOAD{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x18:
inst := &loads.DLOAD{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x19:
inst := &loads.ALOAD{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x36:
inst := &stores.ISTORE{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x37:
inst := &stores.LSTORE{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x38:
inst := &stores.FSTORE{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x39:
inst := &stores.DSTORE{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x3a:
inst := &stores.ASTORE{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0xa9:
inst := &control.RET{}
inst.Index = uint(reader.ReadUint16())
self.modifiedInstruction = inst
case 0x84:
inst := &math.IINC{}
inst.Index = uint(reader.ReadUint16())
inst.Const = int32(reader.ReadInt16())
self.modifiedInstruction = inst
}
}
开发者ID:b-xiang,项目名称:jvm.go,代码行数:54,代码来源:wide.go
注:本文中的github.com/zxh0/jvm/go/jvmgo/instructions/base.BytecodeReader类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论