Commit graph

161664 commits

Author SHA1 Message Date
Gabriel Ivăncescu
27ceb62ebd jscript: Create the source function's 'prototype' prop object on demand.
The 'prototype' prop of a source function is, by default, an empty object with
a 'constructor' prop pointing back to the function. Currently, every source
function is created in this fashion, which makes it a circular reference
and thus prevents it from being freed until the Garbage Collector kicks in.

The performance impact comes from the function keeping a ref to the
enclosing scope, and since the scope is being held by it, the engine will
detach the scope, believing it to be used for the time being (until the
GC cleans it). This can cause substantial performance issues for such a
common case. The FFXIV Launcher, for example, leaks a large amount of such
short-lived functions and the enclosing scopes.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-12-08 20:32:10 +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
809a91b82f jscript: Implement CollectGarbage().
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
b0db79d769 jscript: Use a jsdisp to hold refs for scopes.
So the garbage collector can traverse it.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2022-12-08 20:32:10 +01:00
Georg Lehmann
07761336d6 winevulkan: Update to VK spec version 1.3.237. 2022-12-08 20:32:10 +01:00
Piotr Caban
894b28085c msvcp70: Update spec file.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54101
2022-12-08 20:32:10 +01:00
Jacek Caban
c65bfc062b winevulkan: Rename needs_host_type to needs_win32_type. 2022-12-08 18:41:25 +01:00
Torge Matthies
a261c043eb msvcr120: Throw exception in ~_StructuredTaskCollection if _RunAndWait was not called. 2022-12-08 18:41:25 +01:00
Torge Matthies
cef3dcbddd msvcr100: Implement missing_wait exception. 2022-12-08 18:41:25 +01:00
Torge Matthies
d1468c2b60 msvcr110: Implement _StructuredTaskCollection constructor. 2022-12-08 18:41:25 +01:00
Torge Matthies
f26985affe msvcr100: Implement exception passing from chore threads to _RunAndWait. 2022-12-08 18:41:25 +01:00
Torge Matthies
96e2a766f8 msvcr100: Factor out EXCEPTION_RECORD to exception_ptr conversion. 2022-12-08 18:41:25 +01:00
Torge Matthies
1163168034 msvcr100: Move exception_ptr functions to a separate file. 2022-12-08 18:41:25 +01:00
Torge Matthies
11af5b750c msvcr100: Implement _StructuredTaskCollection::_RunAndWait. 2022-12-08 18:41:25 +01:00
Hans Leidekker
fa533f11e1 wofutil: Stub WofShouldCompressBinaries(). 2022-12-08 18:41:25 +01:00
Hans Leidekker
de026dbd8e wofutil: New dll. 2022-12-08 18:41:25 +01:00
Jacek Caban
1d4a230c69 user32: Merge winpos.c into win.c. 2022-12-08 18:41:24 +01:00
Jacek Caban
f5c8275329 win32u: Move NtUserGetInternalWindowPos implementation from user32. 2022-12-08 18:41:24 +01:00
Jacek Caban
026700027e win32u: Move NtUserRealChildWindowFromPoint implementation from user32. 2022-12-08 18:41:24 +01:00
Sven Baars
fab6c2d687 taskschd/tests: Fix test failures on newer version of Windows 10. 2022-12-08 18:41:24 +01:00
Robert Wilhelm
895f8006f2 wshom.ocx: Implement IWshNetwork2_get_UserName().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53971
2022-12-08 18:41:24 +01:00
Hans Leidekker
090e574adb wtsapi32: Improve the stub for WTSQuerySessionInformation(WTSClientProtocolType). 2022-12-08 18:41:24 +01:00
Francois Gouget
508b793ec9 kernel32/tests: Avoid failures when processes start during the process test.
On Windows processes sometimes start during test_services_exe() so that
the size returned by the first NtQuerySystemInformation() is no longer
sufficient for the second call.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54094
2022-12-08 18:12:51 +01:00
Alex Henrie
926433faa3 include: Add corecrt_malloc.h. 2022-12-08 18:12:51 +01:00
Hans Leidekker
3797a66404 winhttp/tests: Reduce send buffer size.
It looks like there was a change on the websocket test server that causes our
send operations to block. Reducing the size of the send buffer works around the
test failures. The tests still succeed on Windows, which suggests that native
sends large buffers in smaller chunks.
2022-12-08 18:12:51 +01:00
Alexandre Julliard
46e5dd3967 kernelbase/tests: Fix an uninitialized variable warning. 2022-12-08 18:12:18 +01:00
Alexandre Julliard
620089aade kernel32/tests: Fix an uninitialized variable warning. 2022-12-08 18:12:18 +01:00
Alexandre Julliard
510f7ee01d winspool.drv: Remove a no longer used inline function.
No longer used since e164b8cefb.
2022-12-08 18:11:23 +01:00
Alexandre Julliard
57c58be77d winedbg: Fix printf format warnings on ARM platforms. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
7ae24a04b5 oleaut32: Fix printf format warnings on ARM platforms. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
1909f1565e ntdll: Fix printf format warnings on ARM platforms. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
755d783339 msvcrt: Fix printf format warnings on ARM platforms. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
f48500bb3a ldap: Use LONG instead of long for exported types. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
df50fca0f9 makedep: Add a helper function to skip spaces in strings. 2022-12-08 18:11:23 +01:00
Alexandre Julliard
9576fbeff1 makedep: Add the default Unix libraries also when building .dll.so files.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54096
2022-12-08 18:11:23 +01:00
Sven Baars
7acd3aa429 taskschd/tests: Fix a test failure on w1064v1507. 2022-12-07 23:20:39 +01:00
Piotr Caban
0c3653bbcd msvcrt: Construct a real C++ object to test against.
This fixes GCC12 warnings about accessing a too small object.

    wine/dlls/msvcrt/tests/cpp.c: In function 'test_rtti':
    wine/dlls/msvcrt/tests/cpp.c:1036:45: warning: array subscript 2 is outside array bounds of 'void[4]' [-Warray-bounds]
     1036 |       ok (casted == (char*)&child_class_sig0+8, "failed cast to simple_class (%p %p)\n", casted, &child_class_sig0);
          |                     ~~~~~~~~~~~~~~~~~~~~~~~~^~

Signed-off-by: Piotr Caban <piotr.caban@codeweavers.com>
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
565ce829e1 msvcr90: Fix warning on object access tests.
GCC 12 complains about accessing a too small object.

In function 'test__AdjustPointer',
    inlined from 'func_msvcr90' at wine/dlls/msvcr90/tests/msvcr90.c:2515:5:
wine/dlls/msvcr90/tests/msvcr90.c:1556:30: warning: array subscript 30 is outside array bounds of 'void[8]' [-Warray-bounds]
 1556 |         {&obj1, (char*)&obj1 + obj.off, {0, 0, 0}},
      |                 ~~~~~~~~~~~~~^~~~~~~~~

Since we're only checking the addresses and not the underlying objects,
use uintptr_t instead of pointers.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
c2075a9fc8 wined3d: Enable long types in surface.c. 2022-12-07 23:20:39 +01:00
Eric Pouech
d73c71098e wined3d: Reduce usage of long integral types in surface.c. 2022-12-07 23:20:39 +01:00
Eric Pouech
894e46365f wined3d: Enable long types in device.c. 2022-12-07 23:20:39 +01:00
Eric Pouech
47ea1cb810 wined3d: Reduce usage of long integral types in device.c.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
68811881e6 wined3d: Reduce usage of long integral types in include/wined3d.h.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
36717714c9 wined3d: Enable long types in glsl_shader.c. 2022-12-07 23:20:39 +01:00
Eric Pouech
9b1ce2d824 wined3d: Reduce usage of long integral types in glsl_shader.c. 2022-12-07 23:20:39 +01:00
Eric Pouech
b36eab110b wined3d: Enable long types in adapter_gl.c.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
f96630f04f wined3d: Reduce usage of long integral types in adapter_gl.c.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Eric Pouech
386414fbdc wined3d: Enable long integral types in cs.c.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-07 23:20:39 +01:00
Jacek Caban
1d3bf575e7 winex11: Remove no longer used declarations. 2022-12-07 23:20:39 +01:00