{"action":"created","issue":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/1579","labels_url":"https://api.github.com/repos/scala-js/scala-js/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/1579/comments","events_url":"https://api.github.com/repos/scala-js/scala-js/issues/1579/events","html_url":"https://github.com/scala-js/scala-js/pull/1579","id":65706593,"number":1579,"title":"Introduce ...rest parameters in the IR.","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-01T15:01:26Z","updated_at":"2015-04-01T23:14:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scala-js/scala-js/pulls/1579","html_url":"https://github.com/scala-js/scala-js/pull/1579","diff_url":"https://github.com/scala-js/scala-js/pull/1579.diff","patch_url":"https://github.com/scala-js/scala-js/pull/1579.patch"},"body":"The magic `arguments` variable is now banned from the IR. It is replaced by its cleaner ES6 replacement: ...rest parameters.\r\n\r\nRest params are only allowed in exported methods and constructors, and only as last parameter. They are desugared into a loop preceding the normal body of the method, copying the elements from `arguments`. But until desugaring, we do not have to deal with it.\r\n\r\nWhen eventually targeting ES6, a rest parameter need not be desugared at all.\r\n\r\nTo preserve backward binary compatibility, a deserialization hack identifies uses of `arguments`, and replaces it by a rest param. All normal parameters are also removed, and replaced by indexed access into the rest parameter."},"comment":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/comments/88660779","html_url":"https://github.com/scala-js/scala-js/pull/1579#issuecomment-88660779","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/1579","id":88660779,"user":{"login":"gzm0","id":1140323,"avatar_url":"https://avatars.githubusercontent.com/u/1140323?v=3","gravatar_id":"","url":"https://api.github.com/users/gzm0","html_url":"https://github.com/gzm0","followers_url":"https://api.github.com/users/gzm0/followers","following_url":"https://api.github.com/users/gzm0/following{/other_user}","gists_url":"https://api.github.com/users/gzm0/gists{/gist_id}","starred_url":"https://api.github.com/users/gzm0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzm0/subscriptions","organizations_url":"https://api.github.com/users/gzm0/orgs","repos_url":"https://api.github.com/users/gzm0/repos","events_url":"https://api.github.com/users/gzm0/events{/privacy}","received_events_url":"https://api.github.com/users/gzm0/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T23:14:30Z","updated_at":"2015-04-01T23:14:30Z","body":"How about solution 3, by implementing and using the `MessageDigest.getInstance` properly:\r\n\r\n- In the Scala.js implementation, throw a `NoSuchAlgorithmException` for everything\r\n- In the `TreeHasher`, only hash if we actually have \"SHA-1\" available"}}