(t, k exprDesc)
| 837 | } |
| 838 | |
| 839 | func (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 | |
| 853 | func foldConstants(op opCode, e1, e2 exprDesc) (exprDesc, bool) { |
| 854 | if !e1.isNumeral() || !e2.isNumeral() { |
no test coverage detected