{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/prepack/issues/2195","repository_url":"https://api.github.com/repos/facebook/prepack","labels_url":"https://api.github.com/repos/facebook/prepack/issues/2195/labels{/name}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/2195/comments","events_url":"https://api.github.com/repos/facebook/prepack/issues/2195/events","html_url":"https://github.com/facebook/prepack/pull/2195","id":337603016,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NzQ0MDQ5","number":2195,"title":"Support injection of residual statements. Support dynamic invariants.","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":279345275,"node_id":"MDU6TGFiZWwyNzkzNDUyNzU=","url":"https://api.github.com/repos/facebook/prepack/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-02T17:30:24Z","updated_at":"2018-07-03T18:35:02Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/facebook/prepack/pulls/2195","html_url":"https://github.com/facebook/prepack/pull/2195","diff_url":"https://github.com/facebook/prepack/pull/2195.diff","patch_url":"https://github.com/facebook/prepack/pull/2195.patch"},"body":"Release notes: Support dynamic invariants via __assume\r\n\r\nResolves #2171. Implements an __assume primitive that injects dynamic invariants into the code. \r\n\r\nSource:\r\n```js\r\nx = __abstract(\"number\", \"5\");\r\n__invariant(x==5, \"x should be 5\");\r\n```\r\n\r\nGenerated:\r\n```js\r\n(function () {\r\n  var _$0 = this;\r\n  var _0 = 5;\r\n  _$0.x = _0;\r\n\r\n  var _1 = _0 == 5;\r\n  if (!_1) {\r\n    throw new Error(\"x should be 5\");\r\n  }\r\n}).call(this);\r\n```"},"comment":{"url":"https://api.github.com/repos/facebook/prepack/issues/comments/402253508","html_url":"https://github.com/facebook/prepack/pull/2195#issuecomment-402253508","issue_url":"https://api.github.com/repos/facebook/prepack/issues/2195","id":402253508,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjI1MzUwOA==","user":{"login":"NTillmann","id":6457462,"node_id":"MDQ6VXNlcjY0NTc0NjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6457462?v=4","gravatar_id":"","url":"https://api.github.com/users/NTillmann","html_url":"https://github.com/NTillmann","followers_url":"https://api.github.com/users/NTillmann/followers","following_url":"https://api.github.com/users/NTillmann/following{/other_user}","gists_url":"https://api.github.com/users/NTillmann/gists{/gist_id}","starred_url":"https://api.github.com/users/NTillmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTillmann/subscriptions","organizations_url":"https://api.github.com/users/NTillmann/orgs","repos_url":"https://api.github.com/users/NTillmann/repos","events_url":"https://api.github.com/users/NTillmann/events{/privacy}","received_events_url":"https://api.github.com/users/NTillmann/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T18:35:02Z","updated_at":"2018-07-03T18:35:02Z","author_association":"CONTRIBUTOR","body":"Interesting how this feature developed...\r\n\r\nSome more thoughts:\r\n- Feels like we should also have `__assert` now for symmetry (and to test simplifier?)\r\n- The conditional-throwing-code-generation should probably be conditional depending on the --invariantLevel.\r\n- Should an infeasible assumption really raise a fatal error, or just throw an `InfeasiblePathError`? I feel like it should be the latter."}}
{"actor":{"display_login":"NTillmann"}}