mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: handle unsafe builtins like universal builtins
Reuse the same mechanisms for handling universal builtins like len to handle unsafe.Sizeof, etc. Allows us to drop package unsafe's export data, and simplifies some code. Updates #17508. Change-Id: I620e0617c24e57e8a2d7cccd0e2de34608779656 Reviewed-on: https://go-review.googlesource.com/31433 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
7eed848a17
commit
3f2cb493e5
11 changed files with 95 additions and 162 deletions
|
|
@ -427,6 +427,9 @@ const (
|
|||
OREAL // real(Left)
|
||||
OIMAG // imag(Left)
|
||||
OCOMPLEX // complex(Left, Right)
|
||||
OALIGNOF // unsafe.Alignof(Left)
|
||||
OOFFSETOF // unsafe.Offsetof(Left)
|
||||
OSIZEOF // unsafe.Sizeof(Left)
|
||||
|
||||
// statements
|
||||
OBLOCK // { List } (block of code)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue