• 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...
build Loading commit data...
docs Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party/binutils Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
Makefile.nacl Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...