aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/universe.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-04-21 02:11:15 -0700
committerMatthew Dempsky <mdempsky@google.com>2021-05-02 20:38:13 +0000
commitfadad851a3222867b374e901ede9c4919594837f (patch)
tree7b4efe046ea2da139b27ce5091d0cbd058bdf331 /src/cmd/compile/internal/typecheck/universe.go
parent0d32d9e8a8784cf3ef39c471b73e502c51085b6d (diff)
downloadgo-fadad851a3222867b374e901ede9c4919594837f.tar.gz
go-fadad851a3222867b374e901ede9c4919594837f.zip
cmd/compile: implement unsafe.Add and unsafe.Slice
Updates #19367. Updates #40481. Change-Id: Iabd2afdd0d520e5d68fd9e6dedd013335a4b3886 Reviewed-on: https://go-review.googlesource.com/c/go/+/312214 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Trust: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/universe.go')
-rw-r--r--src/cmd/compile/internal/typecheck/universe.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/typecheck/universe.go b/src/cmd/compile/internal/typecheck/universe.go
index f04dcb671c..de185ab944 100644
--- a/src/cmd/compile/internal/typecheck/universe.go
+++ b/src/cmd/compile/internal/typecheck/universe.go
@@ -85,9 +85,11 @@ var unsafeFuncs = [...]struct {
name string
op ir.Op
}{
+ {"Add", ir.OUNSAFEADD},
{"Alignof", ir.OALIGNOF},
{"Offsetof", ir.OOFFSETOF},
{"Sizeof", ir.OSIZEOF},
+ {"Slice", ir.OUNSAFESLICE},
}
// InitUniverse initializes the universe block.