Skip to content

Commit

Permalink
asm: use op flags
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Nov 27, 2024
1 parent f3be8b2 commit 1ad7606
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asm/compiler_analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (chk *unreachableCodeCheck) check(c *Compiler, st ast.Statement, op *evm.Op
if chk.inUnreachable && op.Name == "JUMPDEST" {
chk.inUnreachable = false
}
if chk.prevOp != nil && (chk.prevOp.Term || chk.prevOp.UnconditionalJump) && op.Name != "JUMPDEST" {
if chk.prevOp != nil && (chk.prevOp.Term || chk.prevOp.Unconditional) && !op.JumpDest {
c.warnf(st, "unreachable code (previous instruction is %s at %v)", chk.prevOp.Name, chk.prevSt.Position())
chk.inUnreachable = true
}
Expand Down

0 comments on commit 1ad7606

Please sign in to comment.