1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00
Commit graph

294 commits

Author SHA1 Message Date
Alexandre Julliard
bd5ab1c6cd jscript: Use the correct facility for JScript errors. 2024-03-18 11:00:41 +01:00
Alexandre Julliard
98b7095a21 include: Add some new error codes.
And sort everything consistently.
2024-03-15 15:06:37 +01:00
Gabriel Ivăncescu
e00270a8b2 jscript: Implement ArrayBuffer.prototype.slice.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:03 +01:00
Gabriel Ivăncescu
556e3349ab jscript: Implement DataView setters.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Gabriel Ivăncescu
00f04ef3ce jscript: Add initial implementation of DataView.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Gabriel Ivăncescu
88c0f72bbf jscript: Add initial implementation of ArrayBuffer.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Gabriel Ivăncescu
bc45b43a49 jscript: Make the garbage collector thread-wide rather than per-ctx.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:54 +01:00
Gabriel Ivăncescu
f55db65292 jscript: Move thread_id from JScript struct to TLS data.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:51 +01:00
Gabriel Ivăncescu
b4373a9e18 jscript: Implement WeakMap.set().
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-07-20 21:48:39 +02:00
Gabriel Ivăncescu
b8dbee6916 jscript: Implement WeakMap instance stub and constructor.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-07-20 21:48:39 +02:00
Alistair Leslie-Hughes
803834fddf jscript: Remove DECLSPEC_HIDDEN usage. 2023-07-03 22:15:42 +02:00
Gabriel Ivăncescu
1b385fa37c jscript: Store detached args into a scope's specialized buffer.
Rather than using the variable obj for it. Since it's an implementation
detail, the scope's dispex object accesses them using index props (using
same indices as the buffer's).

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:45 +02:00
Gabriel Ivăncescu
a184ace43d jscript: Correctly implement context for indirect eval calls in ES5+ modes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-06-21 18:54:39 +02:00
Gabriel Ivăncescu
e7b06b0ddd jscript: Throw proper error for unexpected quantifiers in RegExp.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-05-30 16:42:12 +02:00
Gabriel Ivăncescu
c2b5538711 jscript: Pass the correct ServiceProvider when invoking external prop.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-02-01 22:29:43 +01:00
Gabriel Ivăncescu
6deee88a6c jscript: Implement SID_GetCaller for QueryService.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2023-01-27 13:39:06 +01:00
Gabriel Ivăncescu
d192aa102f jscript: Run the garbage collector every 30 seconds on a new object allocation.
Better heuristics can be used in the future.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-12-08 20:32:10 +01:00
Gabriel Ivăncescu
e8ee6ddae8 jscript: Implement a Garbage Collector to deal with circular references.
Implement a basic GC based on the mark-and-sweep algorithm, without requiring
manually specifying "roots", which vastly simplifies the code.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-12-08 20:32:10 +01:00
Gabriel Ivăncescu
da842966ff jscript: Pass a jsval as the 'this' to disp_call_value.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-23 17:59:47 +01:00
Gabriel Ivăncescu
9d4e93cfde jscript: Pass a jsval as the 'this' to jsdisp_call_value.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-23 17:59:47 +01:00
Gabriel Ivăncescu
ae73e09a8d jscript: Use CRT allocation functions.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-11-21 22:10:43 +01:00
Alex Henrie
81a432c356 jscript: Remove unused function heap_strdupW. 2022-11-18 18:52:12 +01:00
Gabriel Ivăncescu
2dcc5a7026 jscript: Implement reviver argument for JSON.parse.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-10-17 11:27:04 +02:00
Gabriel Ivăncescu
79e51d6bc5 jscript: Release all globals when the script is uninitialized.
Most of these globals were leaking before as they were never freed at all.

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>
2022-06-03 21:55:17 +02:00
Gabriel Ivăncescu
a8057c2e14 jscript: Implement Array.prototype.toLocaleString.
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>
2022-05-03 20:24:31 +02:00
Gabriel Ivăncescu
41782ec12e jscript: Return proper error in Number.toLocaleString with invalid 'this' in ES5 mode.
Note that, for example, Number.toFixed still returns JS_E_NUMBER_EXPECTED
even in ES5 mode (this is already tested).

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>
2022-05-03 20:24:18 +02:00
Gabriel Ivăncescu
8aefdf48f9 jscript: Implement Number.prototype.toLocaleString.
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>
2022-05-03 20:24:06 +02:00
Gabriel Ivăncescu
429325b689 jscript: Don't allow changing prototype on non-extensible objects.
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>
2022-03-21 22:33:30 +01:00
Gabriel Ivăncescu
7858f87ae5 jscript: Throw error when attempting to set circular __proto__ chains.
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>
2022-03-21 22:33:27 +01:00
Gabriel Ivăncescu
364e093ab7 jscript: Make Object.prototype.__proto__ an actual accessor.
We have to define it after the constructors are initiated.

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>
2022-03-21 22:33:24 +01:00
Gabriel Ivăncescu
7a1c6453bc jscript: Pass a jsval "this" to builtin functions.
And get rid of vdisp_t since it's no longer needed.

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>
2022-03-17 21:06:11 +01:00
Eric Pouech
679bbdf89d jscript: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 18:23:19 +01:00
Gabriel Ivăncescu
ce1b3f5f1d jscript: Replace the value_prop in builtin_info with a call 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-25 21:20:29 +01:00
Gabriel Ivăncescu
46367d1ecc jscript: Implement Object.prototype.__proto__ property.
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:09 +01:00
Jacek Caban
9ced0b1fbc jscript: Add Map.prototype.set implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 18:55:24 +02:00
Jacek Caban
6dda7096bf jscript: Add Map object stub implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 18:19:53 +02:00
Jacek Caban
8dd582ebeb jscript: Add Set object stub implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 10:20:24 +02:00
Jacek Caban
6e292a745f mshtml: Introduce ES6 JavaScript mode and use it in IE11 compat mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 10:20:08 +02:00
Jacek Caban
9885de45af jscript: Add Object.getOwnPropertyNames implementation.
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
c4948c428a jscript: Use enum to pass enumeration type to jsdisp_next_prop.
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
1f49903e66 jscript: Add Object.isFrozen and Object.isSealed implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:13:39 +02:00
Jacek Caban
380ae426a4 jscript: Throw error when trying to add a property to non-extensible objects in jsdisp_propput_idx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 21:13:27 +02:00
Jacek Caban
51742d80cd jscript: Add Object.seal implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:34:06 +02:00
Jacek Caban
0d3634b3ff jscript: Add Object.freeze implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:34:06 +02:00
Jacek Caban
7f1c98cac6 jscript: Support non-extensible objects in jsdisp_define_property.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:34:06 +02:00
Jacek Caban
7750753758 jscript: Support non-extensible objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 18:29:53 +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
Gabriel Ivăncescu
eb43d59e8e jscript: Store the object prototype in the 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>
2021-03-11 22:58:26 +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