1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00
serenity/Userland/DevTools/HackStudio
Luke Wilde 631bbcd00a LibJS: Refactor interpreter to use Script and Source Text Modules
This also refactors interpreter creation to follow
InitializeHostDefinedRealm, but I couldn't fit it in the title :^)

This allows us to follow the spec much more closely rather than being
completely ad-hoc with just the parse node instead of having all the
surrounding data such as the realm of the parse node.

The interpreter creation refactor creates the global execution context
once and doesn't take it off the stack. This allows LibWeb to take the
global execution context and manually handle it, following the HTML
spec. The HTML spec calls this the "realm execution context" of the
environment settings object.

It also allows us to specify the globalThis type, as it can be
different from the global object type. For example, on the web, Window
global objects use a WindowProxy global this value to enforce the same
origin policy on operations like [[GetOwnProperty]].

Finally, it allows us to directly call Program::execute in perform_eval
and perform_shadow_realm_eval as this moves
global_declaration_instantiation into Interpreter::run
(ScriptEvaluation) as per the spec.

Note that this doesn't evalulate Source Text Modules yet or refactor
the bytecode interpreter, that's work for future us :^)

This patch was originally build by Luke for the environment settings
object change but was also needed for modules. So I (davidot) have
modified it with the new completion changes and setup for that.

Co-authored-by: davidot <davidot@serenityos.org>
2022-01-22 01:21:18 +00:00
..
Debugger LibJS: Refactor interpreter to use Script and Source Text Modules 2022-01-22 01:21:18 +00:00
Dialogs HackStudio: Add new multiline commit dialog 2022-01-01 14:47:23 +01:00
Git LibCore: Make Core::command return CommandResult struct 2022-01-12 14:55:19 +01:00
LanguageClients LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServer 2022-01-15 13:29:48 +03:30
LanguageServers LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServer 2022-01-15 13:29:48 +03:30
AutoCompleteResponse.h LibIPC+IPCCompiler+AK: Make IPC value decoders return ErrorOr<void> 2021-11-28 23:14:19 +01:00
ClassViewWidget.cpp HackStudio: Add comment about lexicographical insertion to ClassView 2021-06-04 19:29:22 +02:00
ClassViewWidget.h Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
CMakeLists.txt HackStudio: Add ProjectBuilder component 2022-01-12 14:55:19 +01:00
CodeDocument.cpp HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
CodeDocument.h HackStudio: Add statusbar with file and selected text information 2021-07-16 12:58:20 +02:00
Editor.cpp HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Editor.h HackStudio: Propagate errors using try_set_main_widget 2022-01-09 00:56:11 +01:00
EditorWrapper.cpp HackStudio: Propagate errors using try_set_main_widget 2022-01-09 00:56:11 +01:00
EditorWrapper.h HackStudio: Use String instead of LexicalPath 2022-01-01 14:47:23 +01:00
FindInFilesWidget.cpp Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
FindInFilesWidget.h HackStudio: Make FindInFilesWidget reset when opening new project 2021-08-22 10:30:06 +02:00
GMLPreviewWidget.cpp HackStudio: Add GML Preview action tab 2021-07-29 11:33:16 +02:00
GMLPreviewWidget.h HackStudio: Add GML Preview action tab 2021-07-29 11:33:16 +02:00
HackStudio.h HackStudio: Add HackStudio::for_each_open_file 2021-12-03 15:38:21 +01:00
HackStudioWidget.cpp HackStudio: Use ProjectBuilder to build and run the current project 2022-01-12 14:55:19 +01:00
HackStudioWidget.h HackStudio: Use ProjectBuilder to build and run the current project 2022-01-12 14:55:19 +01:00
Language.cpp HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
Language.h HackStudio: Hookup git commit message detection and highlighting 2022-01-18 09:01:16 +01:00
LanguageClient.cpp Everywhere: Fix many spelling errors 2022-01-07 10:56:59 +01:00
LanguageClient.h LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServer 2022-01-15 13:29:48 +03:30
Locator.cpp LibGUI+Applications: Rename Model::is_valid to is_within_range 2021-08-06 21:03:53 +02:00
Locator.h HackStudio: Remove unused #include 2021-11-02 17:53:22 +01:00
main.cpp HackStudio: Propagate errors using try_set_main_widget in main 2022-01-09 00:56:11 +01:00
Project.cpp HackStudio: Add Project::project_is_serenity() function 2022-01-12 14:55:19 +01:00
Project.h HackStudio: Add Project::project_is_serenity() function 2022-01-12 14:55:19 +01:00
ProjectBuilder.cpp HackStudio: Change ProjectBuilder dependency declaration logic 2022-01-19 19:57:31 +01:00
ProjectBuilder.h HackStudio: Change ProjectBuilder dependency declaration logic 2022-01-19 19:57:31 +01:00
ProjectDeclarations.cpp LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file() 2021-11-08 00:35:27 +01:00
ProjectDeclarations.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProjectFile.cpp HackStudio: Remove unused includes 2021-06-02 23:15:52 +01:00
ProjectFile.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ProjectTemplate.cpp LibCore: Use ErrorOr<T> for Core::File::copy_file() 2021-11-08 00:35:27 +01:00
ProjectTemplate.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TerminalWrapper.cpp HackStudio: Add optional parameters to TerminalWrapper::run() 2022-01-12 14:55:19 +01:00
TerminalWrapper.h HackStudio: Add optional parameters to TerminalWrapper::run() 2022-01-12 14:55:19 +01:00
ToDoEntries.cpp HackStudio: Clear ToDo entries upon opening new project 2021-08-22 10:30:06 +02:00
ToDoEntries.h HackStudio: Clear ToDo entries upon opening new project 2021-08-22 10:30:06 +02:00
ToDoEntriesWidget.cpp HackStudio: Clear ToDo entries upon opening new project 2021-08-22 10:30:06 +02:00
ToDoEntriesWidget.h HackStudio: Clear ToDo entries upon opening new project 2021-08-22 10:30:06 +02:00