{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/20304","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/20304/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/20304/comments","events_url":"https://api.github.com/repos/golang/go/issues/20304/events","html_url":"https://github.com/golang/go/issues/20304","id":227522382,"number":20304,"title":"cmd/compile: clean more up after ssa.Type -> types.Type refactoring","user":{"login":"josharian","id":67496,"avatar_url":"https://avatars2.githubusercontent.com/u/67496?v=4","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"labels":[{"id":150880243,"url":"https://api.github.com/repos/golang/go/labels/help%20wanted","name":"help wanted","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/62","html_url":"https://github.com/golang/go/milestone/62","labels_url":"https://api.github.com/repos/golang/go/milestones/62/labels","id":2827591,"number":62,"title":"Go1.11","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":761,"closed_issues":55,"state":"open","created_at":"2017-10-10T13:39:17Z","updated_at":"2018-02-01T19:24:19Z","due_on":"2018-07-31T07:00:00Z","closed_at":null},"comments":13,"created_at":"2017-05-09T23:01:22Z","updated_at":"2018-02-02T00:45:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"CL 42145 switched package ssa to use types.Type for types. Further cleanup is now possible: Eliminating (in part or in full) ssa.Types, streamlining/eliminating some types.Type methods, moving universe initialization to package types. This is a reminder to do that.\r\n\r\ncc @randall77 @mdempsky @griesemer \r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/362450160","html_url":"https://github.com/golang/go/issues/20304#issuecomment-362450160","issue_url":"https://api.github.com/repos/golang/go/issues/20304","id":362450160,"user":{"login":"josharian","id":67496,"avatar_url":"https://avatars2.githubusercontent.com/u/67496?v=4","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T00:45:00Z","updated_at":"2018-02-02T00:45:00Z","author_association":"CONTRIBUTOR","body":"> Eliminating ssa.Types would cause a large volume of renaming Bool to TBOOL, Int8 to TINT8 etc and I don’t really see much value in that, at least in the short term\r\n\r\nWhat about just adding more \"convenience constants\" in the right place? See cmd/compile/internal/gc/types.go.\r\n\r\n> Moving universe.go to types package\r\n> This can be done easily enough but I don’t see that it will have any benefit.\r\n\r\nAt a minimum it would help with the package ssa tests, which currently manually initialize some bits of the universe. And it'd be better in the sense that that is where it belongs, and having things where they belong tends to pay dividends.\r\n\r\n> Leave a “small” align.go with just func Rnd in gc?\r\n\r\nOr just move Rnd to some other grab-bag util file, like cmd/internal/obj/util.go. It could also really use a doc string. Also, is the cmd/link/internal/ld Rnd identical or not? If identical, it could use the cmd/internal/obj Rnd.\r\n\r\n> Used only to define method *Type.Symbol in types/type.go.\r\n> This method is apparently not used.\r\n\r\nUsed in writebarrier.go, I believe.\r\n\r\n> The rest of the constants - FErr, FmtLeft, FmtUnsigned, FmtFlag, fmtMode and functions - sconv, tconv, symFormat, typeFormat all come from gc/fmt.go.\r\n> They could be “moved” to the types package (utils.go?) and “copied” to gc/types.go as “convenience constants (and functions)”. Not an ideal solution but workable.\r\n\r\nfmt.go is a train wreck. I would touch/modify it as little as possible. convenience constants seem fine, though.\r\n\r\n> As for Widthptr and Ctxt, could part of gc/main.go be moved back up to cmd/compile/main.go so that “architecture” (and maybe other) values can be propagated to both types and gc? Either that or have a types module up at that level. It seems that the types package needs some initialisation.\r\n\r\nThat seems reasonable to me, but I'd like @mdempsky's opinion.\r\n\r\n\r\n"}}
{"actor":{"display_login":"josharian"}}