• 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
..
OWNERS Loading commit data...
ast-expression-rewriter.cc Loading commit data...
ast-expression-rewriter.h Loading commit data...
ast-expression-visitor.cc Loading commit data...
ast-expression-visitor.h Loading commit data...
ast-literal-reindexer.cc Loading commit data...
ast-literal-reindexer.h Loading commit data...
ast-numbering.cc Loading commit data...
ast-numbering.h Loading commit data...
ast-value-factory.cc Loading commit data...
ast-value-factory.h Loading commit data...
ast.cc Loading commit data...
ast.h Loading commit data...
modules.cc Loading commit data...
modules.h Loading commit data...
prettyprinter.cc Loading commit data...
prettyprinter.h Loading commit data...
scopeinfo.cc Loading commit data...
scopeinfo.h Loading commit data...
scopes.cc Loading commit data...
scopes.h Loading commit data...
variables.cc Loading commit data...
variables.h Loading commit data...