Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // first
- for x in f.Body.Instructions do
- // Copy to branches
- match x.OpCode.OperandType with
- | OperandType.InlineBrTarget
- | OperandType.ShortInlineBrTarget ->
- let y = x.Operand :?> Instruction
- depths.[y] <- depth
- | OperandType.InlineSwitch ->
- for y in x.Operand :?> Instruction array do
- depths.[y] <- depth
- | _ ->
- ()
- // Empty after unconditional control transfer unless forward branch
- match x.OpCode.FlowControl with
- | FlowControl.Branch
- | FlowControl.Break
- | FlowControl.Return
- | FlowControl.Throw ->
- depth <- 0
- | _ ->
- ()
- depths
- // second
- for x in f.Body.Instructions do
- // Copy to branches
- match x.OpCode.OperandType with
- | OperandType.InlineBrTarget
- | OperandType.ShortInlineBrTarget ->
- let y = x.Operand :?> Instruction
- depths.[y] <- depth
- | OperandType.InlineSwitch ->
- for y in x.Operand :?> Instruction array do
- depths.[y] <- depth
- | _ ->
- ()
- // Empty after unconditional control transfer unless forward branch
- match x.OpCode.FlowControl with
- | FlowControl.Branch
- | FlowControl.Break
- | FlowControl.Return
- | FlowControl.Throw ->
- depth <- 0
- | _ ->
- ()
- depths
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement