use of com.ibm.j9ddr.vm29.pointer.generated.J9MethodParametersDataPointer in project openj9 by eclipse.
the class RomClassWalker method allSlotsInMethodParametersDataDo.
private long allSlotsInMethodParametersDataDo(U32Pointer cursor) throws CorruptDataException {
J9MethodParametersDataPointer methodParametersData = J9MethodParametersDataPointer.cast(cursor);
J9MethodParameterPointer parameters = methodParametersData.parameters();
long methodParametersSize = ROMHelp.J9_METHOD_PARAMS_SIZE_FROM_NUMBER_OF_PARAMS(methodParametersData.parameterCount().longValue());
long padding = U32.SIZEOF - (methodParametersSize % U32.SIZEOF);
long size = 0;
if (padding == U32.SIZEOF) {
padding = 0;
}
size = methodParametersSize + padding;
classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, methodParametersData.parameterCountEA(), "parameterCount");
for (int i = 0; i < methodParametersData.parameterCount().longValue(); i++) {
classWalkerCallback.addSlot(clazz, SlotType.J9_SRP, parameters.nameEA(), "methodParameterName");
classWalkerCallback.addSlot(clazz, SlotType.J9_U16, parameters.flagsEA(), "methodParameterFlag");
}
cursor = cursor.addOffset(methodParametersSize);
for (; padding > 0; padding--) {
classWalkerCallback.addSlot(clazz, SlotType.J9_U8, cursor, "MethodParameters padding");
cursor.addOffset(1);
}
classWalkerCallback.addSection(clazz, methodParametersData, size, "Method Parameters", true);
return size / U32.SIZEOF;
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9MethodParametersDataPointer in project openj9 by eclipse.
the class J9BCUtil method dumpMethodParameters.
private static void dumpMethodParameters(PrintStream out, J9ROMClassPointer romclass, J9ROMMethodPointer romMethod, long flags) throws CorruptDataException {
J9MethodParametersDataPointer methodParameters = ROMHelp.getMethodParametersFromROMMethod(romMethod);
if (methodParameters != J9MethodParametersDataPointer.NULL) {
J9MethodParameterPointer parameters = methodParameters.parameters();
out.println(String.format(" Method Parameters (%d):\n", methodParameters.parameterCount().longValue()));
for (int i = 0; i < methodParameters.parameterCount().longValue(); i++) {
J9UTF8Pointer name = J9UTF8Pointer.cast(parameters.nameEA().get());
long parameterFlags = parameters.flags().longValue();
if (name.isNull()) {
out.print(" <no name>");
} else {
out.print(" " + J9UTF8Helper.stringValue(name));
}
out.print(String.format(" 0x%x ( ", parameterFlags));
dumpModifiers(out, parameterFlags, ONLY_SPEC_MODIFIERS, MODIFIERSOURCE_METHODPARAMETER);
out.println(" )\n");
}
out.println("\n");
}
}
Aggregations