private void process(ParserClassNode classNode, RuleMethod method, MethodInsnNode insn) { if ("<init>".equals(insn.name)) return; String superMethodName = getSuperMethodName(method, insn); RuleMethod superMethod = classNode.getRuleMethods().get(superMethodName.concat(insn.desc)); if (superMethod == null) return; if (!superMethod.isBodyRewritten()) return; // since the super method is rewritten we do need to generate it superMethod.dontSkipGeneration(); // we have a call to a super method that was rewritten, so we need to change the call to the generated method insn.setOpcode(INVOKEVIRTUAL); insn.name = superMethodName; insn.owner = classNode.name; method.setBodyRewritten(); }
call.owner = targetType.getInternalName(); if (call.getOpcode() == INVOKEINTERFACE) { call.setOpcode(INVOKEVIRTUAL); call.itf = false;
private void process(final ParserClassNode classNode, final RuleMethod method, final MethodInsnNode insn) { if ("<init>".equals(insn.name)) return; final String superMethodName = getSuperMethodName(method, insn); final RuleMethod superMethod = classNode.getRuleMethods() .get(superMethodName + insn.desc); if (superMethod == null) return; if (!superMethod.isBodyRewritten()) return; // since the super method is rewritten we do need to generate it superMethod.dontSkipGeneration(); // we have a call to a super method that was rewritten, so we need to // change the call to the generated method insn.setOpcode(INVOKEVIRTUAL); insn.name = superMethodName; insn.owner = classNode.name; method.setBodyRewritten(); }
if(Modifier.isFinal(method.getModifiers())) { if(methodInsnNode.getOpcode() != Opcodes.INVOKESTATIC) { methodInsnNode.setOpcode(Opcodes.INVOKESTATIC); Type[] args = Type.getArgumentTypes(methodInsnNode.desc); Type returnType = Type.getReturnType(methodInsnNode.desc);
methodInstr.setOpcode(INVOKESTATIC); methodInstr.name = methodInstr.name + "$static$callable$creator"; for (MethodNode staticCreated : staticMethodsToAdd) {
targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC); targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper"; targetMethodInsnNode.name = "shouldRenderRainSnow"; targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC); targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper"; targetMethodInsnNode.name = "getFloatTemperature"; targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC); targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper"; targetMethodInsnNode.name = "shouldAddRainParticles"; targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC); targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper"; targetMethodInsnNode.name = "getFloatTemperature";