diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
commit | a02f4e93b92e7ebb7ef038ad151e51652b0ce84d (patch) | |
tree | 2b83cacef266ff88ca3ed8cf3f19c1a1cbea7b38 /src/lcode.js | |
parent | 924ca09e8e9ec765301868d90dd3eba98058cafb (diff) | |
download | fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.gz fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.bz2 fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.zip |
No more Table, just TValue with table type and Map value
Diffstat (limited to 'src/lcode.js')
-rw-r--r-- | src/lcode.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lcode.js b/src/lcode.js index ec233c6..2f95baa 100644 --- a/src/lcode.js +++ b/src/lcode.js @@ -483,7 +483,7 @@ const freeexps = function(fs, e1, e2) { */ const addk = function(fs, key, v) { let f = fs.f; - let idx = fs.ls.h.__index(fs.ls.h, key); /* index scanner table */ + let idx = lobject.table_index(fs.ls.h, key); /* index scanner table */ if (idx && !idx.ttisnil()) { /* is there an index there? */ /* correct value? (warning: must distinguish floats from integers!) */ if (idx.value < fs.nk && f.k[idx.value].ttype() === v.ttype() && f.k[idx.value].value === v.value) @@ -491,7 +491,7 @@ const addk = function(fs, key, v) { } /* constant not found; create a new entry */ let k = fs.nk; - fs.ls.h.__newindex(fs.ls.h, key, new TValue(CT.LUA_TNUMINT, k)); + lobject.table_newindex(fs.ls.h, key, new TValue(CT.LUA_TNUMINT, k)); f.k[k] = v; fs.nk++; return k; |