]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: eliminate OXFALL
authorMatthew Dempsky <mdempsky@google.com>
Fri, 1 Sep 2017 21:55:15 +0000 (14:55 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 19 Sep 2017 18:08:50 +0000 (18:08 +0000)
commit4347baac7d7e99a9cf1500545860cc42ae217702
treea234af87cd767b5ce8136fb2964d5ee84d848d5a
parentc100a0f6680318cb0511b0ecebccb1cdf0eae9b3
cmd/compile: eliminate OXFALL

Previously, we used OXFALL vs OFALL to distinguish fallthrough
statements that had been validated. Because in the Node AST we flatten
statement blocks, OXCASE and OXFALL needed to keep track of their
block scopes for this purpose.

Now that we have an AST that keeps these separate, we can just perform
the validation earlier.

Passes toolstash-check.

Fixes #14540.

Change-Id: I8421eaba16c2b3b72c9c5483b5cf20b14261385e
Reviewed-on: https://go-review.googlesource.com/61130
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
12 files changed:
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/noder.go
src/cmd/compile/internal/gc/opnames.go
src/cmd/compile/internal/gc/order.go
src/cmd/compile/internal/gc/racewalk.go
src/cmd/compile/internal/gc/swt.go
src/cmd/compile/internal/gc/syntax.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/gc/walk.go
test/fixedbugs/issue14540.go [new file with mode: 0644]