Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Branching logic:
- getSplits:
- list[]
- for pointer in splits:
- if pointer had a condjump/altbranch in branches:
- continue until pointer is of condjump/altbranch
- if branch of pointer is in branches:
- add pointer to list
- return list
- on init:
- branches = [A]
- list = getSplits()
- curSplit = 0
- prevalt = null
- on nextsplit:
- skip to list[++cursplit]
- prevalt = null
- on switch branch:
- if split had a altbranch:
- prevalt = split
- add altbranch to branches
- list = getSplits()
- skip to list[curSplit]
- else if prevalt != null:
- remove branch of prevalt from branches
- prevalt = null
- list = getSplits()
- undosplit to list[curSplit]
- on display:
- display list
- alternate method:
- on init:
- branches = [A]
- prevsplit = firstsplit
- on nextsplit:
- prevsplit = split
- if split has a condjump and branchcond is in branches:
- skip to the next split of branchcond
- else
- skip to next split of any in branches
- on switch branch:
- if split had a altbranch:
- prevsplit = split
- skip to next split of branchcond
- add altbranch to branches
- else if prevsplit had a altbranch and split is of altbranch:
- undosplit to prevsplit
- remove altbranch from branches
- on display:
- list[]
- for pointer in splits:
- if pointer had a condjump/altbranch in branches:
- continue until pointer is of condjump/altbranch
- if pointer.branch is in branches:
- add pointer to list
- display list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement