Skip to content

cmd/compile: possible typo in ssa.go #16139

@gyuho

Description

@gyuho

https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go#L3699

// checkgoto checks that a goto from from to to does not
// jump into a block or jump over variable declarations.
// It is a copy of checkgoto in the pre-SSA backend,
// modified only for line number handling.
// TODO: document how this works and why it is designed the way it is.
func (s *state) checkgoto(from *Node, to *Node) {
    if from.Sym == to.Sym {
        return
    }
...

I just came across this cryptic comment from from to to.
Is this typo? If not, can anybody help me understand this comment?

If it's not a typo, please feel free to close this :)

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions