{"action":"created","comment":{"url":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/22596556","id":22596556,"diff_hunk":"@@ -64,4 +70,292 @@ object Infos {\n     }\n   }\n \n+  final class ClassInfoBuilder {\n+    private var encodedName: String = \"\"\n+    private var kind: ClassKind = ClassKind.Class\n+    private var isExported: Boolean = false\n+    private var superClass: Option[String] = None\n+    private val interfaces = mutable.ListBuffer.empty[String]\n+    private val methods = mutable.ListBuffer.empty[MethodInfo]\n+\n+    def setEncodedName(encodedName: String): this.type = {\n+      this.encodedName = encodedName\n+      this\n+    }\n+\n+    def setKind(kind: ClassKind): this.type = {\n+      this.kind = kind\n+      this\n+    }\n+\n+    def setIsExported(isExported: Boolean): this.type = {\n+      this.isExported = isExported\n+      this\n+    }\n+\n+    def setSuperClass(superClass: Option[String]): this.type = {\n+      this.superClass = superClass\n+      this\n+    }\n+\n+    def addInterface(interface: String): this.type = {\n+      interfaces += interface\n+      this\n+    }\n+\n+    def addInterfaces(interfaces: TraversableOnce[String]): this.type = {\n+      this.interfaces ++= interfaces\n+      this\n+    }\n+\n+    def addMethod(methodInfo: MethodInfo): this.type = {\n+      methods += methodInfo\n+      this\n+    }\n+\n+    def result(): ClassInfo = {\n+      ClassInfo(encodedName, isExported, kind, superClass,\n+          interfaces.toList, methods.toList)\n+    }\n+  }\n+\n+  final class MethodInfoBuilder {\n+    private var encodedName: String = \"\"\n+    private var isStatic: Boolean = false\n+    private var isAbstract: Boolean = false\n+    private var isExported: Boolean = false\n+\n+    private val methodsCalled = mutable.Map.empty[String, mutable.Set[String]]\n+    private val methodsCalledStatically = mutable.Map.empty[String, mutable.Set[String]]\n+    private val staticMethodsCalled = mutable.Map.empty[String, mutable.Set[String]]\n+    private val instantiatedClasses = mutable.Set.empty[String]\n+    private val accessedModules = mutable.Set.empty[String]\n+    private val accessedClassData = mutable.Set.empty[String]\n+\n+    def setEncodedName(encodedName: String): this.type = {\n+      this.encodedName = encodedName\n+      this\n+    }\n+\n+    def setIsStatic(isStatic: Boolean): this.type = {\n+      this.isStatic = isStatic\n+      this\n+    }\n+\n+    def setIsAbstract(isAbstract: Boolean): this.type = {\n+      this.isAbstract = isAbstract\n+      this\n+    }\n+\n+    def setIsExported(isExported: Boolean): this.type = {\n+      this.isExported = isExported\n+      this\n+    }\n+\n+    def addMethodCalled(receiverTpe: Type, method: String): this.type = {\n+      receiverTpe match {\n+        case ClassType(cls) => addMethodCalled(cls, method)\n+        case AnyType        => addMethodCalled(ObjectClass, method)\n+        case UndefType      => addMethodCalled(BoxedUnitClass, method)\n+        case BooleanType    => addMethodCalled(BoxedBooleanClass, method)\n+        case IntType        => addMethodCalled(BoxedIntegerClass, method)\n+        case LongType       => addMethodCalled(BoxedLongClass, method)\n+        case FloatType      => addMethodCalled(BoxedFloatClass, method)\n+        case DoubleType     => addMethodCalled(BoxedDoubleClass, method)\n+        case StringType     => addMethodCalled(StringClass, method)\n+\n+        case ArrayType(_, _) if method != \"clone__O\" =>\n+          /* clone__O is overridden in the pseudo Array classes and is\n+           * always kept anyway, because it is in scalajsenv.js.\n+           * Other methods delegate to Object, which we can model with\n+           * a static call to Object.method.\n+           */","path":"ir/src/main/scala/org/scalajs/core/ir/Infos.scala","position":141,"original_position":141,"commit_id":"4368e4c694ac27d1a876b12a47ea9273b0eb15dd","original_commit_id":"4368e4c694ac27d1a876b12a47ea9273b0eb15dd","user":{"login":"gzm0","id":1140323,"avatar_url":"https://avatars.githubusercontent.com/u/1140323?v=3","gravatar_id":"","url":"https://api.github.com/users/gzm0","html_url":"https://github.com/gzm0","followers_url":"https://api.github.com/users/gzm0/followers","following_url":"https://api.github.com/users/gzm0/following{/other_user}","gists_url":"https://api.github.com/users/gzm0/gists{/gist_id}","starred_url":"https://api.github.com/users/gzm0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzm0/subscriptions","organizations_url":"https://api.github.com/users/gzm0/orgs","repos_url":"https://api.github.com/users/gzm0/repos","events_url":"https://api.github.com/users/gzm0/events{/privacy}","received_events_url":"https://api.github.com/users/gzm0/received_events","type":"User","site_admin":false},"body":"This is conceptually wrong. What is in the `scalajsenv.js` and what not should be internal to the linker and not influence binary compatibility.","created_at":"2015-01-07T16:29:18Z","updated_at":"2015-01-07T16:29:18Z","html_url":"https://github.com/scala-js/scala-js/pull/1433#discussion_r22596556","pull_request_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1433","_links":{"self":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/22596556"},"html":{"href":"https://github.com/scala-js/scala-js/pull/1433#discussion_r22596556"},"pull_request":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1433"}}},"pull_request":{"url":"https://api.github.com/repos/scala-js/scala-js/pulls/1433","id":26833079,"html_url":"https://github.com/scala-js/scala-js/pull/1433","diff_url":"https://github.com/scala-js/scala-js/pull/1433.diff","patch_url":"https://github.com/scala-js/scala-js/pull/1433.patch","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/1433","number":1433,"state":"open","locked":false,"title":"IR-check info","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-05T16:17:01Z","updated_at":"2015-01-07T16:29:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01b4f9c467ba5720960840bc2a197aef826b4754","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1433/commits","review_comments_url":"https://api.github.com/repos/scala-js/scala-js/pulls/1433/comments","review_comment_url":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/1433/comments","statuses_url":"https://api.github.com/repos/scala-js/scala-js/statuses/4368e4c694ac27d1a876b12a47ea9273b0eb15dd","head":{"label":"sjrd:ir-check-info","ref":"ir-check-info","sha":"4368e4c694ac27d1a876b12a47ea9273b0eb15dd","user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"repo":{"id":8660284,"name":"scala-js","full_name":"sjrd/scala-js","owner":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjrd/scala-js","description":"Scala.js, a Scala to JavaScript compiler","fork":true,"url":"https://api.github.com/repos/sjrd/scala-js","forks_url":"https://api.github.com/repos/sjrd/scala-js/forks","keys_url":"https://api.github.com/repos/sjrd/scala-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjrd/scala-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjrd/scala-js/teams","hooks_url":"https://api.github.com/repos/sjrd/scala-js/hooks","issue_events_url":"https://api.github.com/repos/sjrd/scala-js/issues/events{/number}","events_url":"https://api.github.com/repos/sjrd/scala-js/events","assignees_url":"https://api.github.com/repos/sjrd/scala-js/assignees{/user}","branches_url":"https://api.github.com/repos/sjrd/scala-js/branches{/branch}","tags_url":"https://api.github.com/repos/sjrd/scala-js/tags","blobs_url":"https://api.github.com/repos/sjrd/scala-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjrd/scala-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjrd/scala-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjrd/scala-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjrd/scala-js/statuses/{sha}","languages_url":"https://api.github.com/repos/sjrd/scala-js/languages","stargazers_url":"https://api.github.com/repos/sjrd/scala-js/stargazers","contributors_url":"https://api.github.com/repos/sjrd/scala-js/contributors","subscribers_url":"https://api.github.com/repos/sjrd/scala-js/subscribers","subscription_url":"https://api.github.com/repos/sjrd/scala-js/subscription","commits_url":"https://api.github.com/repos/sjrd/scala-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjrd/scala-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjrd/scala-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjrd/scala-js/issues/comments/{number}","contents_url":"https://api.github.com/repos/sjrd/scala-js/contents/{+path}","compare_url":"https://api.github.com/repos/sjrd/scala-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjrd/scala-js/merges","archive_url":"https://api.github.com/repos/sjrd/scala-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjrd/scala-js/downloads","issues_url":"https://api.github.com/repos/sjrd/scala-js/issues{/number}","pulls_url":"https://api.github.com/repos/sjrd/scala-js/pulls{/number}","milestones_url":"https://api.github.com/repos/sjrd/scala-js/milestones{/number}","notifications_url":"https://api.github.com/repos/sjrd/scala-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjrd/scala-js/labels{/name}","releases_url":"https://api.github.com/repos/sjrd/scala-js/releases{/id}","created_at":"2013-03-08T21:32:59Z","updated_at":"2015-01-07T10:07:38Z","pushed_at":"2015-01-07T14:18:00Z","git_url":"git://github.com/sjrd/scala-js.git","ssh_url":"git@github.com:sjrd/scala-js.git","clone_url":"https://github.com/sjrd/scala-js.git","svn_url":"https://github.com/sjrd/scala-js","homepage":"http://www.scala-js.org/","size":11069,"stargazers_count":11,"watchers_count":11,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"scala-js:master","ref":"master","sha":"570d0d675b2f38ea5bd7f3a61e0ad6f5a3eb993b","user":{"login":"scala-js","id":6039724,"avatar_url":"https://avatars.githubusercontent.com/u/6039724?v=3","gravatar_id":"","url":"https://api.github.com/users/scala-js","html_url":"https://github.com/scala-js","followers_url":"https://api.github.com/users/scala-js/followers","following_url":"https://api.github.com/users/scala-js/following{/other_user}","gists_url":"https://api.github.com/users/scala-js/gists{/gist_id}","starred_url":"https://api.github.com/users/scala-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala-js/subscriptions","organizations_url":"https://api.github.com/users/scala-js/orgs","repos_url":"https://api.github.com/users/scala-js/repos","events_url":"https://api.github.com/users/scala-js/events{/privacy}","received_events_url":"https://api.github.com/users/scala-js/received_events","type":"Organization","site_admin":false},"repo":{"id":8272315,"name":"scala-js","full_name":"scala-js/scala-js","owner":{"login":"scala-js","id":6039724,"avatar_url":"https://avatars.githubusercontent.com/u/6039724?v=3","gravatar_id":"","url":"https://api.github.com/users/scala-js","html_url":"https://github.com/scala-js","followers_url":"https://api.github.com/users/scala-js/followers","following_url":"https://api.github.com/users/scala-js/following{/other_user}","gists_url":"https://api.github.com/users/scala-js/gists{/gist_id}","starred_url":"https://api.github.com/users/scala-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scala-js/subscriptions","organizations_url":"https://api.github.com/users/scala-js/orgs","repos_url":"https://api.github.com/users/scala-js/repos","events_url":"https://api.github.com/users/scala-js/events{/privacy}","received_events_url":"https://api.github.com/users/scala-js/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scala-js/scala-js","description":"Scala.js, the Scala to JavaScript compiler","fork":false,"url":"https://api.github.com/repos/scala-js/scala-js","forks_url":"https://api.github.com/repos/scala-js/scala-js/forks","keys_url":"https://api.github.com/repos/scala-js/scala-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scala-js/scala-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scala-js/scala-js/teams","hooks_url":"https://api.github.com/repos/scala-js/scala-js/hooks","issue_events_url":"https://api.github.com/repos/scala-js/scala-js/issues/events{/number}","events_url":"https://api.github.com/repos/scala-js/scala-js/events","assignees_url":"https://api.github.com/repos/scala-js/scala-js/assignees{/user}","branches_url":"https://api.github.com/repos/scala-js/scala-js/branches{/branch}","tags_url":"https://api.github.com/repos/scala-js/scala-js/tags","blobs_url":"https://api.github.com/repos/scala-js/scala-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scala-js/scala-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scala-js/scala-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/scala-js/scala-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scala-js/scala-js/statuses/{sha}","languages_url":"https://api.github.com/repos/scala-js/scala-js/languages","stargazers_url":"https://api.github.com/repos/scala-js/scala-js/stargazers","contributors_url":"https://api.github.com/repos/scala-js/scala-js/contributors","subscribers_url":"https://api.github.com/repos/scala-js/scala-js/subscribers","subscription_url":"https://api.github.com/repos/scala-js/scala-js/subscription","commits_url":"https://api.github.com/repos/scala-js/scala-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/scala-js/scala-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/scala-js/scala-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/scala-js/scala-js/issues/comments/{number}","contents_url":"https://api.github.com/repos/scala-js/scala-js/contents/{+path}","compare_url":"https://api.github.com/repos/scala-js/scala-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scala-js/scala-js/merges","archive_url":"https://api.github.com/repos/scala-js/scala-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scala-js/scala-js/downloads","issues_url":"https://api.github.com/repos/scala-js/scala-js/issues{/number}","pulls_url":"https://api.github.com/repos/scala-js/scala-js/pulls{/number}","milestones_url":"https://api.github.com/repos/scala-js/scala-js/milestones{/number}","notifications_url":"https://api.github.com/repos/scala-js/scala-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scala-js/scala-js/labels{/name}","releases_url":"https://api.github.com/repos/scala-js/scala-js/releases{/id}","created_at":"2013-02-18T16:33:55Z","updated_at":"2015-01-07T03:23:50Z","pushed_at":"2015-01-06T17:49:07Z","git_url":"git://github.com/scala-js/scala-js.git","ssh_url":"git@github.com:scala-js/scala-js.git","clone_url":"https://github.com/scala-js/scala-js.git","svn_url":"https://github.com/scala-js/scala-js","homepage":"http://www.scala-js.org/","size":12641,"stargazers_count":1358,"watchers_count":1358,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":33,"forks":107,"open_issues":33,"watchers":1358,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1433"},"html":{"href":"https://github.com/scala-js/scala-js/pull/1433"},"issue":{"href":"https://api.github.com/repos/scala-js/scala-js/issues/1433"},"comments":{"href":"https://api.github.com/repos/scala-js/scala-js/issues/1433/comments"},"review_comments":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1433/comments"},"review_comment":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/scala-js/scala-js/pulls/1433/commits"},"statuses":{"href":"https://api.github.com/repos/scala-js/scala-js/statuses/4368e4c694ac27d1a876b12a47ea9273b0eb15dd"}}}}