diff --git a/go/ssa/interp/external.go b/go/ssa/interp/external.go index 0ce20478cc..9289696a1e 100644 --- a/go/ssa/interp/external.go +++ b/go/ssa/interp/external.go @@ -94,9 +94,9 @@ func init() { "runtime.NumCPU": ext۰runtime۰NumCPU, "runtime.ReadMemStats": ext۰runtime۰ReadMemStats, "runtime.SetFinalizer": ext۰runtime۰SetFinalizer, - "runtime.funcentry_go": ext۰runtime۰funcentry_go, - "runtime.funcline_go": ext۰runtime۰funcline_go, - "runtime.funcname_go": ext۰runtime۰funcname_go, + "(*runtime.Func).Entry": ext۰runtime۰Func۰Entry, + "(*runtime.Func).FileLine": ext۰runtime۰Func۰FileLine, + "(*runtime.Func).Name": ext۰runtime۰Func۰Name, "runtime.getgoroot": ext۰runtime۰getgoroot, "strings.IndexByte": ext۰strings۰IndexByte, "sync.runtime_Semacquire": ext۰sync۰runtime_Semacquire, @@ -402,8 +402,10 @@ func ext۰runtime۰SetFinalizer(fr *frame, args []value) value { return nil // ignore } -func ext۰runtime۰funcline_go(fr *frame, args []value) value { - // func funcline_go(*Func, uintptr) (string, int) +// Pretend: type runtime.Func struct { entry *ssa.Function } + +func ext۰runtime۰Func۰FileLine(fr *frame, args []value) value { + // func (*runtime.Func) FileLine(uintptr) (string, int) f, _ := (*args[0].(*value)).(structure)[0].(*ssa.Function) pc := args[1].(uintptr) _ = pc @@ -415,8 +417,8 @@ func ext۰runtime۰funcline_go(fr *frame, args []value) value { return tuple{"", 0} } -func ext۰runtime۰funcname_go(fr *frame, args []value) value { - // func funcname_go(*Func) string +func ext۰runtime۰Func۰Name(fr *frame, args []value) value { + // func (*runtime.Func) Name() string f, _ := (*args[0].(*value)).(structure)[0].(*ssa.Function) if f != nil { return f.String() @@ -424,8 +426,8 @@ func ext۰runtime۰funcname_go(fr *frame, args []value) value { return "" } -func ext۰runtime۰funcentry_go(fr *frame, args []value) value { - // func funcentry_go(*Func) uintptr +func ext۰runtime۰Func۰Entry(fr *frame, args []value) value { + // func (*runtime.Func) Entry() uintptr f, _ := (*args[0].(*value)).(structure)[0].(*ssa.Function) return uintptr(unsafe.Pointer(f)) }