github.com/hirochachacha/plua@v0.0.0-20170217012138-c82f520cc725/compiler/codegen/link.go (about)

     1  package codegen
     2  
     3  type kind int
     4  
     5  const (
     6  	linkLocal kind = iota
     7  	linkUpval
     8  )
     9  
    10  type link struct {
    11  	kind  kind
    12  	index int
    13  
    14  	// kind == linkLocal => v == index of stack (stack pointer)
    15  	// kind == linkUpval => v == index of g.UpvalueDescs
    16  }