Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53bd915

Browse files
committed
cmd/compile: classify more nodes as "poor choices" for statements
Aggregate-making nodes that are later decomposed are poor choices for statements, because the decomposition phase turns them into multiple sub-values, some of which may be dead. Better to look elsewhere for a statement mark. Change-Id: Ibd9584138ab3d1384548686896a28580a2e43f54 Reviewed-on: https://go-review.googlesource.com/c/go/+/198477 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jeremy Faller <jeremy@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
1 parent 6139019 commit 53bd915

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/cmd/compile/internal/ssa/numberlines.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ func isPoorStatementOp(op Op) bool {
1515
switch op {
1616
// Note that Nilcheck often vanishes, but when it doesn't, you'd love to start the statement there
1717
// so that a debugger-user sees the stop before the panic, and can examine the value.
18-
case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect, OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F:
18+
case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect,
19+
OpIMake, OpStringMake, OpSliceMake, OpStructMake0, OpStructMake1, OpStructMake2, OpStructMake3, OpStructMake4,
20+
OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F:
1921
return true
2022
}
2123
return false

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /