9df1f362e0
In the Go 1.21 release the package internal/profile imports internal/lazyregexp. That works when bootstrapping with Go 1.17, because that compiler has internal/lazyregep and permits importing it. We also have internal/lazyregexp in libgo, but since it is not installed it is not available for importing. This CL adds internal/lazyregexp to the list of internal packages that are installed for bootstrapping. The Go 1.21, and earlier, releases have a couple of functions in the internal/abi package that are always fully intrinsified. The gofrontend recognizes and intrinsifies those functions as well. However, the gofrontend was also building function descriptors for references to the functions without calling them, which failed because there was nothing to refer to. That is OK for the gc compiler, which guarantees that the functions are only called, not referenced. This CL arranges to not generate function descriptors for these functions. For golang/go#60913 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504798
30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
// Copyright 2020 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package abi
|
|
|
|
// FuncPC* intrinsics.
|
|
//
|
|
// CAREFUL: In programs with plugins, FuncPC* can return different values
|
|
// for the same function (because there are actually multiple copies of
|
|
// the same function in the address space). To be safe, don't use the
|
|
// results of this function in any == expression. It is only safe to
|
|
// use the result as an address at which to start executing code.
|
|
|
|
// FuncPCABI0 returns the entry PC of the function f, which must be a
|
|
// direct reference of a function defined as ABI0. Otherwise it is a
|
|
// compile-time error.
|
|
//
|
|
// Implemented as a compile intrinsic.
|
|
func FuncPCABI0(f any) uintptr
|
|
|
|
// FuncPCABIInternal returns the entry PC of the function f. If f is a
|
|
// direct reference of a function, it must be defined as ABIInternal.
|
|
// Otherwise it is a compile-time error. If f is not a direct reference
|
|
// of a defined function, it assumes that f is a func value. Otherwise
|
|
// the behavior is undefined.
|
|
//
|
|
// Implemented as a compile intrinsic.
|
|
func FuncPCABIInternal(f any) uintptr
|