github.com/primecitizens/pcz/std@v0.2.1/core/abi/funcpc.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 // 4 // Copyright 2023 The Go Authors. All rights reserved. 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file. 7 8 package abi 9 10 // FuncPC* intrinsics. 11 // 12 // CAREFUL: In programs with plugins, FuncPC* can return different values 13 // for the same function (because there are actually multiple copies of 14 // the same function in the address space). To be safe, don't use the 15 // results of this function in any == expression. It is only safe to 16 // use the result as an address at which to start executing code. 17 18 // FuncPCABI0 returns the entry PC of the function f, which must be a 19 // direct reference of a function defined as ABI0. Otherwise it is a 20 // compile-time error. 21 // 22 // Implemented as a compile intrinsic. 23 func FuncPCABI0(f interface{}) uintptr 24 25 // FuncPCABIInternal returns the entry PC of the function f. If f is a 26 // direct reference of a function, it must be defined as ABIInternal. 27 // Otherwise it is a compile-time error. If f is not a direct reference 28 // of a defined function, it assumes that f is a func value. Otherwise 29 // the behavior is undefined. 30 // 31 // Implemented as a compile intrinsic. 32 func FuncPCABIInternal(f interface{}) uintptr