Skip to content

Commit

Permalink
chore: add a comment to describe why we check depth == 1
Browse files Browse the repository at this point in the history
Signed-off-by: Kengo TODA <skypencil@gmail.com>
  • Loading branch information
KengoTODA committed Sep 1, 2022
1 parent a363651 commit 2e9d29c
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -1006,6 +1006,8 @@ private boolean isPEI(InstructionHandle handle) throws CFGBuilderException {
throw new CFGBuilderException("Invalid stack at " + prev + " when checking " + handle);
}
if (depth == 1) {
// now we assume that the previous instruction (prevPrev) is the opcode
// that pushes the reference to the target of PUTFIELD
InstructionHandle prevPrev = prev.getPrev();
if (prevPrev != null && prevPrev.getInstruction() instanceof BranchInstruction) {
continue;
Expand Down

0 comments on commit 2e9d29c

Please sign in to comment.