{"action":"created","comment":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments/96140513","pull_request_review_id":16716833,"id":96140513,"diff_hunk":"@@ -1117,10 +1134,11 @@ merge(Compressor.prototype, {\n             throw def;\n         });\n         def(AST_Dot, function(compressor){\n-            if (compressor.option(\"unsafe\") && this.property == \"length\") {\n-                var str = ev(this.expression, compressor);\n-                if (typeof str == \"string\")\n-                    return str.length;\n+            if (compressor.option(\"unsafe\")) {\n+                var val = ev(this.expression, compressor);\n+                if (HOP(val, this.property)) {","path":"lib/compress.js","position":null,"original_position":50,"commit_id":"b363786d8b5b7d815197e56b68eebd8058cfcc9b","original_commit_id":"1da5a176114837cd91075a355c25704d8cab90b0","user":{"login":"alexlamsl","id":1898413,"avatar_url":"https://avatars.githubusercontent.com/u/1898413?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlamsl","html_url":"https://github.com/alexlamsl","followers_url":"https://api.github.com/users/alexlamsl/followers","following_url":"https://api.github.com/users/alexlamsl/following{/other_user}","gists_url":"https://api.github.com/users/alexlamsl/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlamsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlamsl/subscriptions","organizations_url":"https://api.github.com/users/alexlamsl/orgs","repos_url":"https://api.github.com/users/alexlamsl/repos","events_url":"https://api.github.com/users/alexlamsl/events{/privacy}","received_events_url":"https://api.github.com/users/alexlamsl/received_events","type":"User","site_admin":false},"body":"@kzc done in https://github.com/mishoo/UglifyJS2/pull/1425/commits/b363786d8b5b7d815197e56b68eebd8058cfcc9b - thanks!","created_at":"2017-01-15T15:46:07Z","updated_at":"2017-01-15T15:46:08Z","html_url":"https://github.com/mishoo/UglifyJS2/pull/1425#discussion_r96140513","pull_request_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425","_links":{"self":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments/96140513"},"html":{"href":"https://github.com/mishoo/UglifyJS2/pull/1425#discussion_r96140513"},"pull_request":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425"}}},"pull_request":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425","id":101591793,"html_url":"https://github.com/mishoo/UglifyJS2/pull/1425","diff_url":"https://github.com/mishoo/UglifyJS2/pull/1425.diff","patch_url":"https://github.com/mishoo/UglifyJS2/pull/1425.patch","issue_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1425","number":1425,"state":"open","locked":false,"title":"augment evaluate to extract within objects","user":{"login":"alexlamsl","id":1898413,"avatar_url":"https://avatars.githubusercontent.com/u/1898413?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlamsl","html_url":"https://github.com/alexlamsl","followers_url":"https://api.github.com/users/alexlamsl/followers","following_url":"https://api.github.com/users/alexlamsl/following{/other_user}","gists_url":"https://api.github.com/users/alexlamsl/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlamsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlamsl/subscriptions","organizations_url":"https://api.github.com/users/alexlamsl/orgs","repos_url":"https://api.github.com/users/alexlamsl/repos","events_url":"https://api.github.com/users/alexlamsl/events{/privacy}","received_events_url":"https://api.github.com/users/alexlamsl/received_events","type":"User","site_admin":false},"body":"This replaces and extends the existing `\"string\".length => 6` optimisation, and is also hidden behind `unsafe` compress option flag.\r\n\r\nBasically this enables `evaluate` to navigate into object property on a best effort basis, and bails out if the final form isn't constant.\r\n\r\nAllows for constants hidden inside configuration objects to propagate, which is often encountered in the field. Does not address #1416 directly but may form part of the final solution.","created_at":"2017-01-15T10:46:49Z","updated_at":"2017-01-15T15:46:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6d17889ca94e7651da40d9db4e6dd8392b1d7f4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425/commits","review_comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425/comments","review_comment_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1425/comments","statuses_url":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/b363786d8b5b7d815197e56b68eebd8058cfcc9b","head":{"label":"alexlamsl:unsafe-evaluate","ref":"unsafe-evaluate","sha":"b363786d8b5b7d815197e56b68eebd8058cfcc9b","user":{"login":"alexlamsl","id":1898413,"avatar_url":"https://avatars.githubusercontent.com/u/1898413?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlamsl","html_url":"https://github.com/alexlamsl","followers_url":"https://api.github.com/users/alexlamsl/followers","following_url":"https://api.github.com/users/alexlamsl/following{/other_user}","gists_url":"https://api.github.com/users/alexlamsl/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlamsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlamsl/subscriptions","organizations_url":"https://api.github.com/users/alexlamsl/orgs","repos_url":"https://api.github.com/users/alexlamsl/repos","events_url":"https://api.github.com/users/alexlamsl/events{/privacy}","received_events_url":"https://api.github.com/users/alexlamsl/received_events","type":"User","site_admin":false},"repo":{"id":79024614,"name":"UglifyJS2","full_name":"alexlamsl/UglifyJS2","owner":{"login":"alexlamsl","id":1898413,"avatar_url":"https://avatars.githubusercontent.com/u/1898413?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlamsl","html_url":"https://github.com/alexlamsl","followers_url":"https://api.github.com/users/alexlamsl/followers","following_url":"https://api.github.com/users/alexlamsl/following{/other_user}","gists_url":"https://api.github.com/users/alexlamsl/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlamsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlamsl/subscriptions","organizations_url":"https://api.github.com/users/alexlamsl/orgs","repos_url":"https://api.github.com/users/alexlamsl/repos","events_url":"https://api.github.com/users/alexlamsl/events{/privacy}","received_events_url":"https://api.github.com/users/alexlamsl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexlamsl/UglifyJS2","description":" JavaScript parser / mangler / compressor / beautifier toolkit","fork":true,"url":"https://api.github.com/repos/alexlamsl/UglifyJS2","forks_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/forks","keys_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/teams","hooks_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/hooks","issue_events_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/issues/events{/number}","events_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/events","assignees_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/assignees{/user}","branches_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/branches{/branch}","tags_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/tags","blobs_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/statuses/{sha}","languages_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/languages","stargazers_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/stargazers","contributors_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/contributors","subscribers_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/subscribers","subscription_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/subscription","commits_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/contents/{+path}","compare_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/merges","archive_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/downloads","issues_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/issues{/number}","pulls_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/pulls{/number}","milestones_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/milestones{/number}","notifications_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/labels{/name}","releases_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/releases{/id}","deployments_url":"https://api.github.com/repos/alexlamsl/UglifyJS2/deployments","created_at":"2017-01-15T10:31:17Z","updated_at":"2017-01-15T10:31:20Z","pushed_at":"2017-01-15T15:28:57Z","git_url":"git://github.com/alexlamsl/UglifyJS2.git","ssh_url":"git@github.com:alexlamsl/UglifyJS2.git","clone_url":"https://github.com/alexlamsl/UglifyJS2.git","svn_url":"https://github.com/alexlamsl/UglifyJS2","homepage":"http://lisperator.net/uglifyjs/","size":2352,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mishoo:master","ref":"master","sha":"5c7705fcada66f35878427d620a194ad9d2f2918","user":{"login":"mishoo","id":334725,"avatar_url":"https://avatars.githubusercontent.com/u/334725?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoo","html_url":"https://github.com/mishoo","followers_url":"https://api.github.com/users/mishoo/followers","following_url":"https://api.github.com/users/mishoo/following{/other_user}","gists_url":"https://api.github.com/users/mishoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoo/subscriptions","organizations_url":"https://api.github.com/users/mishoo/orgs","repos_url":"https://api.github.com/users/mishoo/repos","events_url":"https://api.github.com/users/mishoo/events{/privacy}","received_events_url":"https://api.github.com/users/mishoo/received_events","type":"User","site_admin":false},"repo":{"id":5569059,"name":"UglifyJS2","full_name":"mishoo/UglifyJS2","owner":{"login":"mishoo","id":334725,"avatar_url":"https://avatars.githubusercontent.com/u/334725?v=3","gravatar_id":"","url":"https://api.github.com/users/mishoo","html_url":"https://github.com/mishoo","followers_url":"https://api.github.com/users/mishoo/followers","following_url":"https://api.github.com/users/mishoo/following{/other_user}","gists_url":"https://api.github.com/users/mishoo/gists{/gist_id}","starred_url":"https://api.github.com/users/mishoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mishoo/subscriptions","organizations_url":"https://api.github.com/users/mishoo/orgs","repos_url":"https://api.github.com/users/mishoo/repos","events_url":"https://api.github.com/users/mishoo/events{/privacy}","received_events_url":"https://api.github.com/users/mishoo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mishoo/UglifyJS2","description":" JavaScript parser / mangler / compressor / beautifier toolkit","fork":false,"url":"https://api.github.com/repos/mishoo/UglifyJS2","forks_url":"https://api.github.com/repos/mishoo/UglifyJS2/forks","keys_url":"https://api.github.com/repos/mishoo/UglifyJS2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mishoo/UglifyJS2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mishoo/UglifyJS2/teams","hooks_url":"https://api.github.com/repos/mishoo/UglifyJS2/hooks","issue_events_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/events{/number}","events_url":"https://api.github.com/repos/mishoo/UglifyJS2/events","assignees_url":"https://api.github.com/repos/mishoo/UglifyJS2/assignees{/user}","branches_url":"https://api.github.com/repos/mishoo/UglifyJS2/branches{/branch}","tags_url":"https://api.github.com/repos/mishoo/UglifyJS2/tags","blobs_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/refs{/sha}","trees_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/{sha}","languages_url":"https://api.github.com/repos/mishoo/UglifyJS2/languages","stargazers_url":"https://api.github.com/repos/mishoo/UglifyJS2/stargazers","contributors_url":"https://api.github.com/repos/mishoo/UglifyJS2/contributors","subscribers_url":"https://api.github.com/repos/mishoo/UglifyJS2/subscribers","subscription_url":"https://api.github.com/repos/mishoo/UglifyJS2/subscription","commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/commits{/sha}","git_commits_url":"https://api.github.com/repos/mishoo/UglifyJS2/git/commits{/sha}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/comments{/number}","issue_comment_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/comments{/number}","contents_url":"https://api.github.com/repos/mishoo/UglifyJS2/contents/{+path}","compare_url":"https://api.github.com/repos/mishoo/UglifyJS2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mishoo/UglifyJS2/merges","archive_url":"https://api.github.com/repos/mishoo/UglifyJS2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mishoo/UglifyJS2/downloads","issues_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues{/number}","pulls_url":"https://api.github.com/repos/mishoo/UglifyJS2/pulls{/number}","milestones_url":"https://api.github.com/repos/mishoo/UglifyJS2/milestones{/number}","notifications_url":"https://api.github.com/repos/mishoo/UglifyJS2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mishoo/UglifyJS2/labels{/name}","releases_url":"https://api.github.com/repos/mishoo/UglifyJS2/releases{/id}","deployments_url":"https://api.github.com/repos/mishoo/UglifyJS2/deployments","created_at":"2012-08-27T09:31:03Z","updated_at":"2017-01-15T10:46:54Z","pushed_at":"2017-01-15T15:29:00Z","git_url":"git://github.com/mishoo/UglifyJS2.git","ssh_url":"git@github.com:mishoo/UglifyJS2.git","clone_url":"https://github.com/mishoo/UglifyJS2.git","svn_url":"https://github.com/mishoo/UglifyJS2","homepage":"http://lisperator.net/uglifyjs/","size":4128,"stargazers_count":5857,"watchers_count":5857,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":662,"mirror_url":null,"open_issues_count":307,"forks":662,"open_issues":307,"watchers":5857,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425"},"html":{"href":"https://github.com/mishoo/UglifyJS2/pull/1425"},"issue":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1425"},"comments":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/issues/1425/comments"},"review_comments":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425/comments"},"review_comment":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/pulls/1425/commits"},"statuses":{"href":"https://api.github.com/repos/mishoo/UglifyJS2/statuses/b363786d8b5b7d815197e56b68eebd8058cfcc9b"}}}}
{"actor":{"display_login":"alexlamsl"}}