{"action":"created","comment":{"url":"https://api.github.com/repos/rchain/rchain/pulls/comments/157862588","pull_request_review_id":84575944,"id":157862588,"diff_hunk":"@@ -161,7 +161,7 @@ static const char *rcsid =\n  * but allows patterns to get big without disasters.\n  */\n #define OP(p) (*(p))\n-#define NEXT(p) (((*((p) + 1) & 0377) << 8) + *((p) + 2) & 0377)\n+#define NEXT(p) ((((*((p) + 1) & 0377) << 8) + *((p) + 2)) & 0377)","path":"rosette/src/regexp.cc","position":5,"original_position":5,"commit_id":"53f67bfd8614e258954d96fa1254d9378595f0fd","original_commit_id":"adb08035541365ea4c55cfc886a811adc8c340fe","user":{"login":"kjmcqueen","id":34141841,"avatar_url":"https://avatars3.githubusercontent.com/u/34141841?v=4","gravatar_id":"","url":"https://api.github.com/users/kjmcqueen","html_url":"https://github.com/kjmcqueen","followers_url":"https://api.github.com/users/kjmcqueen/followers","following_url":"https://api.github.com/users/kjmcqueen/following{/other_user}","gists_url":"https://api.github.com/users/kjmcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmcqueen/subscriptions","organizations_url":"https://api.github.com/users/kjmcqueen/orgs","repos_url":"https://api.github.com/users/kjmcqueen/repos","events_url":"https://api.github.com/users/kjmcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/kjmcqueen/received_events","type":"User","site_admin":false},"body":"I think I got the parens I added here wrong. I will fix that.\r\n\r\nWhat it appears to do is assemble a 16 bit value from two 8 bit values. The order is interesting as it seems to be doing it in big-endian order. Also interesting is that it does this using the two bytes that lie 1 byte past the point p. I know p is a byte pointer because the only user of this macro invokes it with a char*. \r\n\r\nso:\r\n\r\nskip p[0]            (regexp opcode)\r\nMSB = p[1]         (next pointer MSB)\r\nLSB = p[2]          (next pointer LSB)\r\n\r\nWORD16 = MSB<<8 + LSB\r\n\r\nComment in the code:\r\n     A node is one char of opcode followed by two chars of \"next\" pointer.\r\n     \"Next\" pointers are stored as two 8-bit pieces, high order first.  The\r\n     value is a positive offset from the opcode of the node containing it.\r\n     An operand, if any, simply follows the node.  (Note that much of the\r\n     code generation knows about this implicit relationship.)\r\n\r\n     Using two bytes for the \"next\" pointer is vast overkill for most things,\r\n     but allows patterns to get big without disasters.\r\n\r\n\r\nThis is only used in one place, near line 1054 in regnext() in regexp.cc.\r\n\r\nSide note: regexp.cc is a 1993 implementation of a regular expression parser. Would it make sense to abandon it in lieu of a standard implementation? The only use I can see of this regular expression parser is as a primitive \"regexpCompare\". This in turn is called two places in apropos.rbl. It is not mentioned in the Rosette manual.\r\n","created_at":"2017-12-19T20:10:26Z","updated_at":"2017-12-19T20:10:26Z","html_url":"https://github.com/rchain/rchain/pull/98#discussion_r157862588","pull_request_url":"https://api.github.com/repos/rchain/rchain/pulls/98","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments/157862588"},"html":{"href":"https://github.com/rchain/rchain/pull/98#discussion_r157862588"},"pull_request":{"href":"https://api.github.com/repos/rchain/rchain/pulls/98"}},"in_reply_to_id":157576470},"pull_request":{"url":"https://api.github.com/repos/rchain/rchain/pulls/98","id":158956043,"html_url":"https://github.com/rchain/rchain/pull/98","diff_url":"https://github.com/rchain/rchain/pull/98.diff","patch_url":"https://github.com/rchain/rchain/pull/98.patch","issue_url":"https://api.github.com/repos/rchain/rchain/issues/98","number":98,"state":"open","locked":false,"title":"Clean up additional warnings.","user":{"login":"kjmcqueen","id":34141841,"avatar_url":"https://avatars3.githubusercontent.com/u/34141841?v=4","gravatar_id":"","url":"https://api.github.com/users/kjmcqueen","html_url":"https://github.com/kjmcqueen","followers_url":"https://api.github.com/users/kjmcqueen/followers","following_url":"https://api.github.com/users/kjmcqueen/following{/other_user}","gists_url":"https://api.github.com/users/kjmcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmcqueen/subscriptions","organizations_url":"https://api.github.com/users/kjmcqueen/orgs","repos_url":"https://api.github.com/users/kjmcqueen/repos","events_url":"https://api.github.com/users/kjmcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/kjmcqueen/received_events","type":"User","site_admin":false},"body":"    The VM now builds cleanly with -Wall enabled. However I have explicitly\r\n    disabled 7 warning types that will require significant code refactoring\r\n    and/or increased understanding of the internals of the VM.\r\n\r\nUsing -Wall with some warnings overridden for now:\r\n -Wno-write-strings\t\t\t\tUntil we can deal with the use of char* n = \"FooBar\"; type of constructs\r\n -Wno-invalid-offsetof\t\t\tUntil a better understanding of nested macro usage is had\r\n -Wno-delete-incomplete\t\t\tUntil a better understand of the weird use of pointers and memory management in the code is had\r\n -Wno-deprecated-declarations\t\tUntil we can refactor to remove the deprecated behaviors\r\n -Wno-unused-variables\t\t\tUntil a better understanding of nested macro usage is had\r\n -Wno-sign-compare\t\t\t\tUntil a better understanding of nested macro usage is had\r\n -Wno-init-self                      Until I understand why he's doing this and why removing it breaks things\r\n\r\n The plan is to eventually compile with -Wall and -Werror\r\n\r\n    The VM seems to run and loads boot.rbl with only one warning.\r\n\r\nhttps://rchain.atlassian.net/browse/ROS-291\r\n\r\nhttps://rchain.atlassian.net/browse/ROS-292\r\n\r\n","created_at":"2017-12-18T16:18:24Z","updated_at":"2017-12-19T20:10:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"102ca369abc0d037397c40bb7e176378d8ae1a48","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kirkwood","id":1438807,"avatar_url":"https://avatars2.githubusercontent.com/u/1438807?v=4","gravatar_id":"","url":"https://api.github.com/users/kirkwood","html_url":"https://github.com/kirkwood","followers_url":"https://api.github.com/users/kirkwood/followers","following_url":"https://api.github.com/users/kirkwood/following{/other_user}","gists_url":"https://api.github.com/users/kirkwood/gists{/gist_id}","starred_url":"https://api.github.com/users/kirkwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirkwood/subscriptions","organizations_url":"https://api.github.com/users/kirkwood/orgs","repos_url":"https://api.github.com/users/kirkwood/repos","events_url":"https://api.github.com/users/kirkwood/events{/privacy}","received_events_url":"https://api.github.com/users/kirkwood/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rchain/rchain/pulls/98/commits","review_comments_url":"https://api.github.com/repos/rchain/rchain/pulls/98/comments","review_comment_url":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rchain/rchain/issues/98/comments","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/53f67bfd8614e258954d96fa1254d9378595f0fd","head":{"label":"kjmcqueen:ROS-291-292","ref":"ROS-291-292","sha":"53f67bfd8614e258954d96fa1254d9378595f0fd","user":{"login":"kjmcqueen","id":34141841,"avatar_url":"https://avatars3.githubusercontent.com/u/34141841?v=4","gravatar_id":"","url":"https://api.github.com/users/kjmcqueen","html_url":"https://github.com/kjmcqueen","followers_url":"https://api.github.com/users/kjmcqueen/followers","following_url":"https://api.github.com/users/kjmcqueen/following{/other_user}","gists_url":"https://api.github.com/users/kjmcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmcqueen/subscriptions","organizations_url":"https://api.github.com/users/kjmcqueen/orgs","repos_url":"https://api.github.com/users/kjmcqueen/repos","events_url":"https://api.github.com/users/kjmcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/kjmcqueen/received_events","type":"User","site_admin":false},"repo":{"id":113370989,"name":"rchain","full_name":"kjmcqueen/rchain","owner":{"login":"kjmcqueen","id":34141841,"avatar_url":"https://avatars3.githubusercontent.com/u/34141841?v=4","gravatar_id":"","url":"https://api.github.com/users/kjmcqueen","html_url":"https://github.com/kjmcqueen","followers_url":"https://api.github.com/users/kjmcqueen/followers","following_url":"https://api.github.com/users/kjmcqueen/following{/other_user}","gists_url":"https://api.github.com/users/kjmcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/kjmcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjmcqueen/subscriptions","organizations_url":"https://api.github.com/users/kjmcqueen/orgs","repos_url":"https://api.github.com/users/kjmcqueen/repos","events_url":"https://api.github.com/users/kjmcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/kjmcqueen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kjmcqueen/rchain","description":null,"fork":true,"url":"https://api.github.com/repos/kjmcqueen/rchain","forks_url":"https://api.github.com/repos/kjmcqueen/rchain/forks","keys_url":"https://api.github.com/repos/kjmcqueen/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kjmcqueen/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kjmcqueen/rchain/teams","hooks_url":"https://api.github.com/repos/kjmcqueen/rchain/hooks","issue_events_url":"https://api.github.com/repos/kjmcqueen/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/kjmcqueen/rchain/events","assignees_url":"https://api.github.com/repos/kjmcqueen/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/kjmcqueen/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/kjmcqueen/rchain/tags","blobs_url":"https://api.github.com/repos/kjmcqueen/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kjmcqueen/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kjmcqueen/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/kjmcqueen/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kjmcqueen/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/kjmcqueen/rchain/languages","stargazers_url":"https://api.github.com/repos/kjmcqueen/rchain/stargazers","contributors_url":"https://api.github.com/repos/kjmcqueen/rchain/contributors","subscribers_url":"https://api.github.com/repos/kjmcqueen/rchain/subscribers","subscription_url":"https://api.github.com/repos/kjmcqueen/rchain/subscription","commits_url":"https://api.github.com/repos/kjmcqueen/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/kjmcqueen/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/kjmcqueen/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/kjmcqueen/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/kjmcqueen/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/kjmcqueen/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kjmcqueen/rchain/merges","archive_url":"https://api.github.com/repos/kjmcqueen/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kjmcqueen/rchain/downloads","issues_url":"https://api.github.com/repos/kjmcqueen/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/kjmcqueen/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/kjmcqueen/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/kjmcqueen/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kjmcqueen/rchain/labels{/name}","releases_url":"https://api.github.com/repos/kjmcqueen/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/kjmcqueen/rchain/deployments","created_at":"2017-12-06T21:51:50Z","updated_at":"2017-12-06T21:51:53Z","pushed_at":"2017-12-18T18:58:20Z","git_url":"git://github.com/kjmcqueen/rchain.git","ssh_url":"git@github.com:kjmcqueen/rchain.git","clone_url":"https://github.com/kjmcqueen/rchain.git","svn_url":"https://github.com/kjmcqueen/rchain","homepage":null,"size":4914,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rchain:dev","ref":"dev","sha":"9c4ce8c3141edeea367333ac6a39548cc7b1d4df","user":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"repo":{"id":84493691,"name":"rchain","full_name":"rchain/rchain","owner":{"login":"rchain","id":20671765,"avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rchain/rchain","description":null,"fork":false,"url":"https://api.github.com/repos/rchain/rchain","forks_url":"https://api.github.com/repos/rchain/rchain/forks","keys_url":"https://api.github.com/repos/rchain/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchain/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchain/rchain/teams","hooks_url":"https://api.github.com/repos/rchain/rchain/hooks","issue_events_url":"https://api.github.com/repos/rchain/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rchain/rchain/events","assignees_url":"https://api.github.com/repos/rchain/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rchain/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rchain/rchain/tags","blobs_url":"https://api.github.com/repos/rchain/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchain/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchain/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchain/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rchain/rchain/languages","stargazers_url":"https://api.github.com/repos/rchain/rchain/stargazers","contributors_url":"https://api.github.com/repos/rchain/rchain/contributors","subscribers_url":"https://api.github.com/repos/rchain/rchain/subscribers","subscription_url":"https://api.github.com/repos/rchain/rchain/subscription","commits_url":"https://api.github.com/repos/rchain/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchain/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchain/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchain/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchain/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rchain/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchain/rchain/merges","archive_url":"https://api.github.com/repos/rchain/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchain/rchain/downloads","issues_url":"https://api.github.com/repos/rchain/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rchain/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rchain/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rchain/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchain/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rchain/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rchain/rchain/deployments","created_at":"2017-03-09T22:15:35Z","updated_at":"2017-12-19T17:25:04Z","pushed_at":"2017-12-19T18:50:19Z","git_url":"git://github.com/rchain/rchain.git","ssh_url":"git@github.com:rchain/rchain.git","clone_url":"https://github.com/rchain/rchain.git","svn_url":"https://github.com/rchain/rchain","homepage":null,"size":4974,"stargazers_count":29,"watchers_count":29,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":20,"open_issues":5,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/98"},"html":{"href":"https://github.com/rchain/rchain/pull/98"},"issue":{"href":"https://api.github.com/repos/rchain/rchain/issues/98"},"comments":{"href":"https://api.github.com/repos/rchain/rchain/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/rchain/rchain/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rchain/rchain/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/rchain/rchain/statuses/53f67bfd8614e258954d96fa1254d9378595f0fd"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kjmcqueen"}}