wine/dlls/jscript
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
..
tests jscript: Implement CollectGarbage(). 2022-12-08 20:32:10 +01:00
activex.c
array.c jscript: Pass correct 'this' to callbacks called by builtins. 2022-11-23 17:59:47 +01:00
bool.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
cc_parser.y
compile.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
date.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
decode.c
dispex.c jscript: Run the garbage collector every 30 seconds on a new object allocation. 2022-12-08 20:32:10 +01:00
engine.c jscript: Implement a Garbage Collector to deal with circular references. 2022-12-08 20:32:10 +01:00
engine.h jscript: Use a jsdisp to hold refs for scopes. 2022-12-08 20:32:10 +01:00
enumerator.c jscript: Implement a Garbage Collector to deal with circular references. 2022-12-08 20:32:10 +01:00
error.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
function.c jscript: Create the source function's 'prototype' prop object on demand. 2022-12-08 20:32:10 +01:00
global.c jscript: Implement CollectGarbage(). 2022-12-08 20:32:10 +01:00
jscript.c jscript: Implement a Garbage Collector to deal with circular references. 2022-12-08 20:32:10 +01:00
jscript.h jscript: Run the garbage collector every 30 seconds on a new object allocation. 2022-12-08 20:32:10 +01:00
jscript.rc
jscript.rgs
jscript.spec
jscript_classes.idl
jscript_main.c
jsglobal.idl
jsglobal_dispid.h
json.c jscript: Pass a jsval as the 'this' to disp_call_value. 2022-11-23 17:59:47 +01:00
jsregexp.c jscript: Implement a Garbage Collector to deal with circular references. 2022-12-08 20:32:10 +01:00
jsstr.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
jsstr.h jscript: Fix GCC 12.2 warning. 2022-09-19 20:10:36 +02:00
jsutils.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
jsval.h
lex.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
Makefile.in
math.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
number.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
object.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
parser.h
parser.y jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
regexp.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
regexp.h jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00
resource.h
set.c jscript: Implement a Garbage Collector to deal with circular references. 2022-12-08 20:32:10 +01:00
string.c jscript: Pass a jsval as the 'this' to jsdisp_call_value. 2022-11-23 17:59:47 +01:00
vbarray.c jscript: Use CRT allocation functions. 2022-11-21 22:10:43 +01:00