{"action":"created","comment":{"url":"https://api.github.com/repos/nitlang/nit/pulls/comments/42309796","id":42309796,"diff_hunk":"@@ -272,6 +272,12 @@ class HashMap[K, V]\n \t\tenlarge(0)\n \tend\n \n+\t# Build a list filled with the items of `coll`.\n+\tinit from(coll: Map[K, V]) do\n+\t\tinit\n+\t\tfor k, v in coll do self[k] = v\n+\tend","path":"lib/core/collection/hash_collection.nit","position":8,"original_position":8,"commit_id":"80dda30f0284b5959280f3ed8f5b1054e885afe4","original_commit_id":"80dda30f0284b5959280f3ed8f5b1054e885afe4","user":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"body":"`Map::recover_with` does the loop part.\r\n\r\nhttps://github.com/nitlang/nit/blob/master/lib/core/collection/abstract_collection.nit#L677","created_at":"2015-10-17T14:35:39Z","updated_at":"2015-10-17T14:35:39Z","html_url":"https://github.com/nitlang/nit/pull/1764#discussion_r42309796","pull_request_url":"https://api.github.com/repos/nitlang/nit/pulls/1764","_links":{"self":{"href":"https://api.github.com/repos/nitlang/nit/pulls/comments/42309796"},"html":{"href":"https://github.com/nitlang/nit/pull/1764#discussion_r42309796"},"pull_request":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1764"}}},"pull_request":{"url":"https://api.github.com/repos/nitlang/nit/pulls/1764","id":47977740,"html_url":"https://github.com/nitlang/nit/pull/1764","diff_url":"https://github.com/nitlang/nit/pull/1764.diff","patch_url":"https://github.com/nitlang/nit/pull/1764.patch","issue_url":"https://api.github.com/repos/nitlang/nit/issues/1764","number":1764,"state":"open","locked":false,"title":"src: introduce Nit Static Analysis Framework","user":{"login":"Morriar","id":583144,"avatar_url":"https://avatars.githubusercontent.com/u/583144?v=3","gravatar_id":"","url":"https://api.github.com/users/Morriar","html_url":"https://github.com/Morriar","followers_url":"https://api.github.com/users/Morriar/followers","following_url":"https://api.github.com/users/Morriar/following{/other_user}","gists_url":"https://api.github.com/users/Morriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Morriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morriar/subscriptions","organizations_url":"https://api.github.com/users/Morriar/orgs","repos_url":"https://api.github.com/users/Morriar/repos","events_url":"https://api.github.com/users/Morriar/events{/privacy}","received_events_url":"https://api.github.com/users/Morriar/received_events","type":"User","site_admin":false},"body":"This is the first step in the introduction of a static analsysis framework for the nit language.\r\n\r\nThis PR introduces the basic behaviors of a StaticAnalysis and ForwardAnalysis.\r\nI added ReachingDefAnalysis as an example of StaticAnalysis implementation.\r\nI also added `nitsaf`, a client example for the saf module.\r\n\r\nI suggest to read this PR commit by commit, I splat it in steps:\r\n* introduce base services\r\n* handle ifs constructs\r\n* handle loops constructs\r\n* handle method declaration\r\n\r\nNext steps/PRs will be:\r\n* introduce inter-procedural analysis\r\n* use RTA for better inter-procedural analysis precision\r\n* backward analysis\r\n* add more analysis (isset checks, attr isset, unused properties, useless nullables...)\r\n\r\nCloses #511.\r\n","created_at":"2015-10-17T02:59:53Z","updated_at":"2015-10-17T14:35:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ea5ffd2dc88867f808c909388122cc4f1b95e5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nitlang/nit/pulls/1764/commits","review_comments_url":"https://api.github.com/repos/nitlang/nit/pulls/1764/comments","review_comment_url":"https://api.github.com/repos/nitlang/nit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nitlang/nit/issues/1764/comments","statuses_url":"https://api.github.com/repos/nitlang/nit/statuses/80dda30f0284b5959280f3ed8f5b1054e885afe4","head":{"label":"Morriar:nitsaf","ref":"nitsaf","sha":"80dda30f0284b5959280f3ed8f5b1054e885afe4","user":{"login":"Morriar","id":583144,"avatar_url":"https://avatars.githubusercontent.com/u/583144?v=3","gravatar_id":"","url":"https://api.github.com/users/Morriar","html_url":"https://github.com/Morriar","followers_url":"https://api.github.com/users/Morriar/followers","following_url":"https://api.github.com/users/Morriar/following{/other_user}","gists_url":"https://api.github.com/users/Morriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Morriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morriar/subscriptions","organizations_url":"https://api.github.com/users/Morriar/orgs","repos_url":"https://api.github.com/users/Morriar/repos","events_url":"https://api.github.com/users/Morriar/events{/privacy}","received_events_url":"https://api.github.com/users/Morriar/received_events","type":"User","site_admin":false},"repo":{"id":1456691,"name":"nit","full_name":"Morriar/nit","owner":{"login":"Morriar","id":583144,"avatar_url":"https://avatars.githubusercontent.com/u/583144?v=3","gravatar_id":"","url":"https://api.github.com/users/Morriar","html_url":"https://github.com/Morriar","followers_url":"https://api.github.com/users/Morriar/followers","following_url":"https://api.github.com/users/Morriar/following{/other_user}","gists_url":"https://api.github.com/users/Morriar/gists{/gist_id}","starred_url":"https://api.github.com/users/Morriar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morriar/subscriptions","organizations_url":"https://api.github.com/users/Morriar/orgs","repos_url":"https://api.github.com/users/Morriar/repos","events_url":"https://api.github.com/users/Morriar/events{/privacy}","received_events_url":"https://api.github.com/users/Morriar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Morriar/nit","description":"Nit language","fork":true,"url":"https://api.github.com/repos/Morriar/nit","forks_url":"https://api.github.com/repos/Morriar/nit/forks","keys_url":"https://api.github.com/repos/Morriar/nit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Morriar/nit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Morriar/nit/teams","hooks_url":"https://api.github.com/repos/Morriar/nit/hooks","issue_events_url":"https://api.github.com/repos/Morriar/nit/issues/events{/number}","events_url":"https://api.github.com/repos/Morriar/nit/events","assignees_url":"https://api.github.com/repos/Morriar/nit/assignees{/user}","branches_url":"https://api.github.com/repos/Morriar/nit/branches{/branch}","tags_url":"https://api.github.com/repos/Morriar/nit/tags","blobs_url":"https://api.github.com/repos/Morriar/nit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Morriar/nit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Morriar/nit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Morriar/nit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Morriar/nit/statuses/{sha}","languages_url":"https://api.github.com/repos/Morriar/nit/languages","stargazers_url":"https://api.github.com/repos/Morriar/nit/stargazers","contributors_url":"https://api.github.com/repos/Morriar/nit/contributors","subscribers_url":"https://api.github.com/repos/Morriar/nit/subscribers","subscription_url":"https://api.github.com/repos/Morriar/nit/subscription","commits_url":"https://api.github.com/repos/Morriar/nit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Morriar/nit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Morriar/nit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Morriar/nit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Morriar/nit/contents/{+path}","compare_url":"https://api.github.com/repos/Morriar/nit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Morriar/nit/merges","archive_url":"https://api.github.com/repos/Morriar/nit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Morriar/nit/downloads","issues_url":"https://api.github.com/repos/Morriar/nit/issues{/number}","pulls_url":"https://api.github.com/repos/Morriar/nit/pulls{/number}","milestones_url":"https://api.github.com/repos/Morriar/nit/milestones{/number}","notifications_url":"https://api.github.com/repos/Morriar/nit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Morriar/nit/labels{/name}","releases_url":"https://api.github.com/repos/Morriar/nit/releases{/id}","created_at":"2011-03-08T22:16:33Z","updated_at":"2015-06-06T03:02:03Z","pushed_at":"2015-10-17T03:05:15Z","git_url":"git://github.com/Morriar/nit.git","ssh_url":"git@github.com:Morriar/nit.git","clone_url":"https://github.com/Morriar/nit.git","svn_url":"https://github.com/Morriar/nit","homepage":"http://nitlanguage.org","size":76158,"stargazers_count":3,"watchers_count":3,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":16,"forks":2,"open_issues":16,"watchers":3,"default_branch":"master"}},"base":{"label":"nitlang:master","ref":"master","sha":"801b7228a5046ec5751d9b93e3d2655a38970427","user":{"login":"nitlang","id":5420298,"avatar_url":"https://avatars.githubusercontent.com/u/5420298?v=3","gravatar_id":"","url":"https://api.github.com/users/nitlang","html_url":"https://github.com/nitlang","followers_url":"https://api.github.com/users/nitlang/followers","following_url":"https://api.github.com/users/nitlang/following{/other_user}","gists_url":"https://api.github.com/users/nitlang/gists{/gist_id}","starred_url":"https://api.github.com/users/nitlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitlang/subscriptions","organizations_url":"https://api.github.com/users/nitlang/orgs","repos_url":"https://api.github.com/users/nitlang/repos","events_url":"https://api.github.com/users/nitlang/events{/privacy}","received_events_url":"https://api.github.com/users/nitlang/received_events","type":"Organization","site_admin":false},"repo":{"id":328597,"name":"nit","full_name":"nitlang/nit","owner":{"login":"nitlang","id":5420298,"avatar_url":"https://avatars.githubusercontent.com/u/5420298?v=3","gravatar_id":"","url":"https://api.github.com/users/nitlang","html_url":"https://github.com/nitlang","followers_url":"https://api.github.com/users/nitlang/followers","following_url":"https://api.github.com/users/nitlang/following{/other_user}","gists_url":"https://api.github.com/users/nitlang/gists{/gist_id}","starred_url":"https://api.github.com/users/nitlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitlang/subscriptions","organizations_url":"https://api.github.com/users/nitlang/orgs","repos_url":"https://api.github.com/users/nitlang/repos","events_url":"https://api.github.com/users/nitlang/events{/privacy}","received_events_url":"https://api.github.com/users/nitlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nitlang/nit","description":"Nit language","fork":false,"url":"https://api.github.com/repos/nitlang/nit","forks_url":"https://api.github.com/repos/nitlang/nit/forks","keys_url":"https://api.github.com/repos/nitlang/nit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nitlang/nit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nitlang/nit/teams","hooks_url":"https://api.github.com/repos/nitlang/nit/hooks","issue_events_url":"https://api.github.com/repos/nitlang/nit/issues/events{/number}","events_url":"https://api.github.com/repos/nitlang/nit/events","assignees_url":"https://api.github.com/repos/nitlang/nit/assignees{/user}","branches_url":"https://api.github.com/repos/nitlang/nit/branches{/branch}","tags_url":"https://api.github.com/repos/nitlang/nit/tags","blobs_url":"https://api.github.com/repos/nitlang/nit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nitlang/nit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nitlang/nit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nitlang/nit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nitlang/nit/statuses/{sha}","languages_url":"https://api.github.com/repos/nitlang/nit/languages","stargazers_url":"https://api.github.com/repos/nitlang/nit/stargazers","contributors_url":"https://api.github.com/repos/nitlang/nit/contributors","subscribers_url":"https://api.github.com/repos/nitlang/nit/subscribers","subscription_url":"https://api.github.com/repos/nitlang/nit/subscription","commits_url":"https://api.github.com/repos/nitlang/nit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nitlang/nit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nitlang/nit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nitlang/nit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nitlang/nit/contents/{+path}","compare_url":"https://api.github.com/repos/nitlang/nit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nitlang/nit/merges","archive_url":"https://api.github.com/repos/nitlang/nit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nitlang/nit/downloads","issues_url":"https://api.github.com/repos/nitlang/nit/issues{/number}","pulls_url":"https://api.github.com/repos/nitlang/nit/pulls{/number}","milestones_url":"https://api.github.com/repos/nitlang/nit/milestones{/number}","notifications_url":"https://api.github.com/repos/nitlang/nit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nitlang/nit/labels{/name}","releases_url":"https://api.github.com/repos/nitlang/nit/releases{/id}","created_at":"2009-10-06T15:03:00Z","updated_at":"2015-10-13T20:01:54Z","pushed_at":"2015-10-17T14:24:57Z","git_url":"git://github.com/nitlang/nit.git","ssh_url":"git@github.com:nitlang/nit.git","clone_url":"https://github.com/nitlang/nit.git","svn_url":"https://github.com/nitlang/nit","homepage":"http://nitlanguage.org","size":100478,"stargazers_count":79,"watchers_count":79,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":44,"mirror_url":null,"open_issues_count":118,"forks":44,"open_issues":118,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1764"},"html":{"href":"https://github.com/nitlang/nit/pull/1764"},"issue":{"href":"https://api.github.com/repos/nitlang/nit/issues/1764"},"comments":{"href":"https://api.github.com/repos/nitlang/nit/issues/1764/comments"},"review_comments":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1764/comments"},"review_comment":{"href":"https://api.github.com/repos/nitlang/nit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nitlang/nit/pulls/1764/commits"},"statuses":{"href":"https://api.github.com/repos/nitlang/nit/statuses/80dda30f0284b5959280f3ed8f5b1054e885afe4"}}}}