diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-07-02 15:46:51 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-07-02 16:03:51 -0700 |
commit | f35d86fd5febaa32a9a28b3a35bffaff43bc89bd (patch) | |
tree | 7b163c6f98a806ac72410bfa14aeef4fd42a012e /src/cmd/compile/internal/escape | |
parent | b994cc69e05d7821a08f75619f356ecfe5ca9b43 (diff) | |
parent | 912f0750472dd4f674b69ca1616bfaf377af1805 (diff) | |
download | go-f35d86fd5febaa32a9a28b3a35bffaff43bc89bd.tar.gz go-f35d86fd5febaa32a9a28b3a35bffaff43bc89bd.zip |
[dev.typeparams] all: merge master (912f075) into dev.typeparams
Conflicts:
- src/cmd/compile/internal/escape/escape.go
On master, CL 332230 changed the ">=" in HeapAllocReason to ">"; but
on dev.typeparams, CL 329989 moved HeapAllocReason into utils.go.
Merge List:
+ 2021-07-02 912f075047 net/http: mention socks5 support in proxy
+ 2021-07-02 287c5e8066 cmd/compile: fix stack growing algorithm
+ 2021-07-02 743f03eeb0 spec, unsafe: clarify unsafe.Slice docs
+ 2021-07-02 6125d0c426 cmd/dist: correct comment: SysProcAttri -> SysProcAttr
+ 2021-07-01 03761ede02 net: don't reject null mx records
+ 2021-07-01 877688c838 testing: add TB.Setenv
+ 2021-07-01 ef8ae82b37 cmd/compile: fix bug in dwarf-gen var location generation
+ 2021-07-01 770899f7e1 cmd/go: add a regression test for 'go mod vendor' path traversal
+ 2021-07-01 835d86a17e cmd/go: use path.Dir instead of filepath.Dir for package paths in 'go mod vendor'
+ 2021-07-01 eb437ba92c cmd/compile: make stack value size threshold comparisons consistent
+ 2021-07-01 9d65578b83 cmd/compile: fix typos in document
Change-Id: I08aa852441af0f070aa32dd2f99b6fa4e9d79cfa
Diffstat (limited to 'src/cmd/compile/internal/escape')
-rw-r--r-- | src/cmd/compile/internal/escape/utils.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/escape/utils.go b/src/cmd/compile/internal/escape/utils.go index 1ac4cc6029..6e2f9c424a 100644 --- a/src/cmd/compile/internal/escape/utils.go +++ b/src/cmd/compile/internal/escape/utils.go @@ -186,14 +186,14 @@ func HeapAllocReason(n ir.Node) string { return "too large for stack" } - if (n.Op() == ir.ONEW || n.Op() == ir.OPTRLIT) && n.Type().Elem().Width >= ir.MaxImplicitStackVarSize { + if (n.Op() == ir.ONEW || n.Op() == ir.OPTRLIT) && n.Type().Elem().Width > ir.MaxImplicitStackVarSize { return "too large for stack" } - if n.Op() == ir.OCLOSURE && typecheck.ClosureType(n.(*ir.ClosureExpr)).Size() >= ir.MaxImplicitStackVarSize { + if n.Op() == ir.OCLOSURE && typecheck.ClosureType(n.(*ir.ClosureExpr)).Size() > ir.MaxImplicitStackVarSize { return "too large for stack" } - if n.Op() == ir.OMETHVALUE && typecheck.PartialCallType(n.(*ir.SelectorExpr)).Size() >= ir.MaxImplicitStackVarSize { + if n.Op() == ir.OMETHVALUE && typecheck.PartialCallType(n.(*ir.SelectorExpr)).Size() > ir.MaxImplicitStackVarSize { return "too large for stack" } @@ -206,7 +206,7 @@ func HeapAllocReason(n ir.Node) string { if !ir.IsSmallIntConst(r) { return "non-constant size" } - if t := n.Type(); t.Elem().Width != 0 && ir.Int64Val(r) >= ir.MaxImplicitStackVarSize/t.Elem().Width { + if t := n.Type(); t.Elem().Width != 0 && ir.Int64Val(r) > ir.MaxImplicitStackVarSize/t.Elem().Width { return "too large for stack" } } |