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
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
// +build ignore
|
||||
|
||||
// Generate builtin.go from builtin/runtime.go and builtin/unsafe.go.
|
||||
// Run this after changing builtin/runtime.go and builtin/unsafe.go
|
||||
// Generate builtin.go from builtin/runtime.go.
|
||||
// Run this after changing builtin/runtime.go
|
||||
// or after changing the export metadata format in the compiler.
|
||||
// Either way, you need to have a working compiler binary first.
|
||||
// See bexport.go for how to make an export metadata format change.
|
||||
|
|
@ -33,7 +33,6 @@ func main() {
|
|||
fmt.Fprintln(&b, "package gc")
|
||||
|
||||
mkbuiltin(&b, "runtime")
|
||||
mkbuiltin(&b, "unsafe")
|
||||
|
||||
var err error
|
||||
if *stdout {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue