aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ir/node.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-06-21 22:03:02 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-06-22 09:11:39 +0000
commit077100dfcd11b2aba4bd3099d5d28b4ce7de1126 (patch)
tree7a15e4c9a57ddc9115047943c74f5d6a6705b7c3 /src/cmd/compile/internal/ir/node.go
parent859d903b06af669edbbc74be371186f732b60bfa (diff)
downloadgo-077100dfcd11b2aba4bd3099d5d28b4ce7de1126.tar.gz
go-077100dfcd11b2aba4bd3099d5d28b4ce7de1126.zip
[dev.typeparams] cmd/compile: remove special escape analysis tags
This CL removes the special escape analysis tags added to support //go:uintptrescapes and calls to external functions. Instead, these are kept as function pragmas. This CL by itself isn't very interesting, but I expect will help with subsequent cleanups I have planned here. Change-Id: Ifb960289a27e0a6295ce2d2f5ec233cac590522b Reviewed-on: https://go-review.googlesource.com/c/go/+/329969 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ir/node.go')
-rw-r--r--src/cmd/compile/internal/ir/node.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cmd/compile/internal/ir/node.go b/src/cmd/compile/internal/ir/node.go
index 9191eeb1d6c..7c3dc10e46d 100644
--- a/src/cmd/compile/internal/ir/node.go
+++ b/src/cmd/compile/internal/ir/node.go
@@ -436,18 +436,19 @@ func (s NameSet) Sorted(less func(*Name, *Name) bool) []*Name {
return res
}
-type PragmaFlag int16
+type PragmaFlag uint16
const (
// Func pragmas.
- Nointerface PragmaFlag = 1 << iota
- Noescape // func parameters don't escape
- Norace // func must not have race detector annotations
- Nosplit // func should not execute on separate stack
- Noinline // func should not be inlined
- NoCheckPtr // func should not be instrumented by checkptr
- CgoUnsafeArgs // treat a pointer to one arg as a pointer to them all
- UintptrEscapes // pointers converted to uintptr escape
+ Nointerface PragmaFlag = 1 << iota
+ Noescape // func parameters don't escape
+ Norace // func must not have race detector annotations
+ Nosplit // func should not execute on separate stack
+ Noinline // func should not be inlined
+ NoCheckPtr // func should not be instrumented by checkptr
+ CgoUnsafeArgs // treat a pointer to one arg as a pointer to them all
+ UintptrKeepAlive // pointers converted to uintptr must be kept alive (compiler internal only)
+ UintptrEscapes // pointers converted to uintptr escape
// Runtime-only func pragmas.
// See ../../../../runtime/README.md for detailed descriptions.