Commit Graph

707 Commits

Author SHA1 Message Date
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Gabriel Ivăncescu 464134c20f jscript: Use to_primitive when getting the default value.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:48:37 +01:00
Gabriel Ivăncescu c1861dc7d0 jscript: Support deletion for accessor, builtin and idx props.
IDX props are not configurable, thus they cannot be deleted, so it makes
no sense to special-case them anyway.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:48:35 +01:00
Gabriel Ivăncescu 738894a47c jscript: Fixup PROTREF props when looking them up.
Convert them to PROP_DELETE if the referenced prop in the prototype chain
doesn't exist anymore.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:48:29 +01:00
Gabriel Ivăncescu 58722dfe35 jscript: Treat prototype refs as non-existent when deleting.
Delete only affects own properties.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 18:48:26 +01:00
Gabriel Ivăncescu 87ac636cbb jscript: Implement Object.prototype.isPrototypeOf method.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-03 21:10:07 +01:00
Gabriel Ivăncescu 678789c72f jscript: Fix GetIDsOfNames for more than one name.
Names after the first one are supposed to retrieve DISPIDs for parameters,
but it doesn't seem to be implemented on Windows.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:28 +02:00
Paul Gofman 308c8468b4 jscript: Support block scope variables.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-18 16:49:41 +02:00
Paul Gofman b356962997 jscript: Parse 'let' and 'const' variable declarations.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 23:23:49 +02:00
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 f568b48e66 jscript: Get dispid and call invoke in a single step when setting a member property.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:29:48 +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
Gabriel Ivăncescu 0ae1669ec2 jscript/tests: Add more tests for setting prototype to different builtin types.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 22:58:26 +01:00
Gabriel Ivăncescu ba1f47a770 jscript: Use default object prototype if it's null.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 22:58:26 +01:00
Gabriel Ivăncescu 580413032c jscript: Check for null instance prototype.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-10 21:31:33 +01:00
Jacek Caban d22bafa763 jscript: Add VT_CY type support.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 20:34:57 +01:00
Jacek Caban 7e4f254bbd jscript: Support VARIANT type in jsval_strict_equal.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +01:00
Jacek Caban 42c044ae71 jscript: Support VT_DATE to string conversion.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +01:00
Jacek Caban 3fb0e893b1 jscript: Support VT_DATE to number conversion.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +01:00
Jacek Caban 859783e83b jscript/tests: Add VT_DATE handling tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +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
Michael Stefaniuc 887d16c98c jscript/tests: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-08 12:34:29 +01:00
Robert Wilhelm f586348deb jscript: Cc_parser_parse implement '&&' expression.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49450
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 11:30:37 +02:00
Puetz Kevin A b60c4c6ef6 jscript: Fix `this` within IDispatchEx::InvokeEx.
Latent bug revealed by 614ea7e6243ead003bcfe4624895154972f3445f;
Now that cross-context calls go through disp_call* instead of
jsdisp_call*, and thus through InvokeEx, the `this` pointer is
lost when calling methods inherited from a prototype.

Signed-off-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 22:30:48 +02:00
Jacek Caban fe0bd340cd jscript: Support passing non-string flags to RegExp constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Jacek Caban 4e8874930a jscript: Support passing non-string pattern to RegExp constructor.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02: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
Jacek Caban 99929c0896 jscript: Clear SCRIPTITEM_CODEONLY flag on script re-initialization.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Jacek Caban 133918e69c jscript: Lookup the identifier in the named item's disp before the global context.
Based on patch by Gabriel Ivăncescu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Gabriel Ivăncescu fa0ec37077 jscript/tests: Add more persistent named items tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-27 21:16:13 +01:00
Gabriel Ivăncescu 8baf4a2a55 jscript/tests: Add tests for persistent named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 22:02:11 +01:00
Gabriel Ivăncescu 23bc78c199 jscript: Create separate script dispatches for each named item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 19:36:41 +01: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
Gabriel Ivăncescu c2402a92ae jscript: Retrieve the proper 'this' object for bytecodes with named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Gabriel Ivăncescu 5b28c43dd4 jscript: Don't lookup global members for bytecodes with a named item.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 10:04:00 +01:00
Gabriel Ivăncescu b526077189 jscript/tests: Add test for function constructor in named item context.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu 335e0073c5 jscript: Retrieve the proper script dispatch from the named item in GetScriptDispatch.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu f6201b4b11 jscript: Lookup the named item and keep a ref to it from the associated bytecode.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 22:16:30 +01:00
Gabriel Ivăncescu acb076c820 jscript: Lookup host global object on demand instead of storing it in script context.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:54:31 +01:00
Gabriel Ivăncescu eb80cc0f4a jscript/tests: Add tests for named items.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:50:15 +01:00
Jacek Caban 150b7391b8 jscript: Add GetSourceLineText implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:27 +01:00
Jacek Caban 348eef2e02 jscript: Add GetSourcePosition implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:04 +01:00
Jacek Caban ed3e5404dd jscript: Return error source and description from GetExceptionInfo.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:04 +01:00
Jacek Caban f6c5da47f7 jscript: Suport generic error object for exception with no associated JavaScript exception value.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:24:51 +01:00
Jacek Caban 7548238297 jscript: Add IActiveScriptError implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 33984c390d jscript: Use enter_script and leave_script to call script site notifications.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-30 16:22:33 +01:00
Jacek Caban 9a9a1821a3 jscript/tests: Add more script enter notification tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 21:24:01 +01:00