{"action":"created","comment":{"url":"https://api.github.com/repos/emmalanguage/emma/pulls/comments/88040302","pull_request_review_id":8625916,"id":88040302,"diff_hunk":"@@ -53,46 +53,64 @@ private[backend] trait TranslateToDataflows extends Common {\n         case Core.Lang.ValDef(sym, _, _) if highFuns contains sym => true\n       }(Monoids.disj)\n \n-      // Change DataBag sources to the corresponding target backend sources (but only in first-order context)\n-      val ctorsChanged = withHighContext.transformWith {\n-        case Attr.inh(Core.Lang.DefCall(Some(api.ModuleRef(API.bagModuleSymbol)), method, targs, argss@_*), false :: _)\n-          if API.sourceOps(method) => {\n-          val targetMethodDecl = backendSymbol.info.decl(method.name)\n-          assert(targetMethodDecl.alternatives.size == 1, s\"Target method `$targetMethodDecl` shouldn't be overloaded.\")\n-          val targetMethod = targetMethodDecl.asMethod\n-          Core.Lang.DefCall(Some(api.ModuleRef(backendSymbol)))(targetMethod, targs: _*)(argss: _*)\n-        }\n-      }(disambiguatedTree).tree\n+      /**\n+       * This is for changing static method calls to their corresponding backend calls.\n+       * @param moduleSymbol The symbol of the module of which the methods are members of.\n+       * @param methods The set of methods that should be affected.\n+       * @return A transformation which changes these method calls to backend calls. The backend methods\n+       *         should be defined in the module `backendSymbol`, and they should not have any overloads (this is\n+       *         because we look up the corresponding method just by name; adding overload resolution would be\n+       *         possible but complicated because of the additional implicit parameters for the backend contexts).\n+       */\n+      def changeStaticCalls(moduleSymbol: u.ModuleSymbol, methods: Set[u.MethodSymbol]): u.Tree => u.Tree =\n+        withHighContext.transformWith {\n+          case Attr.inh(Core.Lang.DefCall(Some(api.ModuleRef(`moduleSymbol`)), method, targs, argss@_*), false :: _)\n+            if methods(method) => {\n+            val targetMethodDecl = backendSymbol.info.decl(method.name)\n+            assert(targetMethodDecl.alternatives.size == 1,\n+              s\"Target method `${method.name}` (found as `$targetMethodDecl`) should have exactly one overload.\")\n+            val targetMethod = targetMethodDecl.asMethod\n+            Core.Lang.DefCall(Some(api.ModuleRef(backendSymbol)))(targetMethod, targs: _*)(argss: _*)\n+          }\n+        } andThen {_.tree}\n \n-      // Gather DataBag vals that are referenced from higher-order context\n-      val Attr.acc(_, valsRefdFromHigh :: _) = withHighContext.accumulateWith[Set[u.TermSymbol]] {\n-        case Attr.inh(Core.Lang.ValRef(sym), true :: _)\n-        if api.Type.of(sym).typeConstructor =:= API.DataBag =>\n-          Set(sym)\n-      }.traverseAny(ctorsChanged)\n+      // Change sources, join, and cross.\n+      val staticCallsChanged = ({\n+        changeStaticCalls(API.bagModuleSymbol, API.sourceOps)","path":"emma-language/src/main/scala/org/emmalanguage/compiler/lang/backend/TranslateToDataflows.scala","position":null,"original_position":43,"commit_id":"2b58ebb3fe5dcb3501c2718d882eb1873eb15c57","original_commit_id":"b6b2d3f3ddebc2017616f1f817d1901cdffcbba1","user":{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false},"body":"596dc394982153c6dbe2f8dd7276c6341352e42e","created_at":"2016-11-15T15:31:09Z","updated_at":"2016-11-15T15:31:09Z","html_url":"https://github.com/emmalanguage/emma/pull/276#discussion_r88040302","pull_request_url":"https://api.github.com/repos/emmalanguage/emma/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/comments/88040302"},"html":{"href":"https://github.com/emmalanguage/emma/pull/276#discussion_r88040302"},"pull_request":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/emmalanguage/emma/pulls/276","id":93378862,"html_url":"https://github.com/emmalanguage/emma/pull/276","diff_url":"https://github.com/emmalanguage/emma/pull/276.diff","patch_url":"https://github.com/emmalanguage/emma/pull/276.patch","issue_url":"https://api.github.com/repos/emmalanguage/emma/issues/276","number":276,"state":"open","locked":false,"title":"[IR] Handle equiJoin and cross","user":{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false},"body":"The main thing here is the first commit, which takes care of `equiJoin` and `cross`, and changes `BaseCodegenTest` to use comprehension combination instead of just desugaring.","created_at":"2016-11-11T18:48:55Z","updated_at":"2016-11-15T15:31:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c36e2f0fd31d5705e1423846c28bbd121bec4e37","assignee":{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false},"assignees":[{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/emmalanguage/emma/milestones/40","html_url":"https://github.com/emmalanguage/emma/milestones/Nov%202016","labels_url":"https://api.github.com/repos/emmalanguage/emma/milestones/40/labels","id":1957589,"number":40,"title":"Nov 2016","description":"","creator":{"login":"aalexandrov","id":1071946,"avatar_url":"https://avatars.githubusercontent.com/u/1071946?v=3","gravatar_id":"","url":"https://api.github.com/users/aalexandrov","html_url":"https://github.com/aalexandrov","followers_url":"https://api.github.com/users/aalexandrov/followers","following_url":"https://api.github.com/users/aalexandrov/following{/other_user}","gists_url":"https://api.github.com/users/aalexandrov/gists{/gist_id}","starred_url":"https://api.github.com/users/aalexandrov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalexandrov/subscriptions","organizations_url":"https://api.github.com/users/aalexandrov/orgs","repos_url":"https://api.github.com/users/aalexandrov/repos","events_url":"https://api.github.com/users/aalexandrov/events{/privacy}","received_events_url":"https://api.github.com/users/aalexandrov/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":11,"state":"open","created_at":"2016-08-23T10:02:43Z","updated_at":"2016-11-15T11:02:10Z","due_on":"2016-11-30T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/emmalanguage/emma/pulls/276/commits","review_comments_url":"https://api.github.com/repos/emmalanguage/emma/pulls/276/comments","review_comment_url":"https://api.github.com/repos/emmalanguage/emma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emmalanguage/emma/issues/276/comments","statuses_url":"https://api.github.com/repos/emmalanguage/emma/statuses/2b58ebb3fe5dcb3501c2718d882eb1873eb15c57","head":{"label":"ggevay:join-cross","ref":"join-cross","sha":"2b58ebb3fe5dcb3501c2718d882eb1873eb15c57","user":{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false},"repo":{"id":66292815,"name":"emma-1","full_name":"ggevay/emma-1","owner":{"login":"ggevay","id":11377925,"avatar_url":"https://avatars.githubusercontent.com/u/11377925?v=3","gravatar_id":"","url":"https://api.github.com/users/ggevay","html_url":"https://github.com/ggevay","followers_url":"https://api.github.com/users/ggevay/followers","following_url":"https://api.github.com/users/ggevay/following{/other_user}","gists_url":"https://api.github.com/users/ggevay/gists{/gist_id}","starred_url":"https://api.github.com/users/ggevay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggevay/subscriptions","organizations_url":"https://api.github.com/users/ggevay/orgs","repos_url":"https://api.github.com/users/ggevay/repos","events_url":"https://api.github.com/users/ggevay/events{/privacy}","received_events_url":"https://api.github.com/users/ggevay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ggevay/emma-1","description":"Implicit Parallelism for Scalable Data Analysis.","fork":true,"url":"https://api.github.com/repos/ggevay/emma-1","forks_url":"https://api.github.com/repos/ggevay/emma-1/forks","keys_url":"https://api.github.com/repos/ggevay/emma-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ggevay/emma-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ggevay/emma-1/teams","hooks_url":"https://api.github.com/repos/ggevay/emma-1/hooks","issue_events_url":"https://api.github.com/repos/ggevay/emma-1/issues/events{/number}","events_url":"https://api.github.com/repos/ggevay/emma-1/events","assignees_url":"https://api.github.com/repos/ggevay/emma-1/assignees{/user}","branches_url":"https://api.github.com/repos/ggevay/emma-1/branches{/branch}","tags_url":"https://api.github.com/repos/ggevay/emma-1/tags","blobs_url":"https://api.github.com/repos/ggevay/emma-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ggevay/emma-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ggevay/emma-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/ggevay/emma-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ggevay/emma-1/statuses/{sha}","languages_url":"https://api.github.com/repos/ggevay/emma-1/languages","stargazers_url":"https://api.github.com/repos/ggevay/emma-1/stargazers","contributors_url":"https://api.github.com/repos/ggevay/emma-1/contributors","subscribers_url":"https://api.github.com/repos/ggevay/emma-1/subscribers","subscription_url":"https://api.github.com/repos/ggevay/emma-1/subscription","commits_url":"https://api.github.com/repos/ggevay/emma-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/ggevay/emma-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/ggevay/emma-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/ggevay/emma-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/ggevay/emma-1/contents/{+path}","compare_url":"https://api.github.com/repos/ggevay/emma-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ggevay/emma-1/merges","archive_url":"https://api.github.com/repos/ggevay/emma-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ggevay/emma-1/downloads","issues_url":"https://api.github.com/repos/ggevay/emma-1/issues{/number}","pulls_url":"https://api.github.com/repos/ggevay/emma-1/pulls{/number}","milestones_url":"https://api.github.com/repos/ggevay/emma-1/milestones{/number}","notifications_url":"https://api.github.com/repos/ggevay/emma-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ggevay/emma-1/labels{/name}","releases_url":"https://api.github.com/repos/ggevay/emma-1/releases{/id}","deployments_url":"https://api.github.com/repos/ggevay/emma-1/deployments","created_at":"2016-08-22T17:18:56Z","updated_at":"2016-08-22T17:18:58Z","pushed_at":"2016-11-15T15:30:59Z","git_url":"git://github.com/ggevay/emma-1.git","ssh_url":"git@github.com:ggevay/emma-1.git","clone_url":"https://github.com/ggevay/emma-1.git","svn_url":"https://github.com/ggevay/emma-1","homepage":"http://emma-language.org","size":7523,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"emmalanguage:newir","ref":"newir","sha":"23edb93e2ad021c93ec2490dd58b9addc438e3ed","user":{"login":"emmalanguage","id":18483401,"avatar_url":"https://avatars.githubusercontent.com/u/18483401?v=3","gravatar_id":"","url":"https://api.github.com/users/emmalanguage","html_url":"https://github.com/emmalanguage","followers_url":"https://api.github.com/users/emmalanguage/followers","following_url":"https://api.github.com/users/emmalanguage/following{/other_user}","gists_url":"https://api.github.com/users/emmalanguage/gists{/gist_id}","starred_url":"https://api.github.com/users/emmalanguage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmalanguage/subscriptions","organizations_url":"https://api.github.com/users/emmalanguage/orgs","repos_url":"https://api.github.com/users/emmalanguage/repos","events_url":"https://api.github.com/users/emmalanguage/events{/privacy}","received_events_url":"https://api.github.com/users/emmalanguage/received_events","type":"Organization","site_admin":false},"repo":{"id":17373846,"name":"emma","full_name":"emmalanguage/emma","owner":{"login":"emmalanguage","id":18483401,"avatar_url":"https://avatars.githubusercontent.com/u/18483401?v=3","gravatar_id":"","url":"https://api.github.com/users/emmalanguage","html_url":"https://github.com/emmalanguage","followers_url":"https://api.github.com/users/emmalanguage/followers","following_url":"https://api.github.com/users/emmalanguage/following{/other_user}","gists_url":"https://api.github.com/users/emmalanguage/gists{/gist_id}","starred_url":"https://api.github.com/users/emmalanguage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmalanguage/subscriptions","organizations_url":"https://api.github.com/users/emmalanguage/orgs","repos_url":"https://api.github.com/users/emmalanguage/repos","events_url":"https://api.github.com/users/emmalanguage/events{/privacy}","received_events_url":"https://api.github.com/users/emmalanguage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emmalanguage/emma","description":"Implicit Parallelism for Scalable Data Analysis.","fork":false,"url":"https://api.github.com/repos/emmalanguage/emma","forks_url":"https://api.github.com/repos/emmalanguage/emma/forks","keys_url":"https://api.github.com/repos/emmalanguage/emma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emmalanguage/emma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emmalanguage/emma/teams","hooks_url":"https://api.github.com/repos/emmalanguage/emma/hooks","issue_events_url":"https://api.github.com/repos/emmalanguage/emma/issues/events{/number}","events_url":"https://api.github.com/repos/emmalanguage/emma/events","assignees_url":"https://api.github.com/repos/emmalanguage/emma/assignees{/user}","branches_url":"https://api.github.com/repos/emmalanguage/emma/branches{/branch}","tags_url":"https://api.github.com/repos/emmalanguage/emma/tags","blobs_url":"https://api.github.com/repos/emmalanguage/emma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emmalanguage/emma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emmalanguage/emma/git/refs{/sha}","trees_url":"https://api.github.com/repos/emmalanguage/emma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emmalanguage/emma/statuses/{sha}","languages_url":"https://api.github.com/repos/emmalanguage/emma/languages","stargazers_url":"https://api.github.com/repos/emmalanguage/emma/stargazers","contributors_url":"https://api.github.com/repos/emmalanguage/emma/contributors","subscribers_url":"https://api.github.com/repos/emmalanguage/emma/subscribers","subscription_url":"https://api.github.com/repos/emmalanguage/emma/subscription","commits_url":"https://api.github.com/repos/emmalanguage/emma/commits{/sha}","git_commits_url":"https://api.github.com/repos/emmalanguage/emma/git/commits{/sha}","comments_url":"https://api.github.com/repos/emmalanguage/emma/comments{/number}","issue_comment_url":"https://api.github.com/repos/emmalanguage/emma/issues/comments{/number}","contents_url":"https://api.github.com/repos/emmalanguage/emma/contents/{+path}","compare_url":"https://api.github.com/repos/emmalanguage/emma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emmalanguage/emma/merges","archive_url":"https://api.github.com/repos/emmalanguage/emma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emmalanguage/emma/downloads","issues_url":"https://api.github.com/repos/emmalanguage/emma/issues{/number}","pulls_url":"https://api.github.com/repos/emmalanguage/emma/pulls{/number}","milestones_url":"https://api.github.com/repos/emmalanguage/emma/milestones{/number}","notifications_url":"https://api.github.com/repos/emmalanguage/emma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emmalanguage/emma/labels{/name}","releases_url":"https://api.github.com/repos/emmalanguage/emma/releases{/id}","deployments_url":"https://api.github.com/repos/emmalanguage/emma/deployments","created_at":"2014-03-03T17:30:30Z","updated_at":"2016-10-31T20:00:33Z","pushed_at":"2016-11-15T15:30:59Z","git_url":"git://github.com/emmalanguage/emma.git","ssh_url":"git@github.com:emmalanguage/emma.git","clone_url":"https://github.com/emmalanguage/emma.git","svn_url":"https://github.com/emmalanguage/emma","homepage":"http://emma-language.org","size":7834,"stargazers_count":8,"watchers_count":8,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":47,"forks":8,"open_issues":47,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/276"},"html":{"href":"https://github.com/emmalanguage/emma/pull/276"},"issue":{"href":"https://api.github.com/repos/emmalanguage/emma/issues/276"},"comments":{"href":"https://api.github.com/repos/emmalanguage/emma/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emmalanguage/emma/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/emmalanguage/emma/statuses/2b58ebb3fe5dcb3501c2718d882eb1873eb15c57"}}}}
{"actor":{"display_login":"ggevay"}}