(LFunction function)
| 13 | public final int length; |
| 14 | |
| 15 | public Code(LFunction function) { |
| 16 | this.code = function.code; |
| 17 | this.length = code.length; |
| 18 | map = function.header.opmap; |
| 19 | extractor = function.header.extractor; |
| 20 | extraByte = new boolean[length]; |
| 21 | for(int i = 0; i < length; i++) { |
| 22 | int line = i + 1; |
| 23 | Op op = op(line); |
| 24 | extraByte[i] = op != null && op.hasExtraByte(codepoint(line), extractor); |
| 25 | } |
| 26 | upvalue = new boolean[length]; |
| 27 | if(function.header.version.upvaluedeclarationtype.get() == Version.UpvalueDeclarationType.INLINE) { |
| 28 | for(int i = 0; i < length; i++) { |
| 29 | int line = i + 1; |
| 30 | if(op(line) == Op.CLOSURE) { |
| 31 | int f = Bx(line); |
| 32 | if(f < function.functions.length) { |
| 33 | int nups = function.functions[f].numUpvalues; |
| 34 | for(int j = 1; j <= nups; j++) { |
| 35 | if(i + j < length) { |
| 36 | upvalue[i + j] = true; |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | public CodeExtract getExtractor() { |
| 46 | return extractor; |
nothing calls this directly
no test coverage detected