{"action":"created","comment":{"url":"https://api.github.com/repos/WebAssembly/spec/pulls/comments/52233518","id":52233518,"diff_hunk":"@@ -313,12 +313,18 @@ let add_export funcs ex =\n \n let init m imports host =\n   assert (List.length imports = List.length m.it.Kernel.imports);\n-  let {memory; funcs; exports; _} = m.it in\n-  {module_ = m;\n-   imports;\n-   exports = List.fold_right (add_export funcs) exports ExportMap.empty;\n-   memory = Lib.Option.map init_memory memory;\n-   host}\n+  let {memory; funcs; exports; start; _} = m.it in\n+  let instance =\n+    {module_ = m;\n+     imports;\n+     exports = List.fold_right (add_export funcs) exports ExportMap.empty;\n+     memory = Lib.Option.map init_memory memory;\n+     host}\n+  in\n+  ignore (match start with","path":"ml-proto/spec/eval.ml","position":18,"original_position":18,"commit_id":"d2f516b0b10c1db6d011d57738922f9524b04561","original_commit_id":"d2f516b0b10c1db6d011d57738922f9524b04561","user":{"login":"rossberg-chromium","id":4247099,"avatar_url":"https://avatars.githubusercontent.com/u/4247099?v=3","gravatar_id":"","url":"https://api.github.com/users/rossberg-chromium","html_url":"https://github.com/rossberg-chromium","followers_url":"https://api.github.com/users/rossberg-chromium/followers","following_url":"https://api.github.com/users/rossberg-chromium/following{/other_user}","gists_url":"https://api.github.com/users/rossberg-chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/rossberg-chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossberg-chromium/subscriptions","organizations_url":"https://api.github.com/users/rossberg-chromium/orgs","repos_url":"https://api.github.com/users/rossberg-chromium/repos","events_url":"https://api.github.com/users/rossberg-chromium/events{/privacy}","received_events_url":"https://api.github.com/users/rossberg-chromium/received_events","type":"User","site_admin":false},"body":"Yes. In fact, you can also simplify the whole thing to\r\n```\r\nLib.Option.app (fun x -> ignore (eval_func instance (lookup \"function\" funcs x) []) start;\r\n```","created_at":"2016-02-08T22:04:43Z","updated_at":"2016-02-08T22:04:43Z","html_url":"https://github.com/WebAssembly/spec/pull/236#discussion_r52233518","pull_request_url":"https://api.github.com/repos/WebAssembly/spec/pulls/236","_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/comments/52233518"},"html":{"href":"https://github.com/WebAssembly/spec/pull/236#discussion_r52233518"},"pull_request":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/WebAssembly/spec/pulls/236","id":58488237,"html_url":"https://github.com/WebAssembly/spec/pull/236","diff_url":"https://github.com/WebAssembly/spec/pull/236.diff","patch_url":"https://github.com/WebAssembly/spec/pull/236.patch","issue_url":"https://api.github.com/repos/WebAssembly/spec/issues/236","number":236,"state":"open","locked":false,"title":" Support start, add testcase, and can be executed properly","user":{"login":"haxxpop","id":631508,"avatar_url":"https://avatars.githubusercontent.com/u/631508?v=3","gravatar_id":"","url":"https://api.github.com/users/haxxpop","html_url":"https://github.com/haxxpop","followers_url":"https://api.github.com/users/haxxpop/followers","following_url":"https://api.github.com/users/haxxpop/following{/other_user}","gists_url":"https://api.github.com/users/haxxpop/gists{/gist_id}","starred_url":"https://api.github.com/users/haxxpop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haxxpop/subscriptions","organizations_url":"https://api.github.com/users/haxxpop/orgs","repos_url":"https://api.github.com/users/haxxpop/repos","events_url":"https://api.github.com/users/haxxpop/events{/privacy}","received_events_url":"https://api.github.com/users/haxxpop/received_events","type":"User","site_admin":false},"body":"The following is the list of what I have done to add start functionality\r\n\r\n- I have changed the Ast module and Kernel module to include the start function index.\r\n- Have the start function run as soon as the module is loaded.\r\n- In the print_module function in host/print.ml, I have added the start function to be the output to the screen\r\n- Add test/start.wast to test the start function\r\n\r\nPlease consider if we should add this feature to the main repo","created_at":"2016-02-05T21:40:42Z","updated_at":"2016-02-08T22:04:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c54d461806babcf54c66909c2df944cd1751f4d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WebAssembly/spec/pulls/236/commits","review_comments_url":"https://api.github.com/repos/WebAssembly/spec/pulls/236/comments","review_comment_url":"https://api.github.com/repos/WebAssembly/spec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WebAssembly/spec/issues/236/comments","statuses_url":"https://api.github.com/repos/WebAssembly/spec/statuses/d2f516b0b10c1db6d011d57738922f9524b04561","head":{"label":"haxxpop:master","ref":"master","sha":"d2f516b0b10c1db6d011d57738922f9524b04561","user":{"login":"haxxpop","id":631508,"avatar_url":"https://avatars.githubusercontent.com/u/631508?v=3","gravatar_id":"","url":"https://api.github.com/users/haxxpop","html_url":"https://github.com/haxxpop","followers_url":"https://api.github.com/users/haxxpop/followers","following_url":"https://api.github.com/users/haxxpop/following{/other_user}","gists_url":"https://api.github.com/users/haxxpop/gists{/gist_id}","starred_url":"https://api.github.com/users/haxxpop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haxxpop/subscriptions","organizations_url":"https://api.github.com/users/haxxpop/orgs","repos_url":"https://api.github.com/users/haxxpop/repos","events_url":"https://api.github.com/users/haxxpop/events{/privacy}","received_events_url":"https://api.github.com/users/haxxpop/received_events","type":"User","site_admin":false},"repo":{"id":51162408,"name":"spec","full_name":"haxxpop/spec","owner":{"login":"haxxpop","id":631508,"avatar_url":"https://avatars.githubusercontent.com/u/631508?v=3","gravatar_id":"","url":"https://api.github.com/users/haxxpop","html_url":"https://github.com/haxxpop","followers_url":"https://api.github.com/users/haxxpop/followers","following_url":"https://api.github.com/users/haxxpop/following{/other_user}","gists_url":"https://api.github.com/users/haxxpop/gists{/gist_id}","starred_url":"https://api.github.com/users/haxxpop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haxxpop/subscriptions","organizations_url":"https://api.github.com/users/haxxpop/orgs","repos_url":"https://api.github.com/users/haxxpop/repos","events_url":"https://api.github.com/users/haxxpop/events{/privacy}","received_events_url":"https://api.github.com/users/haxxpop/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haxxpop/spec","description":"Staging ground for artifacts related to an MVP spec","fork":true,"url":"https://api.github.com/repos/haxxpop/spec","forks_url":"https://api.github.com/repos/haxxpop/spec/forks","keys_url":"https://api.github.com/repos/haxxpop/spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haxxpop/spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haxxpop/spec/teams","hooks_url":"https://api.github.com/repos/haxxpop/spec/hooks","issue_events_url":"https://api.github.com/repos/haxxpop/spec/issues/events{/number}","events_url":"https://api.github.com/repos/haxxpop/spec/events","assignees_url":"https://api.github.com/repos/haxxpop/spec/assignees{/user}","branches_url":"https://api.github.com/repos/haxxpop/spec/branches{/branch}","tags_url":"https://api.github.com/repos/haxxpop/spec/tags","blobs_url":"https://api.github.com/repos/haxxpop/spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haxxpop/spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haxxpop/spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/haxxpop/spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haxxpop/spec/statuses/{sha}","languages_url":"https://api.github.com/repos/haxxpop/spec/languages","stargazers_url":"https://api.github.com/repos/haxxpop/spec/stargazers","contributors_url":"https://api.github.com/repos/haxxpop/spec/contributors","subscribers_url":"https://api.github.com/repos/haxxpop/spec/subscribers","subscription_url":"https://api.github.com/repos/haxxpop/spec/subscription","commits_url":"https://api.github.com/repos/haxxpop/spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/haxxpop/spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/haxxpop/spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/haxxpop/spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/haxxpop/spec/contents/{+path}","compare_url":"https://api.github.com/repos/haxxpop/spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haxxpop/spec/merges","archive_url":"https://api.github.com/repos/haxxpop/spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haxxpop/spec/downloads","issues_url":"https://api.github.com/repos/haxxpop/spec/issues{/number}","pulls_url":"https://api.github.com/repos/haxxpop/spec/pulls{/number}","milestones_url":"https://api.github.com/repos/haxxpop/spec/milestones{/number}","notifications_url":"https://api.github.com/repos/haxxpop/spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haxxpop/spec/labels{/name}","releases_url":"https://api.github.com/repos/haxxpop/spec/releases{/id}","deployments_url":"https://api.github.com/repos/haxxpop/spec/deployments","created_at":"2016-02-05T17:27:55Z","updated_at":"2016-02-05T17:27:56Z","pushed_at":"2016-02-05T21:37:04Z","git_url":"git://github.com/haxxpop/spec.git","ssh_url":"git@github.com:haxxpop/spec.git","clone_url":"https://github.com/haxxpop/spec.git","svn_url":"https://github.com/haxxpop/spec","homepage":"http://webassembly.github.io/","size":802,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WebAssembly:master","ref":"master","sha":"50ed5eb1d2b70bed109cf68f47fbfc557b5a0bee","user":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"repo":{"id":40598815,"name":"spec","full_name":"WebAssembly/spec","owner":{"login":"WebAssembly","id":11578470,"avatar_url":"https://avatars.githubusercontent.com/u/11578470?v=3","gravatar_id":"","url":"https://api.github.com/users/WebAssembly","html_url":"https://github.com/WebAssembly","followers_url":"https://api.github.com/users/WebAssembly/followers","following_url":"https://api.github.com/users/WebAssembly/following{/other_user}","gists_url":"https://api.github.com/users/WebAssembly/gists{/gist_id}","starred_url":"https://api.github.com/users/WebAssembly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WebAssembly/subscriptions","organizations_url":"https://api.github.com/users/WebAssembly/orgs","repos_url":"https://api.github.com/users/WebAssembly/repos","events_url":"https://api.github.com/users/WebAssembly/events{/privacy}","received_events_url":"https://api.github.com/users/WebAssembly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WebAssembly/spec","description":"Staging ground for artifacts related to an MVP spec","fork":false,"url":"https://api.github.com/repos/WebAssembly/spec","forks_url":"https://api.github.com/repos/WebAssembly/spec/forks","keys_url":"https://api.github.com/repos/WebAssembly/spec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WebAssembly/spec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WebAssembly/spec/teams","hooks_url":"https://api.github.com/repos/WebAssembly/spec/hooks","issue_events_url":"https://api.github.com/repos/WebAssembly/spec/issues/events{/number}","events_url":"https://api.github.com/repos/WebAssembly/spec/events","assignees_url":"https://api.github.com/repos/WebAssembly/spec/assignees{/user}","branches_url":"https://api.github.com/repos/WebAssembly/spec/branches{/branch}","tags_url":"https://api.github.com/repos/WebAssembly/spec/tags","blobs_url":"https://api.github.com/repos/WebAssembly/spec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WebAssembly/spec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WebAssembly/spec/git/refs{/sha}","trees_url":"https://api.github.com/repos/WebAssembly/spec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WebAssembly/spec/statuses/{sha}","languages_url":"https://api.github.com/repos/WebAssembly/spec/languages","stargazers_url":"https://api.github.com/repos/WebAssembly/spec/stargazers","contributors_url":"https://api.github.com/repos/WebAssembly/spec/contributors","subscribers_url":"https://api.github.com/repos/WebAssembly/spec/subscribers","subscription_url":"https://api.github.com/repos/WebAssembly/spec/subscription","commits_url":"https://api.github.com/repos/WebAssembly/spec/commits{/sha}","git_commits_url":"https://api.github.com/repos/WebAssembly/spec/git/commits{/sha}","comments_url":"https://api.github.com/repos/WebAssembly/spec/comments{/number}","issue_comment_url":"https://api.github.com/repos/WebAssembly/spec/issues/comments{/number}","contents_url":"https://api.github.com/repos/WebAssembly/spec/contents/{+path}","compare_url":"https://api.github.com/repos/WebAssembly/spec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WebAssembly/spec/merges","archive_url":"https://api.github.com/repos/WebAssembly/spec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WebAssembly/spec/downloads","issues_url":"https://api.github.com/repos/WebAssembly/spec/issues{/number}","pulls_url":"https://api.github.com/repos/WebAssembly/spec/pulls{/number}","milestones_url":"https://api.github.com/repos/WebAssembly/spec/milestones{/number}","notifications_url":"https://api.github.com/repos/WebAssembly/spec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WebAssembly/spec/labels{/name}","releases_url":"https://api.github.com/repos/WebAssembly/spec/releases{/id}","deployments_url":"https://api.github.com/repos/WebAssembly/spec/deployments","created_at":"2015-08-12T12:15:16Z","updated_at":"2016-02-06T01:23:27Z","pushed_at":"2016-02-08T18:50:31Z","git_url":"git://github.com/WebAssembly/spec.git","ssh_url":"git@github.com:WebAssembly/spec.git","clone_url":"https://github.com/WebAssembly/spec.git","svn_url":"https://github.com/WebAssembly/spec","homepage":"http://webassembly.github.io/","size":910,"stargazers_count":156,"watchers_count":156,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":34,"forks":30,"open_issues":34,"watchers":156,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/236"},"html":{"href":"https://github.com/WebAssembly/spec/pull/236"},"issue":{"href":"https://api.github.com/repos/WebAssembly/spec/issues/236"},"comments":{"href":"https://api.github.com/repos/WebAssembly/spec/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WebAssembly/spec/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/WebAssembly/spec/statuses/d2f516b0b10c1db6d011d57738922f9524b04561"}}}}