aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lcorolib.js7
-rw-r--r--src/lmathlib.js1
-rw-r--r--src/ltablib.js1
-rw-r--r--src/lua.js5
-rw-r--r--src/lundump.js1
5 files changed, 8 insertions, 7 deletions
diff --git a/src/lcorolib.js b/src/lcorolib.js
index af1a3ec..6238c6c 100644
--- a/src/lcorolib.js
+++ b/src/lcorolib.js
@@ -4,7 +4,6 @@ const assert = require('assert');
const lua = require('./lua.js');
const lauxlib = require('./lauxlib.js');
-const ldo = require('./ldo.js');
const lobject = require('./lobject.js');
const getco = function(L) {
@@ -25,7 +24,7 @@ const auxresume = function(L, co, narg) {
}
lua.lua_xmove(L, co, narg);
- let status = ldo.lua_resume(co, L, narg);
+ let status = lua.lua_resume(co, L, narg);
if (status === lua.LUA_OK || status === lua.LUA_YIELD) {
let nres = lua.lua_gettop(co);
if (!lua.lua_checkstack(L, nres + 1)) {
@@ -87,7 +86,7 @@ const luaB_cowrap = function(L) {
};
const luaB_yield = function(L) {
- return ldo.lua_yield(L, lua.lua_gettop(L));
+ return lua.lua_yield(L, lua.lua_gettop(L));
};
const luaB_costatus = function(L) {
@@ -118,7 +117,7 @@ const luaB_costatus = function(L) {
};
const luaB_yieldable = function(L) {
- lua.lua_pushboolean(L, ldo.lua_isyieldable(L));
+ lua.lua_pushboolean(L, lua.lua_isyieldable(L));
return 1;
};
diff --git a/src/lmathlib.js b/src/lmathlib.js
index 8ee9f71..6c666b1 100644
--- a/src/lmathlib.js
+++ b/src/lmathlib.js
@@ -6,7 +6,6 @@ const seedrandom = require('seedrandom');
const lua = require('./lua.js');
const lauxlib = require('./lauxlib.js');
const lstate = require('./lstate.js');
-const ldo = require('./ldo.js');
const llimit = require('./llimit.js');
const luaconf = require('./luaconf.js');
diff --git a/src/ltablib.js b/src/ltablib.js
index 08cf4d6..ba3d374 100644
--- a/src/ltablib.js
+++ b/src/ltablib.js
@@ -6,7 +6,6 @@ const lua = require('./lua.js');
const lapi = require('./lapi.js');
const lauxlib = require('./lauxlib.js');
const lstate = require('./lstate.js');
-const ldo = require('./ldo.js');
const llimit = require('./llimit.js');
const lobject = require('./lobject.js');
diff --git a/src/lua.js b/src/lua.js
index 17df09b..047926f 100644
--- a/src/lua.js
+++ b/src/lua.js
@@ -4,6 +4,7 @@
const defs = require("./defs.js");
const lapi = require("./lapi.js");
const ldebug = require("./ldebug.js");
+const ldo = require("./ldo.js");
const lstate = require("./lstate.js");
module.exports.FENGARI_AUTHORS = defs.FENGARI_AUTHORS;
@@ -120,6 +121,7 @@ module.exports.lua_isstring = lapi.lua_isstring;
module.exports.lua_istable = lapi.lua_istable;
module.exports.lua_isthread = lapi.lua_isthread;
module.exports.lua_isuserdata = lapi.lua_isuserdata;
+module.exports.lua_isyieldable = ldo.lua_isyieldable;
module.exports.lua_len = lapi.lua_len;
module.exports.lua_load = lapi.lua_load;
module.exports.lua_newtable = lapi.lua_newtable;
@@ -155,6 +157,7 @@ module.exports.lua_rawlen = lapi.lua_rawlen;
module.exports.lua_rawset = lapi.lua_rawset;
module.exports.lua_rawsetp = lapi.lua_rawsetp;
module.exports.lua_remove = lapi.lua_remove;
+module.exports.lua_resume = ldo.lua_resume;
module.exports.lua_replace = lapi.lua_replace;
module.exports.lua_rotate = lapi.lua_rotate;
module.exports.lua_setfield = lapi.lua_setfield;
@@ -187,3 +190,5 @@ module.exports.lua_upvalueid = lapi.lua_upvalueid;
module.exports.lua_upvaluejoin = lapi.lua_upvaluejoin;
module.exports.lua_version = lapi.lua_version;
module.exports.lua_xmove = lapi.lua_xmove;
+module.exports.lua_yield = ldo.lua_yield;
+module.exports.lua_yieldk = ldo.lua_yieldk;
diff --git a/src/lundump.js b/src/lundump.js
index e2daf6e..3d7233c 100644
--- a/src/lundump.js
+++ b/src/lundump.js
@@ -1,7 +1,6 @@
/*jshint esversion: 6 */
"use strict";
-const fs = require('fs');
const assert = require('assert');
const defs = require('./defs.js');