diff --git a/go/ssa/interp/external.go b/go/ssa/interp/external.go index 181ffa4194..f428e58d52 100644 --- a/go/ssa/interp/external.go +++ b/go/ssa/interp/external.go @@ -139,6 +139,7 @@ func init() { "sync/atomic.StoreInt64": ext۰atomic۰StoreInt64, "sync/atomic.StoreUint64": ext۰atomic۰StoreUint64, "testing.callerEntry": ext۰testing۰callerEntry, + "testing.callerName": ext۰testing۰callerName, "testing.runExample": ext۰testing۰runExample, "time.Sleep": ext۰time۰Sleep, "time.now": ext۰time۰now, @@ -527,10 +528,19 @@ func ext۰testing۰runExample(fr *frame, args []value) value { return true } +// These two internal functions must be faked to avoid calls to +// runtime.CallersFrames, which is hard to emulate. We are inching +// towards the point at which I blow away this entire package, or at +// least all tests that interpret the standard "testing" package. + func ext۰testing۰callerEntry(fr *frame, args []value) value { return uintptr(0) // bogus implementation for now } +func ext۰testing۰callerName(fr *frame, args []value) value { + return "" // bogus implementation for now +} + func ext۰time۰now(fr *frame, args []value) value { nano := time.Now().UnixNano() return tuple{int64(nano / 1e9), int32(nano % 1e9), int64(0)}