Created
December 24, 2010 23:30
-
-
Save dpogue/754565 to your computer and use it in GitHub Desktop.
Python bytecode if/elif/else statements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 LOAD_GLOBAL 0: kChatBroadcastMsg | | |
3 STORE_FAST 2: msgtype | msgtype = kChatBroadcastMsg | |
6 LOAD_FAST 1: flags | | |
9 LOAD_GLOBAL 3: kRTChatPrivate | | |
12 COMPARE_OP 2 | | |
,------ 15 JUMP_IF_FALSE 10 (to 28) | if (flags == kRTChatPrivate): | |
| 18 POP_TOP | | |
| 19 LOAD_GLOBAL 4: kChatPrivateMsg | | |
| 22 STORE_FAST 2: msgtype | msgtype = kChatPrivateMsg | |
,-------|------ 25 JUMP_FORWARD 47 (to 75) | | |
| `-----> 28 POP_TOP | | |
| 29 LOAD_FAST 1: flags | | |
| 32 LOAD_GLOBAL 5: kRTChatAdmin | | |
| 35 COMPARE_OP 2 | | |
| ,------ 38 JUMP_IF_FALSE 10 (to 51) | elif (flags == kRTChatAdmin): | |
| | 41 POP_TOP | | |
| | 42 LOAD_GLOBAL 6: kChatAdminBroadcastMsg | | |
| | 45 STORE_FAST 2: msgtype | msgtype = kChatAdminBroadcastMsg | |
|,------|------ 48 JUMP_FORWARD 24 (to 75) | | |
| `-----> 51 POP_TOP | | |
| 52 LOAD_FAST 1: flags | | |
| 55 LOAD_GLOBAL 7: kRTChatPrivateAdmin | | |
| 58 COMPARE_OP 2 | | |
| ,------ 61 JUMP_IF_FALSE 10 (to 74) | elif (flags == kRTChatPrivateAdmin): | |
| | 64 POP_TOP | | |
| | 65 LOAD_GLOBAL 8: kChatAdminPrivateMsg | | |
| | 68 STORE_FAST 2: msgtype | msgtype = kChatAdminPrivateMsg | |
|,------|------ 71 JUMP_FORWARD 1 (to 75) | | |
| `-----> 74 POP_TOP | | |
`-------------> 75 LOAD_FAST 2: msgtype | | |
78 RETURN_VALUE | return msgtype | |
79 LOAD_CONST 0: None | | |
82 RETURN_VALUE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment