Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Registry struct { Caller FunctionCaller Classifier ArgumentClassifier }
Registry contains registered implementations.
Functions ¶
func Register ¶
func Register(caller FunctionCaller, classifier ArgumentClassifier)
Register registers implementations for the current architecture.
Types ¶
type ArgumentClassification ¶
ArgumentClassification contains argument passing information.
type ArgumentClassifier ¶
type ArgumentClassifier interface {
ClassifyReturn(t *types.TypeDescriptor, abi types.CallingConvention) int
ClassifyArgument(t *types.TypeDescriptor, abi types.CallingConvention) ArgumentClassification
}
ArgumentClassifier defines the contract for argument classification.
type FunctionCaller ¶
type FunctionCaller interface {
Execute(cif *types.CallInterface, fn unsafe.Pointer, rvalue unsafe.Pointer, avalue []unsafe.Pointer, errnoFn uintptr) (cerrno uintptr, err error)
}
FunctionCaller defines the contract for function execution. Execute always captures C errno inside the assembly trampoline immediately after the C function returns. On platforms without errno support (Windows), errnoFn is 0 and the returned cerrno is always 0.
Click to show internal directories.
Click to hide internal directories.