{"action":"created","comment":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/comments/231545786","pull_request_review_id":172538184,"id":231545786,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTU0NTc4Ng==","diff_hunk":"@@ -9069,3 +9069,26 @@ def test_link(self):\n     rval = send (0, thing, 0, 0);\n     return 0;\n }''', '', force_c=True)\n+\n+  # This test verifies that function names embedded into the build with --js-library (JS functions imported to asm.js/wasm)\n+  # are minified when -O3 is used\n+  def test_js_function_imports_are_minified(self):\n+    def check_size(f, expected_size):\n+      if not os.path.isfile(f):\n+        return # Nonexistent file passes in this check\n+      obtained_size = os.path.getsize(f)\n+      print('size of generated ' + f + ': ' + str(obtained_size))\n+      try_delete(f)\n+      assert obtained_size < expected_size\n+\n+    run_process([PYTHON, path_from_root('tests', 'gen_many_js_functions.py'), 'library_long.js', 'main_long.c'])\n+    for wasm in [['-s', 'WASM=0', '--separate-asm']]: # TODO: Add support to Wasm to minify imports, and then add Wasm testing ['-s', 'WASM=1'] to this list\n+      for closure in [['--closure', '1']]: # Currently we rely on Closure for good minification of the JS function names. TODO: Add minification also for non-Closure users and add [] to this list to test minification without Closure.","path":"tests/test_other.py","position":18,"original_position":18,"commit_id":"11fbf1f0fd818361743a249ab3345f92d6d0e782","original_commit_id":"e82cb86c834d34e7ec788f71bdcc92730e2f1a4c","user":{"login":"juj","id":225351,"node_id":"MDQ6VXNlcjIyNTM1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/225351?v=4","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"body":"Previously tailing comments have been fine, can flake warn about these if that is now a mandated style thing?","created_at":"2018-11-07T15:16:10Z","updated_at":"2018-11-07T15:16:10Z","html_url":"https://github.com/kripken/emscripten/pull/7452#discussion_r231545786","pull_request_url":"https://api.github.com/repos/kripken/emscripten/pulls/7452","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/comments/231545786"},"html":{"href":"https://github.com/kripken/emscripten/pull/7452#discussion_r231545786"},"pull_request":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/7452"}},"in_reply_to_id":231215000},"pull_request":{"url":"https://api.github.com/repos/kripken/emscripten/pulls/7452","id":228358471,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MzU4NDcx","html_url":"https://github.com/kripken/emscripten/pull/7452","diff_url":"https://github.com/kripken/emscripten/pull/7452.diff","patch_url":"https://github.com/kripken/emscripten/pull/7452.patch","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/7452","number":7452,"state":"open","locked":false,"title":"Minify asmjs module imports","user":{"login":"juj","id":225351,"node_id":"MDQ6VXNlcjIyNTM1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/225351?v=4","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"body":"This minifies JS function imports to asm.js, using same minification scheme as in https://github.com/WebAssembly/binaryen/pull/1719/files#diff-402f63d949f69ca3feb553dcda0a5f26R44 .\r\n\r\nAlso this PR contains the same test from #7414, adjusted to pass for this case, so closing that PR.","created_at":"2018-11-05T13:49:30Z","updated_at":"2018-11-07T15:16:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ec270defb490147833fa15e22c7f68ef77eadf9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":116999301,"node_id":"MDU6TGFiZWwxMTY5OTkzMDE=","url":"https://api.github.com/repos/kripken/emscripten/labels/performance","name":"performance","color":"8f45f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kripken/emscripten/pulls/7452/commits","review_comments_url":"https://api.github.com/repos/kripken/emscripten/pulls/7452/comments","review_comment_url":"https://api.github.com/repos/kripken/emscripten/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/7452/comments","statuses_url":"https://api.github.com/repos/kripken/emscripten/statuses/11fbf1f0fd818361743a249ab3345f92d6d0e782","head":{"label":"juj:minify_asmjs_module_imports","ref":"minify_asmjs_module_imports","sha":"11fbf1f0fd818361743a249ab3345f92d6d0e782","user":{"login":"juj","id":225351,"node_id":"MDQ6VXNlcjIyNTM1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/225351?v=4","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"repo":{"id":4149606,"node_id":"MDEwOlJlcG9zaXRvcnk0MTQ5NjA2","name":"emscripten","full_name":"juj/emscripten","private":false,"owner":{"login":"juj","id":225351,"node_id":"MDQ6VXNlcjIyNTM1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/225351?v=4","gravatar_id":"","url":"https://api.github.com/users/juj","html_url":"https://github.com/juj","followers_url":"https://api.github.com/users/juj/followers","following_url":"https://api.github.com/users/juj/following{/other_user}","gists_url":"https://api.github.com/users/juj/gists{/gist_id}","starred_url":"https://api.github.com/users/juj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juj/subscriptions","organizations_url":"https://api.github.com/users/juj/orgs","repos_url":"https://api.github.com/users/juj/repos","events_url":"https://api.github.com/users/juj/events{/privacy}","received_events_url":"https://api.github.com/users/juj/received_events","type":"User","site_admin":false},"html_url":"https://github.com/juj/emscripten","description":"Emscripten: An LLVM-to-JavaScript Compiler","fork":true,"url":"https://api.github.com/repos/juj/emscripten","forks_url":"https://api.github.com/repos/juj/emscripten/forks","keys_url":"https://api.github.com/repos/juj/emscripten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juj/emscripten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juj/emscripten/teams","hooks_url":"https://api.github.com/repos/juj/emscripten/hooks","issue_events_url":"https://api.github.com/repos/juj/emscripten/issues/events{/number}","events_url":"https://api.github.com/repos/juj/emscripten/events","assignees_url":"https://api.github.com/repos/juj/emscripten/assignees{/user}","branches_url":"https://api.github.com/repos/juj/emscripten/branches{/branch}","tags_url":"https://api.github.com/repos/juj/emscripten/tags","blobs_url":"https://api.github.com/repos/juj/emscripten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juj/emscripten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juj/emscripten/git/refs{/sha}","trees_url":"https://api.github.com/repos/juj/emscripten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juj/emscripten/statuses/{sha}","languages_url":"https://api.github.com/repos/juj/emscripten/languages","stargazers_url":"https://api.github.com/repos/juj/emscripten/stargazers","contributors_url":"https://api.github.com/repos/juj/emscripten/contributors","subscribers_url":"https://api.github.com/repos/juj/emscripten/subscribers","subscription_url":"https://api.github.com/repos/juj/emscripten/subscription","commits_url":"https://api.github.com/repos/juj/emscripten/commits{/sha}","git_commits_url":"https://api.github.com/repos/juj/emscripten/git/commits{/sha}","comments_url":"https://api.github.com/repos/juj/emscripten/comments{/number}","issue_comment_url":"https://api.github.com/repos/juj/emscripten/issues/comments{/number}","contents_url":"https://api.github.com/repos/juj/emscripten/contents/{+path}","compare_url":"https://api.github.com/repos/juj/emscripten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juj/emscripten/merges","archive_url":"https://api.github.com/repos/juj/emscripten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juj/emscripten/downloads","issues_url":"https://api.github.com/repos/juj/emscripten/issues{/number}","pulls_url":"https://api.github.com/repos/juj/emscripten/pulls{/number}","milestones_url":"https://api.github.com/repos/juj/emscripten/milestones{/number}","notifications_url":"https://api.github.com/repos/juj/emscripten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juj/emscripten/labels{/name}","releases_url":"https://api.github.com/repos/juj/emscripten/releases{/id}","deployments_url":"https://api.github.com/repos/juj/emscripten/deployments","created_at":"2012-04-26T16:19:07Z","updated_at":"2018-08-22T09:20:19Z","pushed_at":"2018-11-07T08:21:17Z","git_url":"git://github.com/juj/emscripten.git","ssh_url":"git@github.com:juj/emscripten.git","clone_url":"https://github.com/juj/emscripten.git","svn_url":"https://github.com/juj/emscripten","homepage":"","size":164208,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","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":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":5,"default_branch":"master"}},"base":{"label":"kripken:incoming","ref":"incoming","sha":"527cb9ba551cfbff970d479266a5cf0694c93abc","user":{"login":"kripken","id":173661,"node_id":"MDQ6VXNlcjE3MzY2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/173661?v=4","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"repo":{"id":1357796,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU3Nzk2","name":"emscripten","full_name":"kripken/emscripten","private":false,"owner":{"login":"kripken","id":173661,"node_id":"MDQ6VXNlcjE3MzY2MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/173661?v=4","gravatar_id":"","url":"https://api.github.com/users/kripken","html_url":"https://github.com/kripken","followers_url":"https://api.github.com/users/kripken/followers","following_url":"https://api.github.com/users/kripken/following{/other_user}","gists_url":"https://api.github.com/users/kripken/gists{/gist_id}","starred_url":"https://api.github.com/users/kripken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kripken/subscriptions","organizations_url":"https://api.github.com/users/kripken/orgs","repos_url":"https://api.github.com/users/kripken/repos","events_url":"https://api.github.com/users/kripken/events{/privacy}","received_events_url":"https://api.github.com/users/kripken/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kripken/emscripten","description":"Emscripten: An LLVM-to-JavaScript Compiler","fork":false,"url":"https://api.github.com/repos/kripken/emscripten","forks_url":"https://api.github.com/repos/kripken/emscripten/forks","keys_url":"https://api.github.com/repos/kripken/emscripten/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kripken/emscripten/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kripken/emscripten/teams","hooks_url":"https://api.github.com/repos/kripken/emscripten/hooks","issue_events_url":"https://api.github.com/repos/kripken/emscripten/issues/events{/number}","events_url":"https://api.github.com/repos/kripken/emscripten/events","assignees_url":"https://api.github.com/repos/kripken/emscripten/assignees{/user}","branches_url":"https://api.github.com/repos/kripken/emscripten/branches{/branch}","tags_url":"https://api.github.com/repos/kripken/emscripten/tags","blobs_url":"https://api.github.com/repos/kripken/emscripten/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kripken/emscripten/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kripken/emscripten/git/refs{/sha}","trees_url":"https://api.github.com/repos/kripken/emscripten/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kripken/emscripten/statuses/{sha}","languages_url":"https://api.github.com/repos/kripken/emscripten/languages","stargazers_url":"https://api.github.com/repos/kripken/emscripten/stargazers","contributors_url":"https://api.github.com/repos/kripken/emscripten/contributors","subscribers_url":"https://api.github.com/repos/kripken/emscripten/subscribers","subscription_url":"https://api.github.com/repos/kripken/emscripten/subscription","commits_url":"https://api.github.com/repos/kripken/emscripten/commits{/sha}","git_commits_url":"https://api.github.com/repos/kripken/emscripten/git/commits{/sha}","comments_url":"https://api.github.com/repos/kripken/emscripten/comments{/number}","issue_comment_url":"https://api.github.com/repos/kripken/emscripten/issues/comments{/number}","contents_url":"https://api.github.com/repos/kripken/emscripten/contents/{+path}","compare_url":"https://api.github.com/repos/kripken/emscripten/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kripken/emscripten/merges","archive_url":"https://api.github.com/repos/kripken/emscripten/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kripken/emscripten/downloads","issues_url":"https://api.github.com/repos/kripken/emscripten/issues{/number}","pulls_url":"https://api.github.com/repos/kripken/emscripten/pulls{/number}","milestones_url":"https://api.github.com/repos/kripken/emscripten/milestones{/number}","notifications_url":"https://api.github.com/repos/kripken/emscripten/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kripken/emscripten/labels{/name}","releases_url":"https://api.github.com/repos/kripken/emscripten/releases{/id}","deployments_url":"https://api.github.com/repos/kripken/emscripten/deployments","created_at":"2011-02-12T05:23:30Z","updated_at":"2018-11-07T14:57:19Z","pushed_at":"2018-11-07T15:04:11Z","git_url":"git://github.com/kripken/emscripten.git","ssh_url":"git@github.com:kripken/emscripten.git","clone_url":"https://github.com/kripken/emscripten.git","svn_url":"https://github.com/kripken/emscripten","homepage":"","size":167823,"stargazers_count":15847,"watchers_count":15847,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1859,"mirror_url":null,"archived":false,"open_issues_count":1610,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1859,"open_issues":1610,"watchers":15847,"default_branch":"incoming"}},"_links":{"self":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/7452"},"html":{"href":"https://github.com/kripken/emscripten/pull/7452"},"issue":{"href":"https://api.github.com/repos/kripken/emscripten/issues/7452"},"comments":{"href":"https://api.github.com/repos/kripken/emscripten/issues/7452/comments"},"review_comments":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/7452/comments"},"review_comment":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kripken/emscripten/pulls/7452/commits"},"statuses":{"href":"https://api.github.com/repos/kripken/emscripten/statuses/11fbf1f0fd818361743a249ab3345f92d6d0e782"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"juj"}}