Question about OTDRE [message #1768318] |
Mon, 17 July 2017 08:36  |
Eclipse User |
|
|
|
Hi,
I am just digging through the code to assemble all the details together how things work w.r.t. the implementation of the dynamic runtime weaving.
In the CreateCallAllBindingsCallInOrgMethod I've seen some interesting peace of code (line 111-116) which I do not understand why it is needed. They have been added with commit ea5e55ac71fa3c12fddeb561a423a8e76f9fdfc1 in order to fix Bug 494415.
if (method.name.equals("<init>")) { // set bit 0x8000000 to signal the ctor
newInstructions.add(createLoadIntConstant(0xffff_ffff));
newInstructions.add(createLoadIntConstant(0x7fff_ffff)); // 0x80000000 causes NPE in ASM :(
newInstructions.add(new InsnNode(Opcodes.IXOR)); // indirectly creates the desired 0x80000000
newInstructions.add(new InsnNode(Opcodes.IOR));
}
Now, the IXOR constructs the 0x800_000 which cannot be constructed using the ASM API. But what is the task of the IOR operator following just thereafter?
Furthermore, why is it needed to put 0x800_000 on the stack "to signal the ctor"? Directly before that code this and a load instruction for the boundMethodId as constant is put on the stack. Directly thereafter the arguments for callAllBindings are assembled together and is called by invokevirtual.
[Updated on: Mon, 17 July 2017 08:40] by Moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.18840 seconds