From 2c72b8859a959629462a58b1385408e25bb89bad Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 11 Feb 2021 13:20:54 +0000 Subject: Issue #1738 - Part 1: Improve performance of JSON stringify - Use some pointer voodoo and instead of stringbuffer append() - Use a lookup table instead of char comparisons for chr < 256 - Stop using a Hashtable/MovableCellHasher for JSON CycleDetector --- js/src/tests/ecma_5/JSON/stringify.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/src/tests') diff --git a/js/src/tests/ecma_5/JSON/stringify.js b/js/src/tests/ecma_5/JSON/stringify.js index 1a7e9b1500..3b21474206 100644 --- a/js/src/tests/ecma_5/JSON/stringify.js +++ b/js/src/tests/ecma_5/JSON/stringify.js @@ -34,6 +34,9 @@ assertStringify({'mmm\\mmm':"hmm"}, '{"mmm\\\\mmm":"hmm"}'); assertStringify({'mmm\\mmm\\mmm':"hmm"}, '{"mmm\\\\mmm\\\\mmm":"hmm"}'); assertStringify({"mm\u000bmm":"hmm"}, '{"mm\\u000bmm":"hmm"}'); assertStringify({"mm\u0000mm":"hmm"}, '{"mm\\u0000mm":"hmm"}'); +assertStringify({"\u0000\u000b":""}, '{"\\u0000\\u000b":""}'); +assertStringify({"\u000b\ufdfd":"hmm"}, '{"\\u000b\ufdfd":"hmm"}'); +assertStringify({"\u000b\ufdfd":"h\xfc\ufdfdm"}, '{"\\u000b\ufdfd":"h\xfc\ufdfdm"}'); var x = {"free":"variable"}; assertStringify(x, '{"free":"variable"}'); -- cgit v1.2.3