1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:38:12 +00:00
serenity/Userland/Libraries/LibJS
Andreas Kling bce7fdba81 LibJS: Bring Reference records a bit closer to the ECMAScript spec
Our Reference class now has the same fields as the spec:

- Base (a non-nullish value, an environment record, or `unresolvable`)
- Referenced Name (the name of the binding)
- Strict (whether the reference originated in strict mode code)
- ThisValue (if non-empty, the reference represents a `super` keyword)

The main difference from before is that we now resolve the environment
record that a reference interacts with. Previously we simply resolved
to either "local variable" or "global variable".

The associated abstract operations are still largely non-conforming,
since we don't yet implement proper variable bindings. But this patch
should at least fix a handful of test262 cases. :^)

There's one minor regression: some TypeError message strings get
a little worse due to doing a RequireObjectCoercible earlier in the
evaluation of MemberExpression.
2021-06-25 16:58:36 +02:00
..
Bytecode Userland: Replace VERIFY(is<T>) with verify_cast<T> 2021-06-24 21:13:09 +02:00
Heap LibJS: Make EnvironmentRecord inherit directly from Cell 2021-06-23 13:08:27 +02:00
Runtime LibJS: Bring Reference records a bit closer to the ECMAScript spec 2021-06-25 16:58:36 +02:00
Tests LibJS: Bring Reference records a bit closer to the ECMAScript spec 2021-06-25 16:58:36 +02:00
AST.cpp LibJS: Bring Reference records a bit closer to the ECMAScript spec 2021-06-25 16:58:36 +02:00
AST.h LibJS: Fix clang-tidy warnings in AST.h 2021-06-24 13:38:21 +02:00
CMakeLists.txt LibJS: Make put_own_property_by_index closer to spec 2021-06-22 20:49:28 +01:00
Console.cpp LibJS: Rename CallFrame => ExecutionContext 2021-06-24 19:28:00 +02:00
Console.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Forward.h LibJS: Begin implementing GlobalEnvironmentRecord 2021-06-22 18:44:53 +02:00
Interpreter.cpp Userland: Replace VERIFY(is<T>) with verify_cast<T> 2021-06-24 21:13:09 +02:00
Interpreter.h LibJS: Split the per-call-frame environment into lexical and variable 2021-06-22 18:44:53 +02:00
Lexer.cpp LibJS: Disallow whitespace or comments between regex literal and flags 2021-06-22 14:08:40 +01:00
Lexer.h Userland: Allow building SerenityOS with -funsigned-char 2021-06-13 18:52:58 +02:00
MarkupGenerator.cpp LibJS: Avoid lots of string-to-int during global object construction 2021-06-13 19:11:29 +02:00
MarkupGenerator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Parser.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
Parser.h LibJS: Correct behaviour of direct vs. indirect eval 2021-06-23 09:38:33 +01:00
SourceRange.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
SyntaxHighlighter.cpp LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
SyntaxHighlighter.h LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
Token.cpp LibJS: Use the new is_ascii_foo() helpers from AK 2021-06-13 19:11:29 +02:00
Token.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00