blob: abc87e8bc1ef3b345cc96aa95e4b29659c4f6caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*jshint esversion: 6 */
"use strict";
class Proto {
constructor(L) {
this.k = []; // constants used by the function
this.p = []; // functions defined inside the function
this.code = []; // opcodes
this.cache = null; // last-created closure with this prototype
this.lineinfo = []; // map from opcodes to source lines (debug information)
this.upvalues = []; // upvalue information
this.numparams = 0; // number of fixed parameters
this.is_vararg = 0;
this.maxstacksize = 0; // number of registers needed by this function
this.locvars = []; // information about local variables (debug information)
this.linedefined = 0; // debug information
this.lastlinedefined = 0; // debug information
this.source = null; // used for debug information
this.nresults = 0; // expected number of results from this function
}
}
class UpVal {
constructor() {
this.v = null;
this.u = {
open: {
next: null,
touched: false
},
value: null
};
}
}
module.exports = {
Proto: Proto,
UpVal: UpVal
};
|