summaryrefslogtreecommitdiff
path: root/src/lstate.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lstate.js')
-rw-r--r--src/lstate.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lstate.js b/src/lstate.js
index 519abde..99992c5 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -78,12 +78,15 @@ class global_State {
}
intern(stringArray) {
- let key = stringArray.map(e => `${e}|`).join('');
+ // TODO: when weak value maps are available
+ // let key = stringArray.map(e => `${e}|`).join('');
- if (!this.strt.has(key))
- this.strt.set(key, new lobject.TValue(CT.LUA_TLNGSTR, stringArray));
+ // if (!this.strt.has(key))
+ // this.strt.set(key, new lobject.TValue(CT.LUA_TLNGSTR, stringArray));
- return this.strt.get(key);
+ // return this.strt.get(key);
+
+ return new lobject.TValue(CT.LUA_TLNGSTR, stringArray);
}
}