ladybird/Userland/Libraries/LibJS
Andreas Kling 0255c8d976 Only apply auto-naming of function expressions based on syntax
The auto naming of function expressions is a purely syntactic
decision, so shouldn't be decided based on the dynamic type of
an assignment. This moves the decision making into the parser.

One icky hack is that we add a field to FunctionExpression to
indicate whether we can autoname. The real solution is to actually
generate a CompoundExpression node so that the parser can make
the correct decision, however this would have a potentially
significant run time cost.

This does not correct the behaviour for class expressions.

Patch from Anonymous.
2021-03-22 12:44:07 +01:00
..
Heap LibJS: Always inline Cell::vm() and Cell::heap() 2021-03-21 21:39:39 +01:00
Runtime LibJS: *Actually* check for negative zero in JS::Value(double) 2021-03-22 08:06:47 +01:00
Tests Only apply auto-naming of function expressions based on syntax 2021-03-22 12:44:07 +01:00
AST.cpp Only apply auto-naming of function expressions based on syntax 2021-03-22 12:44:07 +01:00
AST.h Only apply auto-naming of function expressions based on syntax 2021-03-22 12:44:07 +01:00
CMakeLists.txt LibSyntax+LibGUI+LibJS: Move JS syntax highlighter to LibJS 2021-02-07 16:56:02 +01:00
Console.cpp LibJS: Put console dbgln() logging behind #ifdef __serenity__ 2021-03-02 08:36:34 +01:00
Console.h LibJS: Print console.{debug,error,info,log,warn} to system debug log 2021-02-21 21:32:16 +01:00
Forward.h LibJS: Implement the GetMethod abstract operation 2021-03-02 19:20:29 +01:00
Interpreter.cpp LibJS: Don't track executing AST nodes in a Vector 2021-03-21 21:39:39 +01:00
Interpreter.h LibJS: Always inline some tiny Interpreter getters 2021-03-21 21:39:39 +01:00
Lexer.cpp LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00
Lexer.h LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00
MarkupGenerator.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
MarkupGenerator.h Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Parser.cpp Only apply auto-naming of function expressions based on syntax 2021-03-22 12:44:07 +01:00
Parser.h LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00
SourceRange.h LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00
SyntaxHighlighter.cpp LibSyntax: Make rehighlight() take Gfx::Palette as by const-reference 2021-02-11 23:52:39 +01:00
SyntaxHighlighter.h LibSyntax: Make rehighlight() take Gfx::Palette as by const-reference 2021-02-11 23:52:39 +01:00
Token.cpp Everywhere: Rename ASSERT => VERIFY 2021-02-23 20:56:54 +01:00
Token.h LibJS: Keep track of file names, lines and columns inside the AST 2021-03-01 11:14:36 +01:00