MCPcopy Create free account
hub / github.com/yuin/gopher-lua / loadRk

Function loadRk

compile.go:1733–1743  ·  view source on GitHub ↗

}}}

(context *funcContext, reg *int, expr ast.Expr, cnst LValue)

Source from the content-addressed store, hash-verified

1731} // }}}
1732
1733func loadRk(context *funcContext, reg *int, expr ast.Expr, cnst LValue) int { // {{{
1734 cindex := context.ConstIndex(cnst)
1735 if cindex <= opMaxIndexRk {
1736 return opRkAsk(cindex)
1737 } else {
1738 ret := *reg
1739 *reg++
1740 context.Code.AddABx(OP_LOADK, ret, cindex, sline(expr))
1741 return ret
1742 }
1743} // }}}
1744
1745func getIdentRefType(context *funcContext, current *funcContext, expr *ast.IdentExpr) expContextType { // {{{
1746 if current == nil {

Callers 2

compileFuncDefStmtFunction · 0.85
compileFuncCallExprFunction · 0.85

Calls 4

opRkAskFunction · 0.85
slineFunction · 0.85
ConstIndexMethod · 0.80
AddABxMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…