{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d1588981e0248aaa0174906c99df180e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d1588981e0248aaa0174906c99df180e","url":"https://api.github.com/users/petdance","login":"petdance","id":41100},"assignee":null,"updated_at":"2011-11-01T05:39:25Z","labels":[{"name":"Pri-normal","color":"5B4E39","url":"https://api.github.com/repos/petdance/scratch/labels/Pri-normal"},{"name":"Sev-medium","color":"F9ECA1","url":"https://api.github.com/repos/petdance/scratch/labels/Sev-medium"},{"name":"todo","color":"3A5B64","url":"https://api.github.com/repos/petdance/scratch/labels/todo"},{"name":"tools","color":"C27965","url":"https://api.github.com/repos/petdance/scratch/labels/tools"}],"comments":0,"closed_at":null,"url":"https://api.github.com/repos/petdance/scratch/issues/1153","body":"pbc_dump -d shows opcodes but does not indicate branch targets:\n{{{\r\n 012b:  0000001b 00000001 00000046                            unless_p_ic\r\n 012e:  00000348 00000002 00000001                            shift_p_p\r\n 0131:  00000023 00000004                                     set_args_pc\r\n 0134:  00000024 00000004                                     get_results_pc\r\n 0137:  000002c4 00000002 00000044                            callmethodcc_p_sc\r\n 013a:  00000367 00000009 00000007                            iter_p_p\r\n 013d:  0000001b 00000009 ffffffee                            unless_p_ic\r\n 0140:  00000347 00000001 00000009                            shift_s_p\r\n 0143:  000003d1 00000003 00000007 00000049                   set_p_p_kc\r\n 0147:  000002d5 00000000 00000003 00000043                   isa_i_p_sc\r\n 014b:  00000014 00000000 fffffff2                            if_i_ic\r\n}}}\r\n\r\nWhile backwards branching means that marking branch targets in the output stream as labels would be a two pass operation, it should be possible to do the match and indicate the target offset as part of the opcode:\r\n\r\n{{{\r\n 012b:  0000001b 00000001 00000046                            unless_p_ic 0171\r\n ...\r\n 013d:  0000001b 00000009 ffffffee                            unless_p_ic 012b\r\n ...\r\n 014b:  00000014 00000000 fffffff2                            if_i_ic 013d\r\n}}}\r\n\r\nNote: I make no guarantee those offsets are right.\r\n\r\nOriginally http://trac.parrot.org/parrot/ticket/1439","html_url":"https://github.com/petdance/scratch/issues/1153","title":"pbc_dump: Mark branch targets in -d mode","number":1153,"id":2106857,"created_at":"2011-11-01T05:39:25Z"},"action":"opened"}