{"action":"closed","number":230,"pull_request":{"url":"https://api.github.com/repos/tildeio/glimmer/pulls/230","id":78620498,"html_url":"https://github.com/tildeio/glimmer/pull/230","diff_url":"https://github.com/tildeio/glimmer/pull/230.diff","patch_url":"https://github.com/tildeio/glimmer/pull/230.patch","issue_url":"https://api.github.com/repos/tildeio/glimmer/issues/230","number":230,"state":"closed","locked":false,"title":"Optimistic append","user":{"login":"chancancode","id":55829,"avatar_url":"https://avatars.githubusercontent.com/u/55829?v=3","gravatar_id":"","url":"https://api.github.com/users/chancancode","html_url":"https://github.com/chancancode","followers_url":"https://api.github.com/users/chancancode/followers","following_url":"https://api.github.com/users/chancancode/following{/other_user}","gists_url":"https://api.github.com/users/chancancode/gists{/gist_id}","starred_url":"https://api.github.com/users/chancancode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chancancode/subscriptions","organizations_url":"https://api.github.com/users/chancancode/orgs","repos_url":"https://api.github.com/users/chancancode/repos","events_url":"https://api.github.com/users/chancancode/events{/privacy}","received_events_url":"https://api.github.com/users/chancancode/received_events","type":"User","site_admin":false},"body":"This enables a feature (closure components) in Ember where certain curlies can dynamically resolve into component definition objects and need to be rendered as component invocations.\r\n\r\nThe general strategy to handle that is to change all curlies into (at least semantically) the equivalent of:\r\n\r\n\r\n```hbs\r\n{{#if (isComponentDefinition foo)}}{{component foo}}{{else}}{{foo}}{{/if}}\r\n```\r\n\r\nHowever, doing all that extra work and bookkeeping for literally every single curly would be very slow. Therefore, we take a tiered approach to handle this.\r\n\r\nFirst of all, in Ember the syntactic requirement for this feature is that there needs to be at least one dot in the path lookup, e.g. `... as |f|}}{{f.input}}...`, `{{foo.bar.baz}}` or `{{this.foo}}`. This allows us to emit the same append opcode (now called `OptimizedAppend`) for the majority of the append curlies. (By default, all curlies are optimized, but the consuming environment can override that in `refineStatement`.)\r\n\r\nEven then, there are still a large amount of path lookups with a dot that will not ever resolve into a component, and doing the extra work for all those cases would be less than ideal. For that reason, even we need to emit `UnoptimizedAppend`, we still assume that the values are going to be simple values.\r\n\r\nIf we discover that the assumption is not true, i.e. we see that the value is indeed a component definition at either initial render time or at update time, we will then deopt the opcodes into the expanded form.\r\n\r\nSee the code comments for more details on how it works.\r\n\r\nTODO:\r\n\r\n- [x] Handle deopts in the visualizer\r\n\r\ncc @wycats @krisselden @zackthehuman @chadhietala ","created_at":"2016-07-25T02:55:43Z","updated_at":"2016-07-26T02:07:59Z","closed_at":"2016-07-26T02:07:59Z","merged_at":"2016-07-26T02:07:59Z","merge_commit_sha":"be998e6cc036cff6b0e6360a8485ee3ab6784de8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tildeio/glimmer/pulls/230/commits","review_comments_url":"https://api.github.com/repos/tildeio/glimmer/pulls/230/comments","review_comment_url":"https://api.github.com/repos/tildeio/glimmer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tildeio/glimmer/issues/230/comments","statuses_url":"https://api.github.com/repos/tildeio/glimmer/statuses/3d55bd5a0ffdcfe2a3337c0eec8c6995c7df2ac8","head":{"label":"tildeio:optimistic-append","ref":"optimistic-append","sha":"3d55bd5a0ffdcfe2a3337c0eec8c6995c7df2ac8","user":{"login":"tildeio","id":1355851,"avatar_url":"https://avatars.githubusercontent.com/u/1355851?v=3","gravatar_id":"","url":"https://api.github.com/users/tildeio","html_url":"https://github.com/tildeio","followers_url":"https://api.github.com/users/tildeio/followers","following_url":"https://api.github.com/users/tildeio/following{/other_user}","gists_url":"https://api.github.com/users/tildeio/gists{/gist_id}","starred_url":"https://api.github.com/users/tildeio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tildeio/subscriptions","organizations_url":"https://api.github.com/users/tildeio/orgs","repos_url":"https://api.github.com/users/tildeio/repos","events_url":"https://api.github.com/users/tildeio/events{/privacy}","received_events_url":"https://api.github.com/users/tildeio/received_events","type":"Organization","site_admin":false},"repo":{"id":42467001,"name":"glimmer","full_name":"tildeio/glimmer","owner":{"login":"tildeio","id":1355851,"avatar_url":"https://avatars.githubusercontent.com/u/1355851?v=3","gravatar_id":"","url":"https://api.github.com/users/tildeio","html_url":"https://github.com/tildeio","followers_url":"https://api.github.com/users/tildeio/followers","following_url":"https://api.github.com/users/tildeio/following{/other_user}","gists_url":"https://api.github.com/users/tildeio/gists{/gist_id}","starred_url":"https://api.github.com/users/tildeio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tildeio/subscriptions","organizations_url":"https://api.github.com/users/tildeio/orgs","repos_url":"https://api.github.com/users/tildeio/repos","events_url":"https://api.github.com/users/tildeio/events{/privacy}","received_events_url":"https://api.github.com/users/tildeio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tildeio/glimmer","description":"","fork":false,"url":"https://api.github.com/repos/tildeio/glimmer","forks_url":"https://api.github.com/repos/tildeio/glimmer/forks","keys_url":"https://api.github.com/repos/tildeio/glimmer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tildeio/glimmer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tildeio/glimmer/teams","hooks_url":"https://api.github.com/repos/tildeio/glimmer/hooks","issue_events_url":"https://api.github.com/repos/tildeio/glimmer/issues/events{/number}","events_url":"https://api.github.com/repos/tildeio/glimmer/events","assignees_url":"https://api.github.com/repos/tildeio/glimmer/assignees{/user}","branches_url":"https://api.github.com/repos/tildeio/glimmer/branches{/branch}","tags_url":"https://api.github.com/repos/tildeio/glimmer/tags","blobs_url":"https://api.github.com/repos/tildeio/glimmer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tildeio/glimmer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tildeio/glimmer/git/refs{/sha}","trees_url":"https://api.github.com/repos/tildeio/glimmer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tildeio/glimmer/statuses/{sha}","languages_url":"https://api.github.com/repos/tildeio/glimmer/languages","stargazers_url":"https://api.github.com/repos/tildeio/glimmer/stargazers","contributors_url":"https://api.github.com/repos/tildeio/glimmer/contributors","subscribers_url":"https://api.github.com/repos/tildeio/glimmer/subscribers","subscription_url":"https://api.github.com/repos/tildeio/glimmer/subscription","commits_url":"https://api.github.com/repos/tildeio/glimmer/commits{/sha}","git_commits_url":"https://api.github.com/repos/tildeio/glimmer/git/commits{/sha}","comments_url":"https://api.github.com/repos/tildeio/glimmer/comments{/number}","issue_comment_url":"https://api.github.com/repos/tildeio/glimmer/issues/comments{/number}","contents_url":"https://api.github.com/repos/tildeio/glimmer/contents/{+path}","compare_url":"https://api.github.com/repos/tildeio/glimmer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tildeio/glimmer/merges","archive_url":"https://api.github.com/repos/tildeio/glimmer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tildeio/glimmer/downloads","issues_url":"https://api.github.com/repos/tildeio/glimmer/issues{/number}","pulls_url":"https://api.github.com/repos/tildeio/glimmer/pulls{/number}","milestones_url":"https://api.github.com/repos/tildeio/glimmer/milestones{/number}","notifications_url":"https://api.github.com/repos/tildeio/glimmer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tildeio/glimmer/labels{/name}","releases_url":"https://api.github.com/repos/tildeio/glimmer/releases{/id}","deployments_url":"https://api.github.com/repos/tildeio/glimmer/deployments","created_at":"2015-09-14T17:59:26Z","updated_at":"2016-07-26T00:17:41Z","pushed_at":"2016-07-26T02:07:59Z","git_url":"git://github.com/tildeio/glimmer.git","ssh_url":"git@github.com:tildeio/glimmer.git","clone_url":"https://github.com/tildeio/glimmer.git","svn_url":"https://github.com/tildeio/glimmer","homepage":null,"size":3786,"stargazers_count":236,"watchers_count":236,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":28,"forks":39,"open_issues":28,"watchers":236,"default_branch":"master"}},"base":{"label":"tildeio:master","ref":"master","sha":"e90bdeaaa83cc0a07b94cc1a011c1da60670c5a8","user":{"login":"tildeio","id":1355851,"avatar_url":"https://avatars.githubusercontent.com/u/1355851?v=3","gravatar_id":"","url":"https://api.github.com/users/tildeio","html_url":"https://github.com/tildeio","followers_url":"https://api.github.com/users/tildeio/followers","following_url":"https://api.github.com/users/tildeio/following{/other_user}","gists_url":"https://api.github.com/users/tildeio/gists{/gist_id}","starred_url":"https://api.github.com/users/tildeio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tildeio/subscriptions","organizations_url":"https://api.github.com/users/tildeio/orgs","repos_url":"https://api.github.com/users/tildeio/repos","events_url":"https://api.github.com/users/tildeio/events{/privacy}","received_events_url":"https://api.github.com/users/tildeio/received_events","type":"Organization","site_admin":false},"repo":{"id":42467001,"name":"glimmer","full_name":"tildeio/glimmer","owner":{"login":"tildeio","id":1355851,"avatar_url":"https://avatars.githubusercontent.com/u/1355851?v=3","gravatar_id":"","url":"https://api.github.com/users/tildeio","html_url":"https://github.com/tildeio","followers_url":"https://api.github.com/users/tildeio/followers","following_url":"https://api.github.com/users/tildeio/following{/other_user}","gists_url":"https://api.github.com/users/tildeio/gists{/gist_id}","starred_url":"https://api.github.com/users/tildeio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tildeio/subscriptions","organizations_url":"https://api.github.com/users/tildeio/orgs","repos_url":"https://api.github.com/users/tildeio/repos","events_url":"https://api.github.com/users/tildeio/events{/privacy}","received_events_url":"https://api.github.com/users/tildeio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tildeio/glimmer","description":"","fork":false,"url":"https://api.github.com/repos/tildeio/glimmer","forks_url":"https://api.github.com/repos/tildeio/glimmer/forks","keys_url":"https://api.github.com/repos/tildeio/glimmer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tildeio/glimmer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tildeio/glimmer/teams","hooks_url":"https://api.github.com/repos/tildeio/glimmer/hooks","issue_events_url":"https://api.github.com/repos/tildeio/glimmer/issues/events{/number}","events_url":"https://api.github.com/repos/tildeio/glimmer/events","assignees_url":"https://api.github.com/repos/tildeio/glimmer/assignees{/user}","branches_url":"https://api.github.com/repos/tildeio/glimmer/branches{/branch}","tags_url":"https://api.github.com/repos/tildeio/glimmer/tags","blobs_url":"https://api.github.com/repos/tildeio/glimmer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tildeio/glimmer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tildeio/glimmer/git/refs{/sha}","trees_url":"https://api.github.com/repos/tildeio/glimmer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tildeio/glimmer/statuses/{sha}","languages_url":"https://api.github.com/repos/tildeio/glimmer/languages","stargazers_url":"https://api.github.com/repos/tildeio/glimmer/stargazers","contributors_url":"https://api.github.com/repos/tildeio/glimmer/contributors","subscribers_url":"https://api.github.com/repos/tildeio/glimmer/subscribers","subscription_url":"https://api.github.com/repos/tildeio/glimmer/subscription","commits_url":"https://api.github.com/repos/tildeio/glimmer/commits{/sha}","git_commits_url":"https://api.github.com/repos/tildeio/glimmer/git/commits{/sha}","comments_url":"https://api.github.com/repos/tildeio/glimmer/comments{/number}","issue_comment_url":"https://api.github.com/repos/tildeio/glimmer/issues/comments{/number}","contents_url":"https://api.github.com/repos/tildeio/glimmer/contents/{+path}","compare_url":"https://api.github.com/repos/tildeio/glimmer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tildeio/glimmer/merges","archive_url":"https://api.github.com/repos/tildeio/glimmer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tildeio/glimmer/downloads","issues_url":"https://api.github.com/repos/tildeio/glimmer/issues{/number}","pulls_url":"https://api.github.com/repos/tildeio/glimmer/pulls{/number}","milestones_url":"https://api.github.com/repos/tildeio/glimmer/milestones{/number}","notifications_url":"https://api.github.com/repos/tildeio/glimmer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tildeio/glimmer/labels{/name}","releases_url":"https://api.github.com/repos/tildeio/glimmer/releases{/id}","deployments_url":"https://api.github.com/repos/tildeio/glimmer/deployments","created_at":"2015-09-14T17:59:26Z","updated_at":"2016-07-26T00:17:41Z","pushed_at":"2016-07-26T02:07:59Z","git_url":"git://github.com/tildeio/glimmer.git","ssh_url":"git@github.com:tildeio/glimmer.git","clone_url":"https://github.com/tildeio/glimmer.git","svn_url":"https://github.com/tildeio/glimmer","homepage":null,"size":3786,"stargazers_count":236,"watchers_count":236,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":28,"forks":39,"open_issues":28,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tildeio/glimmer/pulls/230"},"html":{"href":"https://github.com/tildeio/glimmer/pull/230"},"issue":{"href":"https://api.github.com/repos/tildeio/glimmer/issues/230"},"comments":{"href":"https://api.github.com/repos/tildeio/glimmer/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/tildeio/glimmer/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/tildeio/glimmer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tildeio/glimmer/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/tildeio/glimmer/statuses/3d55bd5a0ffdcfe2a3337c0eec8c6995c7df2ac8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"chancancode","id":55829,"avatar_url":"https://avatars.githubusercontent.com/u/55829?v=3","gravatar_id":"","url":"https://api.github.com/users/chancancode","html_url":"https://github.com/chancancode","followers_url":"https://api.github.com/users/chancancode/followers","following_url":"https://api.github.com/users/chancancode/following{/other_user}","gists_url":"https://api.github.com/users/chancancode/gists{/gist_id}","starred_url":"https://api.github.com/users/chancancode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chancancode/subscriptions","organizations_url":"https://api.github.com/users/chancancode/orgs","repos_url":"https://api.github.com/users/chancancode/repos","events_url":"https://api.github.com/users/chancancode/events{/privacy}","received_events_url":"https://api.github.com/users/chancancode/received_events","type":"User","site_admin":false},"comments":3,"review_comments":11,"commits":13,"additions":749,"deletions":295,"changed_files":29}}
{"actor":{"display_login":"chancancode"}}