aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-06-18 20:02:28 +1000
committerdaurnimator <quae@daurnimator.com>2017-06-18 20:02:28 +1000
commitfb7c8c189b7a864f5787a5ecfd3272fe0e99b0ad (patch)
tree3d9e303fdb1957e38f365b89b2437c2e3b7e497c /src
parent2637c343c1f0dbd79d5f593ef86272ba83d454c8 (diff)
downloadfengari-fb7c8c189b7a864f5787a5ecfd3272fe0e99b0ad.tar.gz
fengari-fb7c8c189b7a864f5787a5ecfd3272fe0e99b0ad.tar.bz2
fengari-fb7c8c189b7a864f5787a5ecfd3272fe0e99b0ad.zip
src/lvm.js: Rename gettable to luaV_gettable
Diffstat (limited to 'src')
-rw-r--r--src/lapi.js6
-rw-r--r--src/lvm.js11
2 files changed, 8 insertions, 9 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 4b80d20..a25dd16 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -468,7 +468,7 @@ const auxgetstr = function(L, t, k) {
let str = lstring.luaS_new(L, k);
lobject.pushsvalue2s(L, str);
assert(L.top <= L.ci.top, "stack overflow");
- lvm.gettable(L, t, L.stack[L.top - 1], L.top - 1);
+ lvm.luaV_gettable(L, t, L.stack[L.top - 1], L.top - 1);
return L.stack[L.top - 1].ttnov();
};
@@ -611,7 +611,7 @@ const lua_getuservalue = function(L, idx) {
const lua_gettable = function(L, idx) {
let t = index2addr(L, idx);
- lvm.gettable(L, t, L.stack[L.top - 1], L.top - 1);
+ lvm.luaV_gettable(L, t, L.stack[L.top - 1], L.top - 1);
return L.stack[L.top - 1].ttnov();
};
@@ -625,7 +625,7 @@ const lua_geti = function(L, idx, n) {
L.stack[L.top] = new TValue(CT.LUA_TNUMINT, n);
L.top++;
assert(L.top <= L.ci.top, "stack overflow");
- lvm.gettable(L, t, L.stack[L.top - 1], L.top - 1);
+ lvm.luaV_gettable(L, t, L.stack[L.top - 1], L.top - 1);
return L.stack[L.top - 1].ttnov();
};
diff --git a/src/lvm.js b/src/lvm.js
index 905ae39..013b192 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -156,13 +156,13 @@ const luaV_execute = function(L) {
case OCi.OP_GETTABUP: {
let upval = cl.upvals[i.B].v;
let rc = RKC(L, base, k, i);
- gettable(L, upval, rc, ra);
+ luaV_gettable(L, upval, rc, ra);
break;
}
case OCi.OP_GETTABLE: {
let rb = L.stack[RB(L, base, i)];
let rc = RKC(L, base, k, i);
- gettable(L, rb, rc, ra);
+ luaV_gettable(L, rb, rc, ra);
break;
}
case OCi.OP_SETTABUP: {
@@ -193,8 +193,7 @@ const luaV_execute = function(L) {
let rb = RB(L, base, i);
let rc = RKC(L, base, k, i);
lobject.setobjs2s(L, ra + 1, rb);
-
- gettable(L, L.stack[rb], rc, ra);
+ luaV_gettable(L, L.stack[rb], rc, ra);
break;
}
case OCi.OP_ADD: {
@@ -976,7 +975,7 @@ const luaV_concat = function(L, total) {
const MAXTAGLOOP = 2000;
-const gettable = function(L, t, key, ra) {
+const luaV_gettable = function(L, t, key, ra) {
for (let loop = 0; loop < MAXTAGLOOP; loop++) {
let tm;
@@ -1042,7 +1041,7 @@ const settable = function(L, t, key, val) {
module.exports.cvt2str = cvt2str;
module.exports.cvt2num = cvt2num;
-module.exports.gettable = gettable;
+module.exports.luaV_gettable = luaV_gettable;
module.exports.luaV_concat = luaV_concat;
module.exports.luaV_div = luaV_div;
module.exports.luaV_equalobj = luaV_equalobj;