ladybird/Libraries/LibJS
Andreas Kling 1c43442be4 LibJS+Clients: Add JS::VM object, separate Heap from Interpreter
Taking a big step towards a world of multiple global object, this patch
adds a new JS::VM object that houses the JS::Heap.

This means that the Heap moves out of Interpreter, and the same Heap
can now be used by multiple Interpreters, and can also outlive them.

The VM keeps a stack of Interpreter pointers. We push/pop on this
stack when entering/exiting execution with a given Interpreter.
This allows us to make this change without disturbing too much of
the existing code.

There is still a 1-to-1 relationship between Interpreter and the
global object. This will change in the future.

Ultimately, the goal here is to make Interpreter a transient object
that only needs to exist while you execute some code. Getting there
will take a lot more work though. :^)

Note that in LibWeb, the global JS::VM is called main_thread_vm(),
to distinguish it from future worker VM's.
2020-09-20 19:24:44 +02:00
..
Heap LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Runtime LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Tests LibJS: Handle getter exception in JSONObject::serialize_json_property() 2020-09-19 14:17:22 +02:00
AST.cpp LibJS: Do not revisit already visited values in update_function_name() 2020-09-19 00:33:56 +02:00
AST.h LibJS: Mark more ASTNode classes as final 2020-09-18 20:49:35 +02:00
CMakeLists.txt LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Console.cpp LibJS: Eliminate some (unnecessary) Vector copies 2020-09-08 13:43:03 +02:00
Console.h LibJS: Move Interpreter::get_trace() to ConsoleClient 2020-06-02 15:22:34 +02:00
Forward.h LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Interpreter.cpp LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Interpreter.h LibJS+Clients: Add JS::VM object, separate Heap from Interpreter 2020-09-20 19:24:44 +02:00
Lexer.cpp LibJS: Fix start position of multi-line tokens 2020-09-12 00:13:29 +02:00
Lexer.h LibJS: Lex and parse regex literals, add RegExp objects 2020-06-07 19:06:55 +02:00
MarkupGenerator.cpp Browser: Escape JS source operators for HTML display in console 2020-07-23 23:01:16 +02:00
MarkupGenerator.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
Parser.cpp LibJS: Add FIXMEs for parsing increment operators with function LHS/RHS 2020-09-18 20:49:35 +02:00
Parser.h LibJS: Parser refactored to use constexpr precedence table 2020-08-21 16:14:14 +02:00
Token.cpp LibJS: Add missing reserved words to Token::is_identifier_name() 2020-08-14 10:58:51 +02:00
Token.h LibJS: Parser refactored to use constexpr precedence table 2020-08-21 16:14:14 +02:00