tinygo/src/runtime/symtab.go
Dan Kegel 2c7ea98ccf runtime: add stubs for Func.FileLine and Frame.PC
With this, 'tinygo test' in github.com/pkg/errors at least compiles and passes a few tests:

    $ git clone github.com/pkg/errors
    $ cd errors
    $ tinygo test -c
    $ for a in $(go test -list Test | grep Test); do ./errors.test -test.run $a -test.v  > $a.log 2>&1; done
    $ grep -l PASS *.log | wc -l
      19
    $ grep -l FAIL *.log | wc -l
      11

For https://github.com/tinygo-org/tinygo/issues/2445
2022-01-18 14:38:13 +01:00

21 строка
263 Б
Go

package runtime
type Frames struct {
//
}
type Frame struct {
Function string
File string
Line int
PC uintptr
}
func CallersFrames(callers []uintptr) *Frames {
return nil
}
func (ci *Frames) Next() (frame Frame, more bool) {
return Frame{}, false
}