MCPcopy Create free account
hub / github.com/google/gapid / CallIndirect

Method CallIndirect

core/codegen/builder.go:58–67  ·  view source on GitHub ↗

CallIndirect invokes the function pointer f with the specified arguments

(f *Value, args ...*Value)

Source from the content-addressed store, hash-verified

56
57// CallIndirect invokes the function pointer f with the specified arguments
58func (b *Builder) CallIndirect(f *Value, args ...*Value) *Value {
59 var fty *FunctionType
60 if ptrTy, ok := Underlying(f.Type()).(Pointer); ok {
61 fty, _ = Underlying(ptrTy.Element).(*FunctionType)
62 }
63 if fty == nil {
64 fail("CallIndirect() can only be called with function pointers. Got %v", f.Type())
65 }
66 return b.call(f.llvm, fty.Signature, f.name, args)
67}
68
69func (b *Builder) call(fn llvm.Value, sig Signature, name string, args []*Value) *Value {
70 l := b.callArgs(sig, name, args)

Callers 3

emitCallMethod · 0.80
loadRemapMethod · 0.80
storeRemapMethod · 0.80

Calls 4

callMethod · 0.95
UnderlyingFunction · 0.70
failFunction · 0.70
TypeMethod · 0.65

Tested by

no test coverage detected