func (fr *frame) Position() syntax.Position {
	switch c := fr.callable.(type) {
	case *Function:
		return c.funcode.Position(fr.pc)
	case callableWithPosition:
		return c.Position()
	}
	return syntax.MakePosition(&builtinFilename, 0, 0)
}
Position returns the source position of the current point of execution in this frame.
package starlark
import (
	"fmt"
	"io"
	"io/ioutil"
	"log"
	"math/big"
	"sort"
	"strings"
	"sync/atomic"
	"time"
	"unicode"
	"unicode/utf8"
	"unsafe"
	"go.starlark.net/internal/compile"
	"go.starlark.net/internal/spell"
	"go.starlark.net/resolve"
	"go.starlark.net/syntax"
)
type Thread struct {
	Name string
	stack []*frame
	Print func(thread *Thread, msg string)
	Load func(thread *Thread, module string) (StringDict, error)
	steps, maxSteps uint64
	cancelReason *string
	locals map[string]interface{}
	proftime time.Duration
}
func (thread *Thread) ExecutionSteps() uint64 {
	return thread.steps
}
func (thread *Thread) SetMaxExecutionSteps(max uint64) {
	thread.maxSteps = max
}
func (thread *Thread) Cancel(reason string) {
	atomic.CompareAndSwapPointer((*unsafe.Pointer)(unsafe.Pointer(&thread.cancelReason)), nil, unsafe.Pointer(&reason))
}
func (thread *Thread) SetLocal(key string, value interface{}) {
	if thread.locals == nil {
		thread.locals = make(map[string]interface{})
	}
	thread.locals[key] = value
}
func (thread *Thread) Local(key string) interface{} {
	return thread.locals[key]
}
func (thread *Thread) CallFrame(depth int) CallFrame {
	return thread.frameAt(depth).asCallFrame()
}
func (thread *Thread) frameAt(depth int) *frame {
	return thread.stack[len(thread.stack)-1-depth]
}
func (thread *Thread) CallStack() CallStack {
	frames := make([]CallFrame, len(thread.stack))
	for i, fr := range thread.stack {
		frames[i] = fr.asCallFrame()
	}
	return frames
}
func (thread *Thread) CallStackDepth() int { return len(thread.stack) }
type StringDict map[string]Value
func (d StringDict) Keys() []string {
	names := make([]string, 0, len(d))
	for name := range d {
		names = append(names, name)
	}
	sort.Strings(names)
	return names
}
func (d StringDict) String() string {
	buf := new(strings.Builder)
	buf.WriteByte('{')
	sep := ""
	for _, name := range d.Keys() {
		buf.WriteString(sep)
		buf.WriteString(name)
		buf.WriteString(": ")
		writeValue(buf, d[name], nil)
		sep = ", "
	}
	buf.WriteByte('}')
	return buf.String()
}
func (d StringDict) Freeze() {
	for _, v := range d {
		v.Freeze()
	}
}
func (d StringDict) Has(key string) bool { _, ok := d[key]; return ok }
type frame struct {
	callable  Callable  
	pc        uint32    
	locals    []Value   
	spanStart int64     
}