aboutsummaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lstate.js b/src/lstate.js
new file mode 100644
index 0000000..9c7eec3
--- /dev/null
+++ b/src/lstate.js
@@ -0,0 +1,34 @@
+/*jshint esversion: 6 */
+"use strict";
+
+
+class CallInfo {
+
+ constructor(func, top, base, previous, next) {
+ this.func = func;
+ this.top = top;
+ this.base = base;
+ this.previous = previous;
+ this.next = next;
+ this.savedpc = [];
+ this.pcOff = 0;
+ }
+
+}
+
+class lua_State {
+
+ constructor(cl) {
+ this.top = 1;
+ this.ci = [
+ new CallInfo(0, 1, 1, null, null);
+ ];
+ this.ci[0].savedpc = cl.p.code;
+ this.ciOff = 0;
+ this.stack = [
+ closure
+ ];
+ this.openupval = [];
+ }
+
+} \ No newline at end of file