]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: Deduplicate panic{index,slice,divide} calls
authorKeith Randall <khr@golang.org>
Tue, 10 Nov 2015 05:35:40 +0000 (21:35 -0800)
committerKeith Randall <khr@golang.org>
Tue, 10 Nov 2015 16:56:11 +0000 (16:56 +0000)
commit74e568f43a8dc5a2d52fe4b761ae256dadded8ce
tree6b4c86c1319f5ad50060f201deb1890128a94d74
parent170589ee1ce4ef87e6a91ad05ea03422cf3f0908
[dev.ssa] cmd/compile: Deduplicate panic{index,slice,divide} calls

Panics are only distinguished by their type and line number, so
if we can trigger two of those panics in the same line, use the
same panic call.  For example, in a[i]+b[j] we need only one
panicindex call that both bounds checks can use.

Change-Id: Ia2b6d3b1a67f2775df05fb72b8a1b149833572b7
Reviewed-on: https://go-review.googlesource.com/16772
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/ssa.go