From 4fbf54fa0a4532753d2aac880e6d91202899a54e Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Fri, 17 Nov 2017 10:03:55 -0500 Subject: [PATCH] cmd/compile: fix comment that -N does not disable escape analysis -N does not disable escape analysis. Remove the outdated comment. Change-Id: I96978b3afd51324b7b4f8035cf4417fb2eac4ebc Reviewed-on: https://go-review.googlesource.com/79015 Reviewed-by: David Chase --- src/cmd/compile/internal/gc/esc.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cmd/compile/internal/gc/esc.go b/src/cmd/compile/internal/gc/esc.go index d46a42239e..7ef07961de 100644 --- a/src/cmd/compile/internal/gc/esc.go +++ b/src/cmd/compile/internal/gc/esc.go @@ -173,12 +173,6 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 { // then the value can stay on the stack. If the value new(T) does // not escape, then new(T) can be rewritten into a stack allocation. // The same is true of slice literals. -// -// If optimizations are disabled (-N), this code is not used. -// Instead, the compiler assumes that any value whose address -// is taken without being immediately dereferenced -// needs to be moved to the heap, and new(T) and slice -// literals are always real allocations. func escapes(all []*Node) { visitBottomUp(all, escAnalyze) -- 2.50.0