37 internal readonly RuntimeByteCodeJavaType.FinishContext Context;
40 internal readonly
int OpcodeIndex;
45 internal bool NonLeaf =
true;
50 this.Context = context;
53 this.OpcodeIndex = opcodeIndex;
55 this.ClassFile = classFile;
60 internal bool MatchRange(
int offset,
int length)
62 if (OpcodeIndex + offset < 0)
65 if (OpcodeIndex + offset + length > Code.Length)
69 for (
int i = OpcodeIndex + offset + 1, end = OpcodeIndex + offset + length; i < end; i++)
78 return Code[OpcodeIndex + offset].NormalizedOpCode == opcode;
83 return Code[OpcodeIndex + offset].NormalizedOpCode == opcode && Code[OpcodeIndex + offset].Arg1 == arg;
86 internal RuntimeJavaType GetStackTypeWrapper(
int offset,
int pos)
88 return ma.GetStackTypeWrapper(OpcodeIndex + offset, pos);
91 internal ClassFile.ConstantPoolItemMI GetMethodref(
int offset)
93 return ClassFile.GetMethodref(Code[OpcodeIndex + offset].Arg1);
96 internal ClassFile.ConstantPoolItemFieldref GetFieldref(
int offset)
98 return ClassFile.GetFieldref(Code[OpcodeIndex + offset].Arg1);
101 internal RuntimeJavaType GetClassLiteral(
int offset)
103 return ClassFile.GetConstantPoolClassType(
new ClassConstantHandle(checked((ushort)Code[OpcodeIndex + offset].Arg1)));
106 internal string GetStringLiteral(
int offset)
108 return ClassFile.GetConstantPoolConstantString(
new StringConstantHandle(checked((ushort)Code[OpcodeIndex + offset].Arg1)));
111 internal ClassFile.ConstantType GetConstantType(
int offset)
113 return ClassFile.GetConstantPoolConstantType(
new ConstantHandle(ConstantKind.Unknown, checked((ushort)Code[OpcodeIndex + offset].Arg1)));
118 Code[OpcodeIndex + offset].PatchOpCode(opc);