{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/2451","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/2451/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/2451/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/2451/events","html_url":"https://github.com/facebook/prepack/issues/2451","id":352204107,"node_id":"MDU6SXNzdWUzNTIyMDQxMDc=","number":2451,"title":"Reject aliasing in Array operators","user":{"login":"sb98052","id":205478,"node_id":"MDQ6VXNlcjIwNTQ3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/205478?v=4","gravatar_id":"","url":"https://api.github.com/users/sb98052","html_url":"https://github.com/sb98052","followers_url":"https://api.github.com/users/sb98052/followers","following_url":"https://api.github.com/users/sb98052/following{/other_user}","gists_url":"https://api.github.com/users/sb98052/gists{/gist_id}","starred_url":"https://api.github.com/users/sb98052/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb98052/subscriptions","organizations_url":"https://api.github.com/users/sb98052/orgs","repos_url":"https://api.github.com/users/sb98052/repos","events_url":"https://api.github.com/users/sb98052/events{/privacy}","received_events_url":"https://api.github.com/users/sb98052/received_events","type":"User","site_admin":false},"labels":[{"id":825225404,"node_id":"MDU6TGFiZWw4MjUyMjU0MDQ=","url":"https://api.github.com/repos/facebook/prepack/labels/Instant%20Render","name":"Instant Render","color":"5319e7","default":false},{"id":1014624078,"node_id":"MDU6TGFiZWwxMDE0NjI0MDc4","url":"https://api.github.com/repos/facebook/prepack/labels/leaked%20values","name":"leaked values","color":"B0511A","default":false}],"state":"open","locked":false,"assignee":{"login":"sb98052","id":205478,"node_id":"MDQ6VXNlcjIwNTQ3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/205478?v=4","gravatar_id":"","url":"https://api.github.com/users/sb98052","html_url":"https://github.com/sb98052","followers_url":"https://api.github.com/users/sb98052/followers","following_url":"https://api.github.com/users/sb98052/following{/other_user}","gists_url":"https://api.github.com/users/sb98052/gists{/gist_id}","starred_url":"https://api.github.com/users/sb98052/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb98052/subscriptions","organizations_url":"https://api.github.com/users/sb98052/orgs","repos_url":"https://api.github.com/users/sb98052/repos","events_url":"https://api.github.com/users/sb98052/events{/privacy}","received_events_url":"https://api.github.com/users/sb98052/received_events","type":"User","site_admin":false},"assignees":[{"login":"sb98052","id":205478,"node_id":"MDQ6VXNlcjIwNTQ3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/205478?v=4","gravatar_id":"","url":"https://api.github.com/users/sb98052","html_url":"https://github.com/sb98052","followers_url":"https://api.github.com/users/sb98052/followers","following_url":"https://api.github.com/users/sb98052/following{/other_user}","gists_url":"https://api.github.com/users/sb98052/gists{/gist_id}","starred_url":"https://api.github.com/users/sb98052/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb98052/subscriptions","organizations_url":"https://api.github.com/users/sb98052/orgs","repos_url":"https://api.github.com/users/sb98052/repos","events_url":"https://api.github.com/users/sb98052/events{/privacy}","received_events_url":"https://api.github.com/users/sb98052/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-20T16:16:12Z","updated_at":"2018-08-21T10:45:47Z","closed_at":null,"author_association":"NONE","body":"It is desirable, in the case of nested Array operators, to not all-out leak. The contents of the array that are operated upon are leaked on creation. This leaves objects in the environment to deal with. The proposal here is to make all objects transitively reachable via reads to the bindings of optimized array ops \"final\" so that they are never used again. This solution is not general, but it is easier than the solution proposed in #2449.\r\n\r\nThe cases to reject include the `this` binding. \r\n\r\n```js\r\nfunction f(c) {\r\n    var arr = Array.from(c);\r\n    \r\n    let a = {foo:1};\r\n\tfunction op(o) {\r\n\t\treturn a;\r\n\t}\r\n    \r\n    let mapped = arr.map(op);\r\n    mapped[0] = 2;\r\n    let x = a.foo;\r\n    return x;\r\n}\r\n\r\nglobal.__optimize && __optimize(f);\r\n\r\ninspect = () => {\r\n  return f([{foo:42}]);\r\n};\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/prepack/issues/comments/414632335","html_url":"https://github.com/facebook/prepack/issues/2451#issuecomment-414632335","issue_url":"https://api.github.com/repos/facebook/prepack/issues/2451","id":414632335,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDYzMjMzNQ==","user":{"login":"sb98052","id":205478,"node_id":"MDQ6VXNlcjIwNTQ3OA==","avatar_url":"https://avatars0.githubusercontent.com/u/205478?v=4","gravatar_id":"","url":"https://api.github.com/users/sb98052","html_url":"https://github.com/sb98052","followers_url":"https://api.github.com/users/sb98052/followers","following_url":"https://api.github.com/users/sb98052/following{/other_user}","gists_url":"https://api.github.com/users/sb98052/gists{/gist_id}","starred_url":"https://api.github.com/users/sb98052/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb98052/subscriptions","organizations_url":"https://api.github.com/users/sb98052/orgs","repos_url":"https://api.github.com/users/sb98052/repos","events_url":"https://api.github.com/users/sb98052/events{/privacy}","received_events_url":"https://api.github.com/users/sb98052/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T10:45:47Z","updated_at":"2018-08-21T10:45:47Z","author_association":"NONE","body":"Oh, I should have been more precise - we don't have to reject the `this` binding - just take it into account when rejecting aliasing effects. So if you use alias up `this` to the contents of the array or other non-local objects, then it leads to the same issues."}}
{"actor":{"display_login":"sb98052"}}