1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00
serenity/Userland/Libraries/LibJS
Linus Groh 1c3eef5317 LibJS: Use MarkedValueList for internal own properties getter functions
Letting these create and return a JS::Array directly is pretty awkward
since we then need to go through the indexed properties for iteration.
Just use a MarkedValueList (i.e. Vector<Value>) for this and add a new
Array::create_from() function to turn the Vector into a returnable
Array as we did before.

This brings it a lot closer to the spec as well, which uses the
CreateArrayFromList abstract operation to do exactly this.

There's an optimization opportunity for the future here, since we know
the Vector's size we could prepare the newly created Array accordingly,
e.g. by switching to generic storage upfront if needed.
2021-04-07 09:05:01 +02:00
..
Heap LibJS: Fix m_allocations_since_last_gc initialization value 2021-03-28 20:40:22 +02:00
Runtime LibJS: Use MarkedValueList for internal own properties getter functions 2021-04-07 09:05:01 +02:00
Tests LibJS: Support mapFn argument of Array.from 2021-04-06 22:25:05 +02:00
AST.cpp LibJS: Use MarkedValueList for internal own properties getter functions 2021-04-07 09:05:01 +02:00
AST.h Only apply auto-naming of function expressions based on syntax 2021-03-22 12:44:07 +01:00
CMakeLists.txt LibJS: Add initial support for Promises 2021-04-02 10:47:40 +02: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: Add initial support for Promises 2021-04-02 10:47:40 +02:00
Interpreter.cpp LibJS: Add initial support for Promises 2021-04-02 10:47:40 +02: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