• adamk's avatar
    Don't reflect ES2015 Function name inference in Function.prototype.toString · cc2ea257
    adamk authored
    Various syntactic forms now cause functions to have names where they
    didn't before. Per the upcoming changes to the toString spec, only
    a name that was literally part of a function's expression or declaration
    is meant to be reflected in toString. This also happens to be the same
    set of names that V8 currently outputs (without the --harmony-function-name
    flag).
    
    This required distinguishing anonymous FunctionExpressions from other sorts
    of function definitions (like methods and getters/setters) in the AST, parser,
    and at runtime.
    
    The patch also takes the opportunity to remove one more argument (and enum)
    from FunctionLiteral, as well as adding a special factory method for the
    case of a FunctionLiteral representing toplevel or eval'd code.
    
    BUG=v8:4760
    LOG=n
    
    Review URL: https://codereview.chromium.org/1712833002
    
    Cr-Commit-Position: refs/heads/master@{#34132}
    cc2ea257
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
fuzzer Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
simdjs Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
webkit Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
ignition.gyp Loading commit data...
ignition.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...