{"action":"created","issue":{"url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/104","labels_url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/104/comments","events_url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/104/events","html_url":"https://github.com/OCamlPro/flambda-task-force/issues/104","id":119949394,"number":104,"title":"Propagate the `[@inlined]` attribute inside inlined stubs","user":{"login":"chambart","id":2196625,"avatar_url":"https://avatars.githubusercontent.com/u/2196625?v=3","gravatar_id":"","url":"https://api.github.com/users/chambart","html_url":"https://github.com/chambart","followers_url":"https://api.github.com/users/chambart/followers","following_url":"https://api.github.com/users/chambart/following{/other_user}","gists_url":"https://api.github.com/users/chambart/gists{/gist_id}","starred_url":"https://api.github.com/users/chambart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chambart/subscriptions","organizations_url":"https://api.github.com/users/chambart/orgs","repos_url":"https://api.github.com/users/chambart/repos","events_url":"https://api.github.com/users/chambart/events{/privacy}","received_events_url":"https://api.github.com/users/chambart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T14:12:42Z","updated_at":"2015-12-02T14:40:15Z","closed_at":null,"body":"In the following example:\r\n```ocaml\r\nlet f (x,y) = ...\r\nlet g x = (f [@inlined]) (x,x)\r\n```\r\nThe `f` function will be split in a stub and a the curried function:\r\n\r\n```ocaml\r\nlet f' x y = ...\r\nlet f (x,y) = f' x y [@@stub]\r\n```\r\n\r\nFor the inlining decision at the call site inside  `g` both the stub and inlined annotation will appear, and the stub will be inlined. But in that case the programmer really meant for the `f'` function to be inlined (the stub is not visible in the sources).\r\n\r\nThe right way to propagate that is probably when this case is encountered (`inline_requested` is `true` and `function_decl.stub` is not `Default_inline`) to rewrite the stub body to annotate the calls with the same inilne annotation."},"comment":{"url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/comments/161318484","html_url":"https://github.com/OCamlPro/flambda-task-force/issues/104#issuecomment-161318484","issue_url":"https://api.github.com/repos/OCamlPro/flambda-task-force/issues/104","id":161318484,"user":{"login":"lpw25","id":2631210,"avatar_url":"https://avatars.githubusercontent.com/u/2631210?v=3","gravatar_id":"","url":"https://api.github.com/users/lpw25","html_url":"https://github.com/lpw25","followers_url":"https://api.github.com/users/lpw25/followers","following_url":"https://api.github.com/users/lpw25/following{/other_user}","gists_url":"https://api.github.com/users/lpw25/gists{/gist_id}","starred_url":"https://api.github.com/users/lpw25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpw25/subscriptions","organizations_url":"https://api.github.com/users/lpw25/orgs","repos_url":"https://api.github.com/users/lpw25/repos","events_url":"https://api.github.com/users/lpw25/events{/privacy}","received_events_url":"https://api.github.com/users/lpw25/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T14:40:15Z","updated_at":"2015-12-02T14:40:15Z","body":"I think this is essentially a duplicate of #86"}}