-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
In compiler.go
// if.body
func() {
defer p.restoreScope(p.scope)
p.enterScope()
fmt.Fprintf(w, "\n%s:\n", ifBody)
if stmt.Else != nil {
p.compileStmt(w, stmt.Body)
fmt.Fprintf(w, "\tbr label %%%s\n", ifElse) // here
} else {
p.compileStmt(w, stmt.Body)
fmt.Fprintf(w, "\tbr label %%%s\n", ifEnd)
}
}()the ifElse should be ifEnd !
By the way, I am also curious about why labels ifInit and ifCond are needed, since they are branched to immediately.
Metadata
Metadata
Assignees
Labels
No labels