summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-09 16:02:06 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-09 17:08:33 +1000
commit3f2f887666b49b81f9e9b5dbebaeca0fc3543a3c (patch)
tree7214207e647ebfd9c6617e630b185f51cdd6f997
parent6212a1e45f14e6f857d7ce5f1cc69ca9080b9282 (diff)
downloadfengari-3f2f887666b49b81f9e9b5dbebaeca0fc3543a3c.tar.gz
fengari-3f2f887666b49b81f9e9b5dbebaeca0fc3543a3c.tar.bz2
fengari-3f2f887666b49b81f9e9b5dbebaeca0fc3543a3c.zip
Revert "src/lstring.js: Freeze strings to catch accidental modification"
This reverts commit 5cb00bbae4f1afb5cd476a637975dd9220898e15. It turns out that frozen objects are slower, see https://jsperf.com/object-freeze-performance
-rw-r--r--src/lstring.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/lstring.js b/src/lstring.js
index cc399b8..1887e85 100644
--- a/src/lstring.js
+++ b/src/lstring.js
@@ -43,7 +43,6 @@ const luaS_hashlongstr = function(ts) {
/* variant that takes ownership of array */
const luaS_bless = function(L, str) {
- Object.freeze(str);
return new TString(L, str);
};