aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-03-24 00:01:21 +1100
committerBenoit Giannangeli <giann@users.noreply.github.com>2017-03-23 14:05:09 +0100
commitbeab1b6d42b3e9bd0ea8a37e4389b0a44f603ead (patch)
tree4924bec34c8276e35e3ba4ab244c0248dcb124bc /src
parenta7f38e82322377ebe116f28fbc63a15c9d8bd08a (diff)
downloadfengari-beab1b6d42b3e9bd0ea8a37e4389b0a44f603ead.tar.gz
fengari-beab1b6d42b3e9bd0ea8a37e4389b0a44f603ead.tar.bz2
fengari-beab1b6d42b3e9bd0ea8a37e4389b0a44f603ead.zip
lstate: Don't localise ldo.js fields
Doing so breaks due to circular dependencies
Diffstat (limited to 'src')
-rw-r--r--src/lstate.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lstate.js b/src/lstate.js
index 99992c5..80dcc21 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -7,8 +7,6 @@ const lua = require('./lua.js');
const lobject = require('./lobject.js');
const ldo = require('./ldo.js');
const lapi = require('./lapi.js');
-const nil = ldo.nil;
-const luaD_rawrunprotected = ldo.luaD_rawrunprotected;
const luaT_init = require('./ltm.js').luaT_init;
const CT = lua.constant_types;
const LUA_MULTRET = lua.LUA_MULTRET;
@@ -70,7 +68,7 @@ class global_State {
constructor(L) {
this.mainthread = L;
this.strt = new Map();
- this.l_registry = nil;
+ this.l_registry = ldo.nil;
this.panic = null;
this.version = null;
this.twups = [];
@@ -100,7 +98,7 @@ const stack_init = function(L1, L) {
ci.callstatus = 0;
ci.func = L1.stack[L1.top];
ci.funcOff = L1.top;
- L1.stack[L1.top++] = nil;
+ L1.stack[L1.top++] = ldo.nil;
ci.top = L1.top + lua.LUA_MINSTACK;
L1.ci = ci;
};
@@ -166,7 +164,7 @@ const lua_newstate = function() {
preinit_thread(L, g);
- if (luaD_rawrunprotected(L, f_luaopen, null) !== TS.LUA_OK) {
+ if (ldo.luaD_rawrunprotected(L, f_luaopen, null) !== TS.LUA_OK) {
L = null;
}