• Gabriel Ivăncescu's avatar
    jscript: Create the source function's 'prototype' prop object on demand. · 27ceb62e
    Gabriel Ivăncescu authored
    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: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
    27ceb62e
Name
Last commit
Last update
..
tests Loading commit data...
Makefile.in Loading commit data...
activex.c Loading commit data...
array.c Loading commit data...
bool.c Loading commit data...
cc_parser.y Loading commit data...
compile.c Loading commit data...
date.c Loading commit data...
decode.c Loading commit data...
dispex.c Loading commit data...
engine.c Loading commit data...
engine.h Loading commit data...
enumerator.c Loading commit data...
error.c Loading commit data...
function.c Loading commit data...
global.c Loading commit data...
jscript.c Loading commit data...
jscript.h Loading commit data...
jscript.rc Loading commit data...
jscript.rgs Loading commit data...
jscript.spec Loading commit data...
jscript_classes.idl Loading commit data...
jscript_main.c Loading commit data...
jsglobal.idl Loading commit data...
jsglobal_dispid.h Loading commit data...
json.c Loading commit data...
jsregexp.c Loading commit data...
jsstr.c Loading commit data...
jsstr.h Loading commit data...
jsutils.c Loading commit data...
jsval.h Loading commit data...
lex.c Loading commit data...
math.c Loading commit data...
number.c Loading commit data...
object.c Loading commit data...
parser.h Loading commit data...
parser.y Loading commit data...
regexp.c Loading commit data...
regexp.h Loading commit data...
resource.h Loading commit data...
set.c Loading commit data...
string.c Loading commit data...
vbarray.c Loading commit data...