summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-12 12:36:06 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-12 12:37:43 +1000
commit539c571f0538e6184f038a7a2c733b0c6542b164 (patch)
tree90539b68897bfdfcf5364455fdb57a035d949022 /src
parented045635968039ea22c35515c270ee4b442dd4ab (diff)
downloadfengari-539c571f0538e6184f038a7a2c733b0c6542b164.tar.gz
fengari-539c571f0538e6184f038a7a2c733b0c6542b164.tar.bz2
fengari-539c571f0538e6184f038a7a2c733b0c6542b164.zip
src/ldebug.js: CClosures have no '.type' field, use instanceof
Diffstat (limited to 'src')
-rw-r--r--src/ldebug.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ldebug.js b/src/ldebug.js
index 7de5cdc..2369595 100644
--- a/src/ldebug.js
+++ b/src/ldebug.js
@@ -160,7 +160,7 @@ const lua_setlocal = function(L, ar, n) {
};
const funcinfo = function(ar, cl) {
- if (cl === null || cl.type === CT.LUA_TCCL) {
+ if (cl === null || cl instanceof lobject.CClosure) {
ar.source = defs.to_luastring("=[JS]", true);
ar.linedefined = -1;
ar.lastlinedefined = -1;
@@ -177,7 +177,7 @@ const funcinfo = function(ar, cl) {
};
const collectvalidlines = function(L, f) {
- if (f === null || f.c.type === CT.LUA_TCCL) {
+ if (f === null || f instanceof lobject.CClosure) {
L.stack[L.top++] = new TValue(CT.LUA_TNIL, null);
assert(L.top <= L.ci.top, "stack overflow");
} else {
@@ -223,7 +223,7 @@ const auxgetinfo = function(L, what, ar, f, ci) {
}
case 'u': {
ar.nups = f === null ? 0 : f.nupvalues;
- if (f === null || f.type === CT.LUA_TCCL) {
+ if (f === null || f instanceof lobject.CClosure) {
ar.isvararg = true;
ar.nparams = 0;
} else {