{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/componentkit/pulls/comments/89802992","pull_request_review_id":10336359,"id":89802992,"diff_hunk":"@@ -36,46 +36,36 @@ typedef NS_ENUM(NSUInteger, CKComponentActionSendBehavior) {\n   CKComponentActionSendBehaviorStartAtSender,\n };\n \n-struct CKTypedComponentActionValue {\n-  CKTypedComponentActionValue();\n-  CKTypedComponentActionValue(const CKTypedComponentActionValue &value);\n-  CKTypedComponentActionValue(CKTypedComponentActionVariant variant, __unsafe_unretained id target, __unsafe_unretained CKComponentScopeHandle *scopeHandle, SEL selector);\n-\n-  id initialTarget(CKComponent *sender) const;\n-  SEL selector() const { return _selector; };\n-  CKComponentActionSendBehavior defaultBehavior() const;\n-\n-  explicit operator bool() const { return _selector != NULL; };\n-  bool operator==(const CKTypedComponentActionValue& rhs) const;\n-\n-private:\n-  CKTypedComponentActionVariant _variant;\n-  __weak id _target;\n-  __weak CKComponentScopeHandle *_scopeHandle;\n-  SEL _selector;\n-};\n-\n #pragma mark - Action Base\n \n /** A base-class for typed components that doesn't use templates to avoid template bloat. */\n class CKTypedComponentActionBase {\n protected:\n-  CKTypedComponentActionBase() = default;\n+  CKTypedComponentActionBase();\n   CKTypedComponentActionBase(id target, SEL selector);\n-\n+  \n   CKTypedComponentActionBase(const CKComponentScope &scope, SEL selector);\n-\n+  \n   /** Legacy constructor for raw selector actions. Traverse up the mount responder chain. */\n   CKTypedComponentActionBase(SEL selector);\n-\n+  \n   /** Allows conversion from NULL actions. */\n   CKTypedComponentActionBase(int s);\n   CKTypedComponentActionBase(long s);\n   CKTypedComponentActionBase(std::nullptr_t n);\n-\n+  \n   ~CKTypedComponentActionBase() {};\n-\n-  CKTypedComponentActionValue _internal;\n+  \n+  id initialTarget(CKComponent *sender) const;\n+  CKComponentActionSendBehavior defaultBehavior() const;\n+  \n+  bool operator==(const CKTypedComponentActionBase& rhs) const;\n+  \n+  CKTypedComponentActionVariant _variant;\n+  __weak id _target;\n+  __weak CKComponentScopeHandle *_scopeHandle;\n+  SEL _selector;","path":"ComponentKit/Utilities/CKComponentActionInternal.h","position":58,"original_position":58,"commit_id":"a9ae0ad849db73df9e74b575775a8a3b4a6b180a","original_commit_id":"a9ae0ad849db73df9e74b575775a8a3b4a6b180a","user":{"login":"eczarny","id":28012,"avatar_url":"https://avatars.githubusercontent.com/u/28012?v=3","gravatar_id":"","url":"https://api.github.com/users/eczarny","html_url":"https://github.com/eczarny","followers_url":"https://api.github.com/users/eczarny/followers","following_url":"https://api.github.com/users/eczarny/following{/other_user}","gists_url":"https://api.github.com/users/eczarny/gists{/gist_id}","starred_url":"https://api.github.com/users/eczarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eczarny/subscriptions","organizations_url":"https://api.github.com/users/eczarny/orgs","repos_url":"https://api.github.com/users/eczarny/repos","events_url":"https://api.github.com/users/eczarny/events{/privacy}","received_events_url":"https://api.github.com/users/eczarny/received_events","type":"User","site_admin":false},"body":"I'm still not quite sure how this helps reduce the size of the binary but this feels a bit simpler than before.","created_at":"2016-11-28T15:25:29Z","updated_at":"2016-11-28T15:28:27Z","html_url":"https://github.com/facebook/componentkit/pull/683#discussion_r89802992","pull_request_url":"https://api.github.com/repos/facebook/componentkit/pulls/683","_links":{"self":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/comments/89802992"},"html":{"href":"https://github.com/facebook/componentkit/pull/683#discussion_r89802992"},"pull_request":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/683"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/componentkit/pulls/683","id":94389632,"html_url":"https://github.com/facebook/componentkit/pull/683","diff_url":"https://github.com/facebook/componentkit/pull/683.diff","patch_url":"https://github.com/facebook/componentkit/pull/683.patch","issue_url":"https://api.github.com/repos/facebook/componentkit/issues/683","number":683,"state":"open","locked":false,"title":"Reduce type bloat by removing sub-struct","user":{"login":"ocrickard","id":857665,"avatar_url":"https://avatars.githubusercontent.com/u/857665?v=3","gravatar_id":"","url":"https://api.github.com/users/ocrickard","html_url":"https://github.com/ocrickard","followers_url":"https://api.github.com/users/ocrickard/followers","following_url":"https://api.github.com/users/ocrickard/following{/other_user}","gists_url":"https://api.github.com/users/ocrickard/gists{/gist_id}","starred_url":"https://api.github.com/users/ocrickard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocrickard/subscriptions","organizations_url":"https://api.github.com/users/ocrickard/orgs","repos_url":"https://api.github.com/users/ocrickard/repos","events_url":"https://api.github.com/users/ocrickard/events{/privacy}","received_events_url":"https://api.github.com/users/ocrickard/received_events","type":"User","site_admin":false},"body":"In inspecting the type encodings of these classes inside the compiled binaries I noted that we're seeing both the CKTypedComponentAction<...> signature AND its sub-struct the CKTypedComponentActionValue struct in the type encoded strings when stored as ivars or passed to obj-c methods. This indirection was made unnecessary by the move to a non-templated base-class, so let's move all this to directly use members of the base-class.\r\n\r\nThis should change no client code, but should reduce binary bloat a little bit.","created_at":"2016-11-18T16:12:28Z","updated_at":"2016-11-28T15:28:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a56dee4e17d24c09a3150e7cfc0f0ec574177ba","assignee":{"login":"eczarny","id":28012,"avatar_url":"https://avatars.githubusercontent.com/u/28012?v=3","gravatar_id":"","url":"https://api.github.com/users/eczarny","html_url":"https://github.com/eczarny","followers_url":"https://api.github.com/users/eczarny/followers","following_url":"https://api.github.com/users/eczarny/following{/other_user}","gists_url":"https://api.github.com/users/eczarny/gists{/gist_id}","starred_url":"https://api.github.com/users/eczarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eczarny/subscriptions","organizations_url":"https://api.github.com/users/eczarny/orgs","repos_url":"https://api.github.com/users/eczarny/repos","events_url":"https://api.github.com/users/eczarny/events{/privacy}","received_events_url":"https://api.github.com/users/eczarny/received_events","type":"User","site_admin":false},"assignees":[{"login":"eczarny","id":28012,"avatar_url":"https://avatars.githubusercontent.com/u/28012?v=3","gravatar_id":"","url":"https://api.github.com/users/eczarny","html_url":"https://github.com/eczarny","followers_url":"https://api.github.com/users/eczarny/followers","following_url":"https://api.github.com/users/eczarny/following{/other_user}","gists_url":"https://api.github.com/users/eczarny/gists{/gist_id}","starred_url":"https://api.github.com/users/eczarny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eczarny/subscriptions","organizations_url":"https://api.github.com/users/eczarny/orgs","repos_url":"https://api.github.com/users/eczarny/repos","events_url":"https://api.github.com/users/eczarny/events{/privacy}","received_events_url":"https://api.github.com/users/eczarny/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/facebook/componentkit/milestones/3","html_url":"https://github.com/facebook/componentkit/milestones/0.2","labels_url":"https://api.github.com/repos/facebook/componentkit/milestones/3/labels","id":1952887,"number":3,"title":"0.2","description":null,"creator":{"login":"ocrickard","id":857665,"avatar_url":"https://avatars.githubusercontent.com/u/857665?v=3","gravatar_id":"","url":"https://api.github.com/users/ocrickard","html_url":"https://github.com/ocrickard","followers_url":"https://api.github.com/users/ocrickard/followers","following_url":"https://api.github.com/users/ocrickard/following{/other_user}","gists_url":"https://api.github.com/users/ocrickard/gists{/gist_id}","starred_url":"https://api.github.com/users/ocrickard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocrickard/subscriptions","organizations_url":"https://api.github.com/users/ocrickard/orgs","repos_url":"https://api.github.com/users/ocrickard/repos","events_url":"https://api.github.com/users/ocrickard/events{/privacy}","received_events_url":"https://api.github.com/users/ocrickard/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2016-08-20T12:14:08Z","updated_at":"2016-11-18T16:33:57Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/facebook/componentkit/pulls/683/commits","review_comments_url":"https://api.github.com/repos/facebook/componentkit/pulls/683/comments","review_comment_url":"https://api.github.com/repos/facebook/componentkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/componentkit/issues/683/comments","statuses_url":"https://api.github.com/repos/facebook/componentkit/statuses/a9ae0ad849db73df9e74b575775a8a3b4a6b180a","head":{"label":"ocrickard:size-reduction-combined-struct","ref":"size-reduction-combined-struct","sha":"a9ae0ad849db73df9e74b575775a8a3b4a6b180a","user":{"login":"ocrickard","id":857665,"avatar_url":"https://avatars.githubusercontent.com/u/857665?v=3","gravatar_id":"","url":"https://api.github.com/users/ocrickard","html_url":"https://github.com/ocrickard","followers_url":"https://api.github.com/users/ocrickard/followers","following_url":"https://api.github.com/users/ocrickard/following{/other_user}","gists_url":"https://api.github.com/users/ocrickard/gists{/gist_id}","starred_url":"https://api.github.com/users/ocrickard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocrickard/subscriptions","organizations_url":"https://api.github.com/users/ocrickard/orgs","repos_url":"https://api.github.com/users/ocrickard/repos","events_url":"https://api.github.com/users/ocrickard/events{/privacy}","received_events_url":"https://api.github.com/users/ocrickard/received_events","type":"User","site_admin":false},"repo":{"id":37106027,"name":"componentkit","full_name":"ocrickard/componentkit","owner":{"login":"ocrickard","id":857665,"avatar_url":"https://avatars.githubusercontent.com/u/857665?v=3","gravatar_id":"","url":"https://api.github.com/users/ocrickard","html_url":"https://github.com/ocrickard","followers_url":"https://api.github.com/users/ocrickard/followers","following_url":"https://api.github.com/users/ocrickard/following{/other_user}","gists_url":"https://api.github.com/users/ocrickard/gists{/gist_id}","starred_url":"https://api.github.com/users/ocrickard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocrickard/subscriptions","organizations_url":"https://api.github.com/users/ocrickard/orgs","repos_url":"https://api.github.com/users/ocrickard/repos","events_url":"https://api.github.com/users/ocrickard/events{/privacy}","received_events_url":"https://api.github.com/users/ocrickard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ocrickard/componentkit","description":"A React-inspired view framework for iOS.","fork":true,"url":"https://api.github.com/repos/ocrickard/componentkit","forks_url":"https://api.github.com/repos/ocrickard/componentkit/forks","keys_url":"https://api.github.com/repos/ocrickard/componentkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocrickard/componentkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocrickard/componentkit/teams","hooks_url":"https://api.github.com/repos/ocrickard/componentkit/hooks","issue_events_url":"https://api.github.com/repos/ocrickard/componentkit/issues/events{/number}","events_url":"https://api.github.com/repos/ocrickard/componentkit/events","assignees_url":"https://api.github.com/repos/ocrickard/componentkit/assignees{/user}","branches_url":"https://api.github.com/repos/ocrickard/componentkit/branches{/branch}","tags_url":"https://api.github.com/repos/ocrickard/componentkit/tags","blobs_url":"https://api.github.com/repos/ocrickard/componentkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocrickard/componentkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocrickard/componentkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocrickard/componentkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocrickard/componentkit/statuses/{sha}","languages_url":"https://api.github.com/repos/ocrickard/componentkit/languages","stargazers_url":"https://api.github.com/repos/ocrickard/componentkit/stargazers","contributors_url":"https://api.github.com/repos/ocrickard/componentkit/contributors","subscribers_url":"https://api.github.com/repos/ocrickard/componentkit/subscribers","subscription_url":"https://api.github.com/repos/ocrickard/componentkit/subscription","commits_url":"https://api.github.com/repos/ocrickard/componentkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocrickard/componentkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocrickard/componentkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocrickard/componentkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocrickard/componentkit/contents/{+path}","compare_url":"https://api.github.com/repos/ocrickard/componentkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocrickard/componentkit/merges","archive_url":"https://api.github.com/repos/ocrickard/componentkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocrickard/componentkit/downloads","issues_url":"https://api.github.com/repos/ocrickard/componentkit/issues{/number}","pulls_url":"https://api.github.com/repos/ocrickard/componentkit/pulls{/number}","milestones_url":"https://api.github.com/repos/ocrickard/componentkit/milestones{/number}","notifications_url":"https://api.github.com/repos/ocrickard/componentkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocrickard/componentkit/labels{/name}","releases_url":"https://api.github.com/repos/ocrickard/componentkit/releases{/id}","deployments_url":"https://api.github.com/repos/ocrickard/componentkit/deployments","created_at":"2015-06-09T02:46:19Z","updated_at":"2016-08-17T19:06:03Z","pushed_at":"2016-11-23T17:39:08Z","git_url":"git://github.com/ocrickard/componentkit.git","ssh_url":"git@github.com:ocrickard/componentkit.git","clone_url":"https://github.com/ocrickard/componentkit.git","svn_url":"https://github.com/ocrickard/componentkit","homepage":"http://www.componentkit.org/","size":8607,"stargazers_count":0,"watchers_count":0,"language":"Objective-C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"c6657c40355c71dd5f28d673ace5d92bc12c3358","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":32600951,"name":"componentkit","full_name":"facebook/componentkit","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/componentkit","description":"A React-inspired view framework for iOS.","fork":false,"url":"https://api.github.com/repos/facebook/componentkit","forks_url":"https://api.github.com/repos/facebook/componentkit/forks","keys_url":"https://api.github.com/repos/facebook/componentkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/componentkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/componentkit/teams","hooks_url":"https://api.github.com/repos/facebook/componentkit/hooks","issue_events_url":"https://api.github.com/repos/facebook/componentkit/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/componentkit/events","assignees_url":"https://api.github.com/repos/facebook/componentkit/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/componentkit/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/componentkit/tags","blobs_url":"https://api.github.com/repos/facebook/componentkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/componentkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/componentkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/componentkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/componentkit/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/componentkit/languages","stargazers_url":"https://api.github.com/repos/facebook/componentkit/stargazers","contributors_url":"https://api.github.com/repos/facebook/componentkit/contributors","subscribers_url":"https://api.github.com/repos/facebook/componentkit/subscribers","subscription_url":"https://api.github.com/repos/facebook/componentkit/subscription","commits_url":"https://api.github.com/repos/facebook/componentkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/componentkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/componentkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/componentkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/componentkit/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/componentkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/componentkit/merges","archive_url":"https://api.github.com/repos/facebook/componentkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/componentkit/downloads","issues_url":"https://api.github.com/repos/facebook/componentkit/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/componentkit/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/componentkit/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/componentkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/componentkit/labels{/name}","releases_url":"https://api.github.com/repos/facebook/componentkit/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/componentkit/deployments","created_at":"2015-03-20T18:42:47Z","updated_at":"2016-11-28T08:14:36Z","pushed_at":"2016-11-23T21:14:17Z","git_url":"git://github.com/facebook/componentkit.git","ssh_url":"git@github.com:facebook/componentkit.git","clone_url":"https://github.com/facebook/componentkit.git","svn_url":"https://github.com/facebook/componentkit","homepage":"http://www.componentkit.org/","size":9488,"stargazers_count":3528,"watchers_count":3528,"language":"Objective-C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":391,"mirror_url":null,"open_issues_count":33,"forks":391,"open_issues":33,"watchers":3528,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/683"},"html":{"href":"https://github.com/facebook/componentkit/pull/683"},"issue":{"href":"https://api.github.com/repos/facebook/componentkit/issues/683"},"comments":{"href":"https://api.github.com/repos/facebook/componentkit/issues/683/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/683/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/componentkit/pulls/683/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/componentkit/statuses/a9ae0ad849db73df9e74b575775a8a3b4a6b180a"}}}}
{"actor":{"display_login":"eczarny"}}