aboutsummaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-04 09:01:25 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-04 22:17:24 +0100
commit18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb (patch)
tree3f215ba709174b057ea76b2a8b0fbb2f6ad850e5 /src/lstate.js
parentb618b835c74a8637e00ba1f4adf6b8884d360d43 (diff)
downloadfengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.tar.gz
fengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.tar.bz2
fengari-18b89ee8e1059a21f8d5e3a52c2e256b7dea79cb.zip
CLOSURE, CALL
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lstate.js b/src/lstate.js
index 15dedcb..f9dbf8e 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -10,8 +10,13 @@ class CallInfo {
this.base = base;
this.previous = previous;
this.next = next;
- this.savedpc = [];
this.pcOff = 0;
+ this.u = {
+ l: {
+ base: null,
+ savedpc: []
+ }
+ };
}
}
@@ -21,9 +26,9 @@ class lua_State {
constructor(cl) {
this.top = 1;
this.ci = [
- new CallInfo(0, 1, 1, null, null)
+ new CallInfo(cl, 1, 1, null, null)
];
- this.ci[0].savedpc = cl.p.code;
+ this.ci[0].u.l.savedpc = cl.p.code;
this.ciOff = 0;
this.stack = [
cl