1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00
serenity/Userland/Libraries/LibJS
Linus Groh bb1a98d809 LibJS: Add new PropertyDescriptor class and related abstract operations
This is an implementation of 'The Property Descriptor Specification
Type' and related abstract operations, namely:

- IsAccessorDescriptor
- IsDataDescriptor
- IsGenericDescriptor
- FromPropertyDescriptor
- ToPropertyDescriptor
- CompletePropertyDescriptor

It works with Optional<T> to enable omitting certain fields, which will
eventually replace the Attribute::Has{Getter,Setter,Configurable,
Enumerable,Writable} bit flags, which are awkward to work with - being
able to use an initializer list with any of the possible attributes is
much more convenient.

Parts of the current PropertyAttributes implementation as well as the
much simpler PropertyDescriptor struct in Object.h will eventually be
replaced with this and completely go away.

Property storage will still use the PropertyAttributes bit flags, this
is for the layers above.

Note that this is currently guarded behind an #if 0 as if conflicts with
the existing PropertyDescriptor struct, but it's known to compile and
work just fine - I simply want to have this in a separate commit, the
primary object rewrite commit will be large enough as is.
2021-07-04 22:07:36 +01:00
..
Bytecode LibJS: Bring ArrayCreate and ArrayConstructor closer to spec 2021-07-04 00:51:43 +01:00
Heap LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
Runtime LibJS: Add new PropertyDescriptor class and related abstract operations 2021-07-04 22:07:36 +01:00
Tests LibJS: Allow patterns in parenthesized arrow function parameters 2021-07-02 14:59:03 +02:00
AST.cpp LibJS: Make the with statement evaluation follow the spec even more 2021-07-04 18:56:08 +02:00
AST.h LibJS: Make SuperCall a proper AST node and clean up evaluation 2021-07-02 19:39:09 +02:00
CMakeLists.txt LibJS: Add new PropertyDescriptor class and related abstract operations 2021-07-04 22:07:36 +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: Add new PropertyDescriptor class and related abstract operations 2021-07-04 22:07:36 +01:00
Interpreter.cpp LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
Interpreter.h LibJS: Drop "Record" suffix from all the *Environment record classes 2021-07-01 12:28:57 +02:00
Lexer.cpp LibJS: Make a slash after a curly close mean not-division 2021-07-02 14:59:03 +02:00
Lexer.h LibJS+LibCrypto: Allow '_' as a numeric literal separator :^) 2021-06-26 16:30:35 +02:00
MarkupGenerator.cpp LibJS: Avoid unnecessary PropertyName creation in MarkupGenerator 2021-07-04 22:07:36 +01:00
MarkupGenerator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Parser.cpp LibJS: Make SuperCall a proper AST node and clean up evaluation 2021-07-02 19:39:09 +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+LibCrypto: Allow '_' as a numeric literal separator :^) 2021-06-26 16:30:35 +02:00
Token.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00