MCPcopy Index your code
hub / github.com/google/mtail / getOpcodeForType

Function getOpcodeForType

internal/runtime/compiler/codegen/codegen.go:407–418  ·  view source on GitHub ↗
(op int, opT types.Type)

Source from the content-addressed store, hash-verified

405}
406
407func getOpcodeForType(op int, opT types.Type) (code.Opcode, error) {
408 opmap, ok := typedOperators[op]
409 if !ok {
410 return -1, errors.Errorf("no typed operator for type %v", op)
411 }
412 for t, opcode := range opmap {
413 if types.Equals(t, opT) {
414 return opcode, nil
415 }
416 }
417 return -1, errors.Errorf("no opcode for type %s in op %v", opT, op)
418}
419
420var builtin = map[string]code.Opcode{
421 "getfilename": code.Getfilename,

Callers 1

VisitAfterMethod · 0.85

Calls 2

ErrorfFunction · 0.92
EqualsFunction · 0.92

Tested by

no test coverage detected