{"action":"created","comment":{"url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/comments/148478573","pull_request_review_id":73726305,"id":148478573,"diff_hunk":"@@ -478,12 +480,19 @@ private void exec() {\n                     break;\n                 case InstructionCodes.CALL:\n                     cpIndex = operands[0];\n-                    funcRefCPEntry = (FunctionRefCPEntry) constPool[cpIndex];\n-                    functionInfo = funcRefCPEntry.getFunctionInfo();\n+                    \n+                    ConstantPoolEntry cpEntry = constPool[cpIndex];\n+                    CallableUnitInfo callableUnitInfo;\n+                    if (cpEntry.getEntryType() == EntryType.CP_ENTRY_FUNCTION_REF) {","path":"modules/ballerina-core/src/main/java/org/ballerinalang/bre/bvm/BLangVM.java","position":25,"original_position":25,"commit_id":"8df5702c3e2c3272f46c9fe24911b6abd043e22a","original_commit_id":"8df5702c3e2c3272f46c9fe24911b6abd043e22a","user":{"login":"sameera-jayasoma","id":2637328,"avatar_url":"https://avatars2.githubusercontent.com/u/2637328?v=4","gravatar_id":"","url":"https://api.github.com/users/sameera-jayasoma","html_url":"https://github.com/sameera-jayasoma","followers_url":"https://api.github.com/users/sameera-jayasoma/followers","following_url":"https://api.github.com/users/sameera-jayasoma/following{/other_user}","gists_url":"https://api.github.com/users/sameera-jayasoma/gists{/gist_id}","starred_url":"https://api.github.com/users/sameera-jayasoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sameera-jayasoma/subscriptions","organizations_url":"https://api.github.com/users/sameera-jayasoma/orgs","repos_url":"https://api.github.com/users/sameera-jayasoma/repos","events_url":"https://api.github.com/users/sameera-jayasoma/events{/privacy}","received_events_url":"https://api.github.com/users/sameera-jayasoma/received_events","type":"User","site_admin":false},"body":"This approach is not good.\r\n\r\nCan we have another instruction to invoke a transformer","created_at":"2017-11-02T09:30:53Z","updated_at":"2017-11-02T09:37:22Z","html_url":"https://github.com/ballerinalang/ballerina/pull/3862#discussion_r148478573","pull_request_url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/comments/148478573"},"html":{"href":"https://github.com/ballerinalang/ballerina/pull/3862#discussion_r148478573"},"pull_request":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862"}}},"pull_request":{"url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862","id":149887148,"html_url":"https://github.com/ballerinalang/ballerina/pull/3862","diff_url":"https://github.com/ballerinalang/ballerina/pull/3862.diff","patch_url":"https://github.com/ballerinalang/ballerina/pull/3862.patch","issue_url":"https://api.github.com/repos/ballerinalang/ballerina/issues/3862","number":3862,"state":"open","locked":false,"title":"Rewrite transformer with the new syntax","user":{"login":"SupunS","id":7834839,"avatar_url":"https://avatars3.githubusercontent.com/u/7834839?v=4","gravatar_id":"","url":"https://api.github.com/users/SupunS","html_url":"https://github.com/SupunS","followers_url":"https://api.github.com/users/SupunS/followers","following_url":"https://api.github.com/users/SupunS/following{/other_user}","gists_url":"https://api.github.com/users/SupunS/gists{/gist_id}","starred_url":"https://api.github.com/users/SupunS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SupunS/subscriptions","organizations_url":"https://api.github.com/users/SupunS/orgs","repos_url":"https://api.github.com/users/SupunS/repos","events_url":"https://api.github.com/users/SupunS/events{/privacy}","received_events_url":"https://api.github.com/users/SupunS/received_events","type":"User","site_admin":false},"body":"New transformer semantics:\r\n```ballerina\r\nstruct Person {\r\n    string firstName;\r\n    string lastName;\r\n    int age;\r\n    string city;\r\n}\r\n\r\nstruct Employee {\r\n    string name;\r\n    int age;\r\n    string address;\r\n}\r\n\r\nfunction test() () {\r\n    Person p = {firstName:\"Jane\", lastName:\"Doe\", age:25, city:\"Paris\"};\r\n    Employee e = <Employee> p;\r\n    Employee e = <Employee; Foo()> p;\r\n    Employee e = <Employee; Bar(99)> p;\r\n}\r\n\r\ntransformer <Person p, Employee e> {\r\n    e.address = p.city;\r\n    e.name = p.firstName;\r\n    e.age = p.age;\r\n}\r\n\r\ntransformer <Person p, Employee e> Foo() {\r\n    e.address = p.city;\r\n    e.name = p.firstName;\r\n    e.age = p.age;\r\n}\r\n\r\ntransformer <Person p, Employee e> Bar(int age) {\r\n    e.address = p.city;\r\n    e.name = p.firstName;\r\n    e.age = age;\r\n}\r\n```\r\n\r\nOnly safe conversions are supported for this release.\r\n\r\nFixes https://github.com/ballerinalang/ballerina/issues/3781","created_at":"2017-10-31T19:32:37Z","updated_at":"2017-11-02T09:37:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72d09d814306f6569b02291b845eaf64c00afae7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862/commits","review_comments_url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862/comments","review_comment_url":"https://api.github.com/repos/ballerinalang/ballerina/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ballerinalang/ballerina/issues/3862/comments","statuses_url":"https://api.github.com/repos/ballerinalang/ballerina/statuses/8df5702c3e2c3272f46c9fe24911b6abd043e22a","head":{"label":"SupunS:transformer","ref":"transformer","sha":"8df5702c3e2c3272f46c9fe24911b6abd043e22a","user":{"login":"SupunS","id":7834839,"avatar_url":"https://avatars3.githubusercontent.com/u/7834839?v=4","gravatar_id":"","url":"https://api.github.com/users/SupunS","html_url":"https://github.com/SupunS","followers_url":"https://api.github.com/users/SupunS/followers","following_url":"https://api.github.com/users/SupunS/following{/other_user}","gists_url":"https://api.github.com/users/SupunS/gists{/gist_id}","starred_url":"https://api.github.com/users/SupunS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SupunS/subscriptions","organizations_url":"https://api.github.com/users/SupunS/orgs","repos_url":"https://api.github.com/users/SupunS/repos","events_url":"https://api.github.com/users/SupunS/events{/privacy}","received_events_url":"https://api.github.com/users/SupunS/received_events","type":"User","site_admin":false},"repo":{"id":82883765,"name":"ballerina","full_name":"SupunS/ballerina","owner":{"login":"SupunS","id":7834839,"avatar_url":"https://avatars3.githubusercontent.com/u/7834839?v=4","gravatar_id":"","url":"https://api.github.com/users/SupunS","html_url":"https://github.com/SupunS","followers_url":"https://api.github.com/users/SupunS/followers","following_url":"https://api.github.com/users/SupunS/following{/other_user}","gists_url":"https://api.github.com/users/SupunS/gists{/gist_id}","starred_url":"https://api.github.com/users/SupunS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SupunS/subscriptions","organizations_url":"https://api.github.com/users/SupunS/orgs","repos_url":"https://api.github.com/users/SupunS/repos","events_url":"https://api.github.com/users/SupunS/events{/privacy}","received_events_url":"https://api.github.com/users/SupunS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SupunS/ballerina","description":"Ballerina is a new programming language for integration built on a sequence diagram metaphor.","fork":true,"url":"https://api.github.com/repos/SupunS/ballerina","forks_url":"https://api.github.com/repos/SupunS/ballerina/forks","keys_url":"https://api.github.com/repos/SupunS/ballerina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SupunS/ballerina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SupunS/ballerina/teams","hooks_url":"https://api.github.com/repos/SupunS/ballerina/hooks","issue_events_url":"https://api.github.com/repos/SupunS/ballerina/issues/events{/number}","events_url":"https://api.github.com/repos/SupunS/ballerina/events","assignees_url":"https://api.github.com/repos/SupunS/ballerina/assignees{/user}","branches_url":"https://api.github.com/repos/SupunS/ballerina/branches{/branch}","tags_url":"https://api.github.com/repos/SupunS/ballerina/tags","blobs_url":"https://api.github.com/repos/SupunS/ballerina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SupunS/ballerina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SupunS/ballerina/git/refs{/sha}","trees_url":"https://api.github.com/repos/SupunS/ballerina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SupunS/ballerina/statuses/{sha}","languages_url":"https://api.github.com/repos/SupunS/ballerina/languages","stargazers_url":"https://api.github.com/repos/SupunS/ballerina/stargazers","contributors_url":"https://api.github.com/repos/SupunS/ballerina/contributors","subscribers_url":"https://api.github.com/repos/SupunS/ballerina/subscribers","subscription_url":"https://api.github.com/repos/SupunS/ballerina/subscription","commits_url":"https://api.github.com/repos/SupunS/ballerina/commits{/sha}","git_commits_url":"https://api.github.com/repos/SupunS/ballerina/git/commits{/sha}","comments_url":"https://api.github.com/repos/SupunS/ballerina/comments{/number}","issue_comment_url":"https://api.github.com/repos/SupunS/ballerina/issues/comments{/number}","contents_url":"https://api.github.com/repos/SupunS/ballerina/contents/{+path}","compare_url":"https://api.github.com/repos/SupunS/ballerina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SupunS/ballerina/merges","archive_url":"https://api.github.com/repos/SupunS/ballerina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SupunS/ballerina/downloads","issues_url":"https://api.github.com/repos/SupunS/ballerina/issues{/number}","pulls_url":"https://api.github.com/repos/SupunS/ballerina/pulls{/number}","milestones_url":"https://api.github.com/repos/SupunS/ballerina/milestones{/number}","notifications_url":"https://api.github.com/repos/SupunS/ballerina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SupunS/ballerina/labels{/name}","releases_url":"https://api.github.com/repos/SupunS/ballerina/releases{/id}","deployments_url":"https://api.github.com/repos/SupunS/ballerina/deployments","created_at":"2017-02-23T04:21:56Z","updated_at":"2017-02-23T04:22:00Z","pushed_at":"2017-11-02T05:43:34Z","git_url":"git://github.com/SupunS/ballerina.git","ssh_url":"git@github.com:SupunS/ballerina.git","clone_url":"https://github.com/SupunS/ballerina.git","svn_url":"https://github.com/SupunS/ballerina","homepage":"","size":55761,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ballerinalang:master","ref":"master","sha":"8824e59e4be07e03a1917d51a1151a2b757ad2dc","user":{"login":"ballerinalang","id":24777199,"avatar_url":"https://avatars1.githubusercontent.com/u/24777199?v=4","gravatar_id":"","url":"https://api.github.com/users/ballerinalang","html_url":"https://github.com/ballerinalang","followers_url":"https://api.github.com/users/ballerinalang/followers","following_url":"https://api.github.com/users/ballerinalang/following{/other_user}","gists_url":"https://api.github.com/users/ballerinalang/gists{/gist_id}","starred_url":"https://api.github.com/users/ballerinalang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballerinalang/subscriptions","organizations_url":"https://api.github.com/users/ballerinalang/orgs","repos_url":"https://api.github.com/users/ballerinalang/repos","events_url":"https://api.github.com/users/ballerinalang/events{/privacy}","received_events_url":"https://api.github.com/users/ballerinalang/received_events","type":"Organization","site_admin":false},"repo":{"id":73930305,"name":"ballerina","full_name":"ballerinalang/ballerina","owner":{"login":"ballerinalang","id":24777199,"avatar_url":"https://avatars1.githubusercontent.com/u/24777199?v=4","gravatar_id":"","url":"https://api.github.com/users/ballerinalang","html_url":"https://github.com/ballerinalang","followers_url":"https://api.github.com/users/ballerinalang/followers","following_url":"https://api.github.com/users/ballerinalang/following{/other_user}","gists_url":"https://api.github.com/users/ballerinalang/gists{/gist_id}","starred_url":"https://api.github.com/users/ballerinalang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ballerinalang/subscriptions","organizations_url":"https://api.github.com/users/ballerinalang/orgs","repos_url":"https://api.github.com/users/ballerinalang/repos","events_url":"https://api.github.com/users/ballerinalang/events{/privacy}","received_events_url":"https://api.github.com/users/ballerinalang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ballerinalang/ballerina","description":"Ballerina is a new programming language for integration built on a sequence diagram metaphor.","fork":false,"url":"https://api.github.com/repos/ballerinalang/ballerina","forks_url":"https://api.github.com/repos/ballerinalang/ballerina/forks","keys_url":"https://api.github.com/repos/ballerinalang/ballerina/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ballerinalang/ballerina/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ballerinalang/ballerina/teams","hooks_url":"https://api.github.com/repos/ballerinalang/ballerina/hooks","issue_events_url":"https://api.github.com/repos/ballerinalang/ballerina/issues/events{/number}","events_url":"https://api.github.com/repos/ballerinalang/ballerina/events","assignees_url":"https://api.github.com/repos/ballerinalang/ballerina/assignees{/user}","branches_url":"https://api.github.com/repos/ballerinalang/ballerina/branches{/branch}","tags_url":"https://api.github.com/repos/ballerinalang/ballerina/tags","blobs_url":"https://api.github.com/repos/ballerinalang/ballerina/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ballerinalang/ballerina/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ballerinalang/ballerina/git/refs{/sha}","trees_url":"https://api.github.com/repos/ballerinalang/ballerina/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ballerinalang/ballerina/statuses/{sha}","languages_url":"https://api.github.com/repos/ballerinalang/ballerina/languages","stargazers_url":"https://api.github.com/repos/ballerinalang/ballerina/stargazers","contributors_url":"https://api.github.com/repos/ballerinalang/ballerina/contributors","subscribers_url":"https://api.github.com/repos/ballerinalang/ballerina/subscribers","subscription_url":"https://api.github.com/repos/ballerinalang/ballerina/subscription","commits_url":"https://api.github.com/repos/ballerinalang/ballerina/commits{/sha}","git_commits_url":"https://api.github.com/repos/ballerinalang/ballerina/git/commits{/sha}","comments_url":"https://api.github.com/repos/ballerinalang/ballerina/comments{/number}","issue_comment_url":"https://api.github.com/repos/ballerinalang/ballerina/issues/comments{/number}","contents_url":"https://api.github.com/repos/ballerinalang/ballerina/contents/{+path}","compare_url":"https://api.github.com/repos/ballerinalang/ballerina/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ballerinalang/ballerina/merges","archive_url":"https://api.github.com/repos/ballerinalang/ballerina/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ballerinalang/ballerina/downloads","issues_url":"https://api.github.com/repos/ballerinalang/ballerina/issues{/number}","pulls_url":"https://api.github.com/repos/ballerinalang/ballerina/pulls{/number}","milestones_url":"https://api.github.com/repos/ballerinalang/ballerina/milestones{/number}","notifications_url":"https://api.github.com/repos/ballerinalang/ballerina/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ballerinalang/ballerina/labels{/name}","releases_url":"https://api.github.com/repos/ballerinalang/ballerina/releases{/id}","deployments_url":"https://api.github.com/repos/ballerinalang/ballerina/deployments","created_at":"2016-11-16T14:58:44Z","updated_at":"2017-11-01T20:20:12Z","pushed_at":"2017-11-02T09:34:19Z","git_url":"git://github.com/ballerinalang/ballerina.git","ssh_url":"git@github.com:ballerinalang/ballerina.git","clone_url":"https://github.com/ballerinalang/ballerina.git","svn_url":"https://github.com/ballerinalang/ballerina","homepage":"","size":54835,"stargazers_count":203,"watchers_count":203,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":181,"mirror_url":null,"archived":false,"open_issues_count":371,"forks":181,"open_issues":371,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862"},"html":{"href":"https://github.com/ballerinalang/ballerina/pull/3862"},"issue":{"href":"https://api.github.com/repos/ballerinalang/ballerina/issues/3862"},"comments":{"href":"https://api.github.com/repos/ballerinalang/ballerina/issues/3862/comments"},"review_comments":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862/comments"},"review_comment":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ballerinalang/ballerina/pulls/3862/commits"},"statuses":{"href":"https://api.github.com/repos/ballerinalang/ballerina/statuses/8df5702c3e2c3272f46c9fe24911b6abd043e22a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sameera-jayasoma"}}