Skip to content

Commit

Permalink
Flytter post processor.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jun 2, 2020
1 parent bb85163 commit 3bca4ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java
Original file line number Diff line number Diff line change
Expand Up @@ -8716,11 +8716,11 @@ public void visitEnd() {
stackMapFrameHandler.injectReturnFrame(methodVisitor);
methodVisitor.visitVarInsn(Opcodes.ASTORE, exit ? argumentHandler.exit() : argumentHandler.enter());
}
methodSizeHandler.requireStackSize(relocationHandler.apply(methodVisitor, exit ? argumentHandler.exit() : argumentHandler.enter()));
stackMapFrameHandler.injectCompletionFrame(methodVisitor);
methodSizeHandler.recordMaxima(postProcessor
.resolve(instrumentedType, instrumentedMethod, assigner, argumentHandler)
.apply(mv, implementationContext).getMaximalSize(), EMPTY);
methodSizeHandler.requireStackSize(relocationHandler.apply(methodVisitor, exit ? argumentHandler.exit() : argumentHandler.enter()));
stackMapFrameHandler.injectCompletionFrame(methodVisitor);
}

@Override
Expand Down Expand Up @@ -9068,12 +9068,12 @@ public void apply() {
} else if (!adviceMethod.getReturnType().represents(void.class)) {
methodVisitor.visitVarInsn(Opcodes.ASTORE, isExitAdvice() ? argumentHandler.exit() : argumentHandler.enter());
}
methodSizeHandler.requireStackSize(relocationHandler.apply(methodVisitor, isExitAdvice() ? argumentHandler.exit() : argumentHandler.enter()));
stackMapFrameHandler.injectCompletionFrame(methodVisitor);
methodSizeHandler.recordMaxima(Math.max(maximumStackSize, adviceMethod.getReturnType().getStackSize().getSize()), EMPTY);
methodSizeHandler.recordMaxima(postProcessor
.resolve(instrumentedType, instrumentedMethod, assigner, argumentHandler)
.apply(methodVisitor, implementationContext).getMaximalSize(), EMPTY);
methodSizeHandler.requireStackSize(relocationHandler.apply(methodVisitor, isExitAdvice() ? argumentHandler.exit() : argumentHandler.enter()));
stackMapFrameHandler.injectCompletionFrame(methodVisitor);
methodSizeHandler.recordMaxima(Math.max(maximumStackSize, adviceMethod.getReturnType().getStackSize().getSize()), EMPTY);
}

/**
Expand Down

0 comments on commit 3bca4ce

Please sign in to comment.