Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-04-22 Thread messi...@gmail.com
Hi, Now I've finished the package types2 for typecheck logic, and continue the journey to next step: IR generation(directory: cmd/compile/internal/ir/). It seems the ir package is a new abstract layer created during the refactor process of types2, and it's main purpose is to translate the AST t

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-28 Thread Ian Lance Taylor
On Sun, Feb 28, 2021 at 7:04 AM zhz shi wrote: > > According Russ's plan(replacing cmd/compile/internal/types with types2) and > the discussion topic Jeremy Faller posted, can I understand it as that check2 > will be the entry of new and default typechecker in the future(with the > release of 1

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-28 Thread zhz shi
That's very helpful, thank you Ian. According Russ's plan(replacing cmd/compile/internal/types with types2) and the discussion topic Jeremy Faller posted, can I understand it as that check2

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-26 Thread Ian Lance Taylor
On Fri, Feb 26, 2021 at 12:29 AM messi...@gmail.com wrote: > > I'm reading the source code of version 1.15.6, but I found the code base > structure on master branch is very different, some changes are refactors as > you mentioned above(typechecker), and some are for new features(e.g. > generics

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-26 Thread messi...@gmail.com
Thanks for your suggestion, that's a good idea. Any specific ideas about how to do it? After all, the code/design is evolving all the time. On Friday, February 26, 2021 at 8:43:07 AM UTC+8 skinne...@gmail.com wrote: > Ian, I very much appreciate your taking the time to provide the history > he

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-26 Thread messi...@gmail.com
Thanks a lot for your time, Ian. The history info is very helpful. I'm reading the source code of version 1.15.6, but I found the code base structure on master branch is very different, some changes are refactors as you mentioned above(typechecker), and some are for new features(e.g. generics).

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-25 Thread David Skinner
Ian, I very much appreciate your taking the time to provide the history here. I am almost inclined to suggest that the OP create a design document much the way an engineer creates an as-built design before creating a new design. For my part, I would be willing to assist the OP on an occasional ba

Re: [go-nuts] Need help/tips on golang compiler souce code reading

2021-02-25 Thread Ian Lance Taylor
On Wed, Feb 24, 2021 at 10:24 PM messi...@gmail.com wrote: > > I'm trying to read golang compiler source code and now have come to the > middle of syntax analysis: just finished parser.fileOrNil, next step is > noder.node(). > > So far everything is fine, both lex and syntax tree parsing is eas