]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: remove reflectdata.AfterGlobalEscapeAnalysis
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 8 Feb 2023 09:06:50 +0000 (16:06 +0700)
committerGopher Robot <gobot@golang.org>
Thu, 9 Feb 2023 17:01:50 +0000 (17:01 +0000)
This global variable was used by the old frontend to decide whether to
perform escape analysis during method wrapper generation.

The old frontend is gone now, the variable is not used anywhere else.

Change-Id: I448f2761ea608a9a2ec39a9920fcf7aa12d98799
Reviewed-on: https://go-review.googlesource.com/c/go/+/466278
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/gc/main.go
src/cmd/compile/internal/reflectdata/reflect.go

index b2a37b9b024c6f9932d0e3d189bd97bb4751eb78..3c2b9c48ec68906bfa7453e0f9b3e6cbe77b2564 100644 (file)
@@ -293,11 +293,6 @@ func Main(archInit func(*ssagen.ArchInfo)) {
        base.Timer.Start("fe", "escapes")
        escape.Funcs(typecheck.Target.Decls)
 
-       // TODO(mdempsky): This is a hack. We need a proper, global work
-       // queue for scheduling function compilation so components don't
-       // need to adjust their behavior depending on when they're called.
-       reflectdata.AfterGlobalEscapeAnalysis = true
-
        // Collect information for go:nowritebarrierrec
        // checking. This must happen before transforming closures during Walk
        // We'll do the final check after write barriers are
index afc3ee4fc9e75615f10bee2a5059d8f1499abb22..cde8c6887628f118f160a6981dd69968c6f066d1 100644 (file)
@@ -1869,12 +1869,6 @@ func methodWrapper(rcvr *types.Type, method *types.Field, forItab bool) *obj.LSy
        return lsym
 }
 
-// AfterGlobalEscapeAnalysis tracks whether package gc has already
-// performed the main, global escape analysis pass. If so,
-// methodWrapper takes responsibility for escape analyzing any
-// generated wrappers.
-var AfterGlobalEscapeAnalysis bool
-
 var ZeroSize int64
 
 // MarkTypeUsedInInterface marks that type t is converted to an interface.