(op int, opT types.Type)
| 405 | } |
| 406 | |
| 407 | func 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 | |
| 420 | var builtin = map[string]code.Opcode{ |
| 421 | "getfilename": code.Getfilename, |
no test coverage detected