On Wed, Apr 20, 2022 at 6:31 AM Lanzhiguan Huang <huanglanzhig...@gmail.com> wrote: > > In gc's implementation, the itab struct has an interface type and an object > type field and a method table, while in the GoLLVM's implementation, the type > descriptor was moved to the first field of the method table. I think they > just maintain the same information but do not understand the purposes of the > design. Currently the difference may cause incompatibility between the two > compilers.
There is no safe way for Go code to ever see these structures, so the difference should not matter to any ordinary Go programs. At this point I don't think there is any deep reason for the slightly different design. Historically it was because the gc implementation used a runtime cache, but these days the gofrontend implementation used by GoLLVM also uses a runtime cache. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXEz6S%2BrujNhC7oZ6gc1fXmUAEzzef_czU8h6Qwtp69MQ%40mail.gmail.com.