{"action":"created","issue":{"url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/992","repository_url":"https://api.github.com/repos/mattgodbolt/compiler-explorer","labels_url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/992/labels{/name}","comments_url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/992/comments","events_url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/992/events","html_url":"https://github.com/mattgodbolt/compiler-explorer/pull/992","id":339015893,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5ODA1MjM1","number":992,"title":"[LLVM] Implement PoC llvm ir highlighting","user":{"login":"bugwelle","id":1667306,"node_id":"MDQ6VXNlcjE2NjczMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1667306?v=4","gravatar_id":"","url":"https://api.github.com/users/bugwelle","html_url":"https://github.com/bugwelle","followers_url":"https://api.github.com/users/bugwelle/followers","following_url":"https://api.github.com/users/bugwelle/following{/other_user}","gists_url":"https://api.github.com/users/bugwelle/gists{/gist_id}","starred_url":"https://api.github.com/users/bugwelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugwelle/subscriptions","organizations_url":"https://api.github.com/users/bugwelle/orgs","repos_url":"https://api.github.com/users/bugwelle/repos","events_url":"https://api.github.com/users/bugwelle/events{/privacy}","received_events_url":"https://api.github.com/users/bugwelle/received_events","type":"User","site_admin":false},"labels":[{"id":5540801,"node_id":"MDU6TGFiZWw1NTQwODAx","url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"RabsRincon","id":5364255,"node_id":"MDQ6VXNlcjUzNjQyNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5364255?v=4","gravatar_id":"","url":"https://api.github.com/users/RabsRincon","html_url":"https://github.com/RabsRincon","followers_url":"https://api.github.com/users/RabsRincon/followers","following_url":"https://api.github.com/users/RabsRincon/following{/other_user}","gists_url":"https://api.github.com/users/RabsRincon/gists{/gist_id}","starred_url":"https://api.github.com/users/RabsRincon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RabsRincon/subscriptions","organizations_url":"https://api.github.com/users/RabsRincon/orgs","repos_url":"https://api.github.com/users/RabsRincon/repos","events_url":"https://api.github.com/users/RabsRincon/events{/privacy}","received_events_url":"https://api.github.com/users/RabsRincon/received_events","type":"User","site_admin":false},"assignees":[{"login":"RabsRincon","id":5364255,"node_id":"MDQ6VXNlcjUzNjQyNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5364255?v=4","gravatar_id":"","url":"https://api.github.com/users/RabsRincon","html_url":"https://github.com/RabsRincon","followers_url":"https://api.github.com/users/RabsRincon/followers","following_url":"https://api.github.com/users/RabsRincon/following{/other_user}","gists_url":"https://api.github.com/users/RabsRincon/gists{/gist_id}","starred_url":"https://api.github.com/users/RabsRincon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RabsRincon/subscriptions","organizations_url":"https://api.github.com/users/RabsRincon/orgs","repos_url":"https://api.github.com/users/RabsRincon/repos","events_url":"https://api.github.com/users/RabsRincon/events{/privacy}","received_events_url":"https://api.github.com/users/RabsRincon/received_events","type":"User","site_admin":false}],"milestone":null,"comments":17,"created_at":"2018-07-06T17:25:02Z","updated_at":"2018-11-13T08:30:06Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/pulls/992","html_url":"https://github.com/mattgodbolt/compiler-explorer/pull/992","diff_url":"https://github.com/mattgodbolt/compiler-explorer/pull/992.diff","patch_url":"https://github.com/mattgodbolt/compiler-explorer/pull/992.patch"},"body":"*This pull request was opened in response to #991*\r\n\r\nI implemented a proof of concept idea for `Source<=>LLVM IR` highlighting just like the one for assembler.\r\nThis PR is not finished but I think it is useful for discussion on how to best implement such functionality.\r\n\r\n*Disclaimer:* I never developed any compiler using LLVM nor do I know LLVM IR. I'd like to have IR highlighting because it makes learning it easier (at least in my opinion). :smiley: \r\n\r\n#### TODO\r\n- [x] parse debug information\r\n- [x] highlight correct lines\r\n- [x] check if it is llvm output\r\n- [x] put \"formatAsm\" function into `lib/utils.js` (as `trimLines()`)\r\n- [x] write (more) tests\r\n- [x] better metadata parsing (i.e. named meta data; handle `, \\\" ...` in strings)\r\n- [x] how to handle nested scopes? => We don't if there is a corresponding line. If a line number is `0`, we check its scope.\r\n- [x] jump to assembly works\r\n- [x] handle compiler properties\r\n  - [x] `maxIrLines`\r\n  - [x] ... (didn't find any more useful properties for LLVM IR)\r\n- [x] handle filters\r\n  - [x] `trim`\r\n  - [x] `commentOnly`\r\n  - [x] ~~labels~~ (wasn't able to find unused labels [as no `<std>` functions, etc. are put in the IR])\r\n  - [x] `directives`"},"comment":{"url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/comments/438179143","html_url":"https://github.com/mattgodbolt/compiler-explorer/pull/992#issuecomment-438179143","issue_url":"https://api.github.com/repos/mattgodbolt/compiler-explorer/issues/992","id":438179143,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODE3OTE0Mw==","user":{"login":"bugwelle","id":1667306,"node_id":"MDQ6VXNlcjE2NjczMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/1667306?v=4","gravatar_id":"","url":"https://api.github.com/users/bugwelle","html_url":"https://github.com/bugwelle","followers_url":"https://api.github.com/users/bugwelle/followers","following_url":"https://api.github.com/users/bugwelle/following{/other_user}","gists_url":"https://api.github.com/users/bugwelle/gists{/gist_id}","starred_url":"https://api.github.com/users/bugwelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugwelle/subscriptions","organizations_url":"https://api.github.com/users/bugwelle/orgs","repos_url":"https://api.github.com/users/bugwelle/repos","events_url":"https://api.github.com/users/bugwelle/events{/privacy}","received_events_url":"https://api.github.com/users/bugwelle/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T08:30:06Z","updated_at":"2018-11-13T08:30:06Z","author_association":"CONTRIBUTOR","body":"> ```\r\n> /home/travis/build/mattgodbolt/compiler-explorer/static/panes/ir-view.js\r\n>   48:9  error  Parsing error: Redefinition of property\r\n> ```\r\n\r\nThanks! I thought that `make lint` was executed by `make test`. Found a minor bug as well. Thanks! :smiley: \r\n"}}
{"actor":{"display_login":"bugwelle"}}