diff options
| author | Cherry Zhang <cherryyz@google.com> | 2020-04-18 01:13:39 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2020-04-18 18:07:52 +0000 |
| commit | 2a20f5c47456dbe648100d37831ca439cc79a9ff (patch) | |
| tree | 21f024cb9a0d2858a861c61b9a0f5c42be1750e1 /src | |
| parent | b0da26a668fd6d4e351a00ca76695c5a233e84a2 (diff) | |
| download | go-2a20f5c47456dbe648100d37831ca439cc79a9ff.tar.xz | |
cmd/link: update comment for deadcode
Update the comment to be in sync with the code.
Change-Id: I19586767a37347c4da1b4d3f7c6dc6cc2292a90f
Reviewed-on: https://go-review.googlesource.com/c/go/+/228877
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/link/internal/ld/deadcode.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/link/internal/ld/deadcode.go b/src/cmd/link/internal/ld/deadcode.go index e5bd73cd94..b5bc508356 100644 --- a/src/cmd/link/internal/ld/deadcode.go +++ b/src/cmd/link/internal/ld/deadcode.go @@ -22,7 +22,7 @@ import ( // // 1. direct call // 2. through a reachable interface type -// 3. reflect.Value.Call, .Method, or reflect.Method.Func +// 3. reflect.Value.Method, or reflect.Type.Method // // The first case is handled by the flood fill, a directly called method // is marked as reachable. @@ -33,9 +33,9 @@ import ( // as reachable. This is extremely conservative, but easy and correct. // // The third case is handled by looking to see if any of: -// - reflect.Value.Call is reachable // - reflect.Value.Method is reachable -// - reflect.Type.Method or MethodByName is called. +// - reflect.Type.Method or MethodByName is called (through the +// REFLECTMETHOD attribute marked by the compiler). // If any of these happen, all bets are off and all exported methods // of reachable types are marked reachable. // |
