diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-08 21:00:41 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-09 14:25:51 +1000 |
commit | 9d1b2502045fe7d7bb86570779636c9bbc2ba19a (patch) | |
tree | 839179de719be4d0a1d94f5ed6c8c0807ef27698 /src/llex.js | |
parent | 048234f2ceaad1801473bf8a95219d08797b5e9d (diff) | |
download | fengari-9d1b2502045fe7d7bb86570779636c9bbc2ba19a.tar.gz fengari-9d1b2502045fe7d7bb86570779636c9bbc2ba19a.tar.bz2 fengari-9d1b2502045fe7d7bb86570779636c9bbc2ba19a.zip |
Cache string hashes in TString
Diffstat (limited to 'src/llex.js')
-rw-r--r-- | src/llex.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llex.js b/src/llex.js index 220f45d..2e37eca 100644 --- a/src/llex.js +++ b/src/llex.js @@ -208,7 +208,7 @@ const luaX_newstring = function(ls, str) { o.setbvalue(true); } else { /* string already present */ /* HACK: Workaround lack of ltable 'keyfromval' */ - let tpair = ls.h.strong.get(lstring.luaS_hash(ts)); + let tpair = ls.h.strong.get(lstring.luaS_hashlongstr(ts)); assert(tpair.value == o); ts = tpair.key.tsvalue(); /* re-use value previously stored */ } |