Commit Graph

298 Commits

Author SHA1 Message Date
Jacek Caban 34a9c34380 jscript: Support replacer argument in JSON.stringify.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 22:57:11 +02:00
Jacek Caban 07cebfc928 jscript: Add String.prototype.toLocaleUpperCase and toLocaleLowerCase implementation.
They are supposed to be locale-specific, but my testing shows that it's
not the case in native.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 20:37:10 +01:00
Jacek Caban 221fdb09b4 jscript/tests: Silence noisy debug trace.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-04 21:48:39 +01:00
Jacek Caban 3e9d32ca43 jscript: Throw proper stack overflow exception.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 22:36:39 +02:00
Jacek Caban 6de0a658f1 jscript: Throw proper exception in RegExp.prototype.toString when called on non-RegExp object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:31:23 +02:00
Jacek Caban 6682290d17 jscript: Support ES5 Array.prototype.sort arguments handling.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:29:28 +02:00
Jeff Smith fd8e83eab0 jscript/tests: Fix some function-to-string failure message typos.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 22:54:26 +02:00
Jeff Smith 79cde059ea mshtml/tests: Add tests showing how toString has changed in IE9+.
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 19:33:25 +01:00
Jacek Caban f34cecbae2 jscript: Treat only ASCII digits as digits.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-08 23:38:07 +01:00
Francois Gouget a22153005d jscript/tests: Fix the spelling of a couple of jscript ok() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Jacek Caban 9dd50eae06 jscript: Allow 0x strings with explicit radix 16 in parseInt.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Andreas Maier f010569c3d jscript/tests: Add more Enumerator tests.
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:02:50 +02:00
Andreas Maier a015c62643 jscript: Implement Enumerator object.
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:02:47 +02:00
Jacek Caban b48cc9614e jscript: Fix handling empty string regexp matches in String.prototype.split implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:26 +02:00
Andreas Maier 6ab3ed7ce4 jscript_test: Simple test for Enumerator().
Signed-off-by: Andreas Maier <staubim@quantentunnel.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-20 00:17:43 +02:00
Jacek Caban b9a57de048 jscript: Use parse_decimal for parsing JSON numeric literals starting with 0.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-21 22:57:51 +01:00
Jacek Caban 1fc9b2e934 jscript: Support undefined separator in String.split implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-30 19:36:51 +01:00
Jacek Caban a9f8c2c7c1 jscript: Make String.length non-writable.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-11 00:39:47 +02:00
Zebediah Figura bf47aebdee jscript: Avoid crash when calling stringify() with no arguments.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-07 12:02:51 +02:00
Jacek Caban 89da4559ee jscript: Properly support missing array elements in Array.pop.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-02 10:54:25 +01:00
Jacek Caban af5edf9504 jscript: Added Date.now implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-01 19:27:32 +01:00
Sebastian Lackner 57291c4bfd jscript: Simplify create_utc_string and add basic tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:51 +09:00
Sebastian Lackner 20d5bbaa63 jscript: Simplify date_to_string and add basic tests.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:41 +09:00
Sebastian Lackner 4d67ffd57e jscript: Allocate string of correct size in Date toLocaleDateString method.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:16 +09:00
Sebastian Lackner 79f18d027f jscript: Properly handle \0 characters in Array join method.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-12 22:58:01 +09:00
Sebastian Lackner fd07a15727 jscript: Allocate string of correct size in Date toTimeString method.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner 1c3e0dd3d5 jscript: Properly handle \0 characters in String indexOf method.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner 54e6736032 jscript: Properly handle \0 characters in String to{Lower,Upper}Case methods.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-09 20:20:53 +09:00
Sebastian Lackner 18420826aa jscript: Do not include terminating \0 in result returned by Date_toLocale{Date,Time}String.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-08 10:06:28 +09:00
Jacek Caban 68dddd8d89 jscript: Properly handle arguments in Object constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-21 11:23:42 +09:00
Jacek Caban b5aeb661b9 jscript: Added non-zero timezone offset tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-25 22:05:26 +09:00
Markus Heidelberg 74257d5940 jscript: Date.parse: make "UTC"/"GMT" optional before the timezone offset.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 22:17:38 +09:00
Jacek Caban 45b3334757 jscript: Fixed tests on some old jscript versions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:35 +09:00
Jacek Caban 2cbb757abe jscript: Added JSON tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:41 +09:00
Jacek Caban 4e1e2ee451 jscript: Added JSON object stub implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-28 13:43:10 +09:00
Jacek Caban d7e4193df2 jscript: Added support for Function constructor called as a function.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-06 18:14:44 +01:00
Thomas Faller fdd22f197a jscript: Date.parse: long date with '/' or '-'. 2015-05-04 20:20:26 +09:00
Jacek Caban 1a89ea7043 jscript: Improved error handling in numeric literal parser. 2013-11-06 18:01:04 +01:00
Jacek Caban 99d1a8529b jscript: Added null and undefined values support to to_object. 2012-12-21 17:28:55 +01:00
Jacek Caban 9de9c353ac jscript: Fixed Number.toFixed for value 0 with 0 precision. 2012-12-17 20:31:16 +01:00
Jacek Caban b568d88815 jscript: Throw an error if return statement is in eval code. 2012-12-12 20:23:13 +01:00
Jacek Caban 0e5933f70a jscript: Added support for indexed string access. 2012-11-30 19:12:16 +01:00
Jacek Caban 25ffa3d97b jscript: Added more enumerable attribute tests. 2012-11-05 17:44:16 +01:00
Jacek Caban 77c3dc544b jscript: Added support for limit argument in String.split. 2012-09-24 22:27:29 +02:00
Jacek Caban 1104663fe7 jscript: Use prototype for builtin String properties. 2012-07-24 13:38:41 +02:00
Jacek Caban 1dfb75d9a3 jscript: Use prototype for builtin RegExp properties. 2012-07-24 13:38:37 +02:00
Jacek Caban 3b80361a70 jscript: Use prototype for builtin Number properties. 2012-07-24 13:38:31 +02:00
Jacek Caban 175c4ddad5 jscript: Use prototype for builtin Date properties. 2012-07-24 13:38:26 +02:00
Jacek Caban 5058c1d12d jscript: Use prototype for builtin Boolean properties. 2012-07-24 13:38:20 +02:00
Jacek Caban 6e4f74f71b jscript: Use prototype for builtin Array properties. 2012-07-24 13:38:09 +02:00