{"action":"created","issue":{"url":"https://api.github.com/repos/6to5/6to5/issues/721","labels_url":"https://api.github.com/repos/6to5/6to5/issues/721/labels{/name}","comments_url":"https://api.github.com/repos/6to5/6to5/issues/721/comments","events_url":"https://api.github.com/repos/6to5/6to5/issues/721/events","html_url":"https://github.com/6to5/6to5/pull/721","id":56947072,"number":721,"title":"Do not attempt nested TCO","user":{"login":"peferron","id":7009852,"avatar_url":"https://avatars.githubusercontent.com/u/7009852?v=3","gravatar_id":"","url":"https://api.github.com/users/peferron","html_url":"https://github.com/peferron","followers_url":"https://api.github.com/users/peferron/followers","following_url":"https://api.github.com/users/peferron/following{/other_user}","gists_url":"https://api.github.com/users/peferron/gists{/gist_id}","starred_url":"https://api.github.com/users/peferron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peferron/subscriptions","organizations_url":"https://api.github.com/users/peferron/orgs","repos_url":"https://api.github.com/users/peferron/repos","events_url":"https://api.github.com/users/peferron/events{/privacy}","received_events_url":"https://api.github.com/users/peferron/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-08T10:38:20Z","updated_at":"2015-02-08T11:44:03Z","closed_at":"2015-02-08T11:19:34Z","pull_request":{"url":"https://api.github.com/repos/6to5/6to5/pulls/721","html_url":"https://github.com/6to5/6to5/pull/721","diff_url":"https://github.com/6to5/6to5/pull/721.diff","patch_url":"https://github.com/6to5/6to5/pull/721.patch"},"body":"With v3.5.0 and v3.5.1, The following snippet throws when executed with `6to5-node`, but not with `6to5-node --blacklist es6.tailCall`:\r\n\r\n```javascript\r\nfunction foo() {\r\n  return \"foo\";\r\n}\r\n\r\nfunction fooWrapper() {\r\n  return foo();\r\n}\r\n\r\nfunction test() {\r\n  var str = fooWrapper();\r\n  if (str !== \"foo\") {\r\n    throw new Error();\r\n  }\r\n}\r\n\r\nfunction testWrapper() {\r\n  return test();\r\n}\r\n\r\ntestWrapper();\r\n```\r\n\r\nI have submitted a very simple change to fix the issue. There might be a more optimized way to do it, and I didn't add tests because I had trouble getting them to run (first time attempting to contribute to 6to5), however breaking valid code is an urgent issue so I just went ahead and created this pull request. I just saw that a few minutes ago 3.5.2 completely disabled TCO, so I guess it's not urgent anymore. :)\r\n\r\nIf you want me to add tests I'll be happy to work a bit more on it tomorrow.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/6to5/6to5/issues/comments/73407436","html_url":"https://github.com/6to5/6to5/pull/721#issuecomment-73407436","issue_url":"https://api.github.com/repos/6to5/6to5/issues/721","id":73407436,"user":{"login":"sebmck","id":853712,"avatar_url":"https://avatars.githubusercontent.com/u/853712?v=3","gravatar_id":"","url":"https://api.github.com/users/sebmck","html_url":"https://github.com/sebmck","followers_url":"https://api.github.com/users/sebmck/followers","following_url":"https://api.github.com/users/sebmck/following{/other_user}","gists_url":"https://api.github.com/users/sebmck/gists{/gist_id}","starred_url":"https://api.github.com/users/sebmck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebmck/subscriptions","organizations_url":"https://api.github.com/users/sebmck/orgs","repos_url":"https://api.github.com/users/sebmck/repos","events_url":"https://api.github.com/users/sebmck/events{/privacy}","received_events_url":"https://api.github.com/users/sebmck/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T11:44:03Z","updated_at":"2015-02-08T11:44:03Z","body":"@peferron Yeah, if it's implemented beyond self-recursion in the future it'll be behind an optional transformer. Definently not comfortable with adding significant perf impact. Lesson learnt, definently going to hold back in the future with these kind of signifcant changes until they can be vetted more thoroughly."}}