-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: streamline pragma checks for TypeDecl #64076
base: master
Are you sure you want to change the base?
Conversation
Simplify the handling of pragmas in type declarations within noder/writer.go. Remove redundant checks by calling checkPragmas once at the beginning of case *syntax.TypeDecl and eliminate unnecessary else block. Also, ensure unique ID assignment for function-scoped defined types is only performed when n.Alias is false. Fixes a redundancy issue where pragma checks were performed inside both branches of an if-else statement unnecessarily. Update golang#46731
This PR (HEAD: cd66b5a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/541739. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Jes Cok: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from qiulaidongfeng: Patch Set 2: Code-Review+1 Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Jes Cok: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Jes Cok: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Message from Aimuz me: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/541739. |
Simplify the handling of pragmas in type declarations within
noder/writer.go. Remove redundant checks by calling checkPragmas once at
the beginning of case *syntax.TypeDecl and eliminate unnecessary else block.
Also, ensure unique ID assignment for function-scoped defined types is only
performed when n.Alias is false.
Fixes a redundancy issue where pragma checks were performed inside both
branches of an if-else statement unnecessarily.
For #46731