func File(stmts []syntax.Stmt, pos syntax.Position, name string, locals, globals []*resolve.Binding) *Program {
	pcomp := &pcomp{
		prog: &Program{
			Globals: bindings(globals),
		},
		names:     make(map[string]uint32),
		constants: make(map[interface{}]uint32),
		functions: make(map[*Funcode]uint32),
	}
	pcomp.prog.Toplevel = pcomp.function(name, pos, stmts, locals, nil)
	return pcomp.prog
}
File compiles the statements of a file into a program.
package compile  
import (
	"bytes"
	"fmt"
	"log"
	"os"
	"path/filepath"
	"strconv"
	"strings"
	"sync"
	"go.starlark.net/resolve"
	"go.starlark.net/syntax"
)
var Disassemble = false
const debug = false  
const Version = 12
type Opcode uint8
const (
	NOP Opcode = iota  
	DUP   
	DUP2  
	POP   
	EXCH  
	LT
	GT
	GE
	LE
	EQL
	NEQ
	PLUS
	MINUS
	STAR
	SLASH
	SLASHSLASH
	PERCENT
	AMP
	PIPE
	CIRCUMFLEX
	LTLT
	GTGT
	IN
	UPLUS   
	UMINUS  
	TILDE   
	NONE       
	TRUE       
	FALSE      
	MANDATORY  
	ITERPUSH     
	ITERPOP      
	NOT          
	RETURN       
	SETINDEX     
	INDEX        
	SETDICT      
	SETDICTUNIQ  
	APPEND       
	SLICE        
	INPLACE_ADD  
	MAKEDICT     
	JMP      
	CJMP     
	ITERJMP  
	CONSTANT      
	MAKETUPLE     
	MAKELIST      
	MAKEFUNC      
	LOAD          
	SETLOCAL      
	SETGLOBAL     
	LOCAL         
	FREE          
	FREECELL      
	LOCALCELL     
	SETLOCALCELL  
	GLOBAL        
	PREDECLARED   
	UNIVERSAL     
	ATTR          
	SETFIELD      
	UNPACK        
	CALL         
	CALL_VAR     
	CALL_KW      
	CALL_VAR_KW  
	OpcodeArgMin = JMP
	OpcodeMax    = CALL_VAR_KW
)
var opcodeNames = [...]string{
	AMP:          "amp",
	APPEND:       "append",
	ATTR:         "attr",
	CALL:         "call",
	CALL_KW:      "call_kw ",
	CALL_VAR:     "call_var",
	CALL_VAR_KW:  "call_var_kw",
	CIRCUMFLEX:   "circumflex",
	CJMP:         "cjmp",
	CONSTANT:     "constant",
	DUP2:         "dup2",
	DUP:          "dup",
	EQL:          "eql",
	EXCH:         "exch",
	FALSE:        "false",
	FREE:         "free",
	FREECELL:     "freecell",
	GE:           "ge",
	GLOBAL:       "global",
	GT:           "gt",
	GTGT:         "gtgt",
	IN:           "in",
	INDEX:        "index",
	INPLACE_ADD:  "inplace_add",
	ITERJMP:      "iterjmp",
	ITERPOP:      "iterpop",
	ITERPUSH:     "iterpush",
	JMP:          "jmp",
	LE:           "le",
	LOAD:         "load",
	LOCAL:        "local",
	LOCALCELL:    "localcell",
	LT:           "lt",
	LTLT:         "ltlt",
	MAKEDICT:     "makedict",
	MAKEFUNC:     "makefunc",
	MAKELIST:     "makelist",
	MAKETUPLE:    "maketuple",
	MANDATORY:    "mandatory",
	MINUS:        "minus",
	NEQ:          "neq",
	NONE:         "none",
	NOP:          "nop",
	NOT:          "not",
	PERCENT:      "percent",
	PIPE:         "pipe",
	PLUS:         "plus",
	POP:          "pop",
	PREDECLARED:  "predeclared",
	RETURN:       "return",
	SETDICT:      "setdict",
	SETDICTUNIQ:  "setdictuniq",
	SETFIELD:     "setfield",
	SETGLOBAL:    "setglobal",
	SETINDEX:     "setindex",
	SETLOCAL:     "setlocal",
	SETLOCALCELL: "setlocalcell",
	SLASH:        "slash",
	SLASHSLASH:   "slashslash",
	SLICE:        "slice",
	STAR:         "star",
	TILDE:        "tilde",
	TRUE:         "true",
	UMINUS:       "uminus",
	UNIVERSAL:    "universal",
	UNPACK:       "unpack",
	UPLUS:        "uplus",
}
const variableStackEffect = 0x7f
var stackEffect = [...]int8{
	AMP:          -1,
	APPEND:       -2,
	ATTR:         0,
	CALL:         variableStackEffect,
	CALL_KW:      variableStackEffect,
	CALL_VAR:     variableStackEffect,
	CALL_VAR_KW:  variableStackEffect,
	CIRCUMFLEX:   -1,
	CJMP:         -1,
	CONSTANT:     +1,
	DUP2:         +2,
	DUP:          +1,
	EQL:          -1,
	FALSE:        +1,
	FREE:         +1,
	FREECELL:     +1,
	GE:           -1,
	GLOBAL:       +1,
	GT:           -1,
	GTGT:         -1,
	IN:           -1,
	INDEX:        -1,
	INPLACE_ADD:  -1,
	ITERJMP:      variableStackEffect,
	ITERPOP:      0,
	ITERPUSH:     -1,
	JMP:          0,
	LE:           -1,
	LOAD:         -1,
	LOCAL:        +1,
	LOCALCELL:    +1,
	LT:           -1,
	LTLT:         -1,
	MAKEDICT:     +1,
	MAKEFUNC:     0,
	MAKELIST:     variableStackEffect,
	MAKETUPLE:    variableStackEffect,
	MANDATORY:    +1,
	MINUS:        -1,
	NEQ:          -1,
	NONE:         +1,
	NOP:          0,
	NOT:          0,
	PERCENT:      -1,
	PIPE:         -1,
	PLUS:         -1,
	POP:          -1,
	PREDECLARED:  +1,
	RETURN:       -1,
	SETLOCALCELL: -1,
	SETDICT:      -3,
	SETDICTUNIQ:  -3,
	SETFIELD:     -2,
	SETGLOBAL:    -1,
	SETINDEX:     -3,
	SETLOCAL:     -1,
	SLASH:        -1,
	SLASHSLASH:   -1,
	SLICE:        -3,
	STAR:         -1,
	TRUE:         +1,
	UMINUS:       0,
	UNIVERSAL:    +1,
	UNPACK:       variableStackEffect,
	UPLUS:        0,
}
func (op Opcode) String() string {
	if op < OpcodeMax {
		if name := opcodeNames[op]; name != "" {
			return name
		}
	}
	return fmt.Sprintf("illegal op (%d)", op)
}
type Program struct {
	Loads     []Binding      
	Names     []string       
	Constants []interface{}  
	Functions []*Funcode
	Globals   []Binding  
	Toplevel  *Funcode   
}
type Bytes string
type Funcode struct {
	Prog                  *Program
	Pos                   syntax.Position  
	Name                  string           
	Doc                   string           
	Code                  []byte           
	pclinetab             []uint16         
	Locals                []Binding        
	Cells                 []int            
	Freevars              []Binding        
	MaxStack              int
	NumParams             int
	NumKwonlyParams       int
	HasVarargs, HasKwargs bool
	lntOnce sync.Once
	lnt     []pclinecol  
}
type pclinecol struct {
	pc        uint32
	line, col int32
}
type Binding struct {
	Name string
	Pos  syntax.Position
}
type pcomp struct {
	prog *Program  
	names     map[string]uint32
	constants map[interface{}]uint32
	functions map[*Funcode]uint32
}
type fcomp struct {
	fn *Funcode  
	pcomp *pcomp
	pos   syntax.Position  
	loops []loop
	block *block
}
type loop struct {
	break_, continue_ *block
}
type block struct {
	insns []insn
	jmp, cjmp *block
	initialstack int  
	index int  
	addr  uint32
}
type insn struct {
	op        Opcode
	arg       uint32
	line, col int32
}
func (fn *Funcode) Position(pc uint32) syntax.Position {
	fn.lntOnce.Do(fn.decodeLNT)
	n := len(fn.lnt)
	i, j := 0, n
	for i < j {
		h := int(uint(i+j) >> 1)
		if !(h >= n-1 || fn.lnt[h+1].pc > pc) {
			i = h + 1
		} else {
			j = h
		}
	}
	var line, col int32
	if i < n {
		line = fn.lnt[i].line
		col = fn.lnt[i].col
	}
	pos := fn.Pos  
	pos.Col = col
	pos.Line = line
	return pos
}
func (fn *Funcode) decodeLNT() {
	fn.lnt = make([]pclinecol, 0, len(fn.pclinetab))  
	entry := pclinecol{
		pc:   0,
		line: fn.Pos.Line,
		col:  fn.Pos.Col,
	}
	for _, x := range fn.pclinetab {
		entry.pc += uint32(x) >> 12
		entry.line += int32((int16(x) << 4) >> (16 - 5))  
		entry.col += int32((int16(x) << 9) >> (16 - 6))   
		if (x & 1) == 0 {
			fn.lnt = append(fn.lnt, entry)
		}
	}
}
func bindings(bindings []*resolve.Binding) []Binding {
	res := make([]Binding, len(bindings))
	for i, bind := range bindings {
		res[i].Name = bind.First.Name
		res[i].Pos = bind.First.NamePos
	}
	return res
}
func Expr(expr syntax.Expr, name string, locals []*resolve.Binding) *Program {
	pos := syntax.Start(expr)
	stmts := []syntax.Stmt{&syntax.ReturnStmt{Result: expr}}
	return File(stmts, pos, name, locals, nil)
}