MCPcopy Index your code
hub / github.com/Shopify/go-lua / Indexed

Method Indexed

code.go:839–851  ·  view source on GitHub ↗
(t, k exprDesc)

Source from the content-addressed store, hash-verified

837}
838
839func (f *function) Indexed(t, k exprDesc) (r exprDesc) {
840 f.assert(!t.hasJumps())
841 r = makeExpression(kindIndexed, 0)
842 r.table = t.info
843 _, r.index = f.expressionToRegisterOrConstant(k)
844 if t.kind == kindUpValue {
845 r.tableType = kindUpValue
846 } else {
847 f.assert(t.kind == kindNonRelocatable || t.kind == kindLocal)
848 r.tableType = kindLocal
849 }
850 return
851}
852
853func foldConstants(op opCode, e1, e2 exprDesc) (exprDesc, bool) {
854 if !e1.isNumeral() || !e2.isNumeral() {

Callers 3

SingleVariableMethod · 0.95
suffixedExpressionMethod · 0.80
fieldSelectorMethod · 0.80

Calls 4

assertMethod · 0.95
makeExpressionFunction · 0.85
hasJumpsMethod · 0.80

Tested by

no test coverage detected