1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00
serenity/Userland/Libraries/LibJS
Andreas Kling 80b1604b0a LibJS: Compile ScriptFunctions into bytecode and run them that way :^)
If there's a current Bytecode::Interpreter in action, ScriptFunction
will now compile itself into bytecode and execute in that context.

This patch also adds the Return bytecode instruction so that we can
actually return values from called functions. :^)

Return values are propagated from callee to caller via the caller's
$0 register. Bytecode::Interpreter now keeps a stack of register
"windows". These are not very efficient, but it should be pretty
straightforward to convert them to e.g a sliding register window
architecture later on.

This is pretty dang cool! :^)
2021-06-07 18:11:59 +02:00
..
Bytecode LibJS: Compile ScriptFunctions into bytecode and run them that way :^) 2021-06-07 18:11:59 +02:00
Heap LibJS: Add dbgln() to Heap::allocator_for_size() before crashing 2021-06-06 23:08:15 +01:00
Runtime LibJS: Compile ScriptFunctions into bytecode and run them that way :^) 2021-06-07 18:11:59 +02:00
Tests LibJS: Add Date.prototype.setTime() 2021-06-06 19:14:11 +01:00
AST.cpp LibJS: Move AST bytecode generation virtuals to separate cpp file 2021-06-07 18:11:59 +02:00
AST.h LibJS: Compile ScriptFunctions into bytecode and run them that way :^) 2021-06-07 18:11:59 +02:00
CMakeLists.txt LibJS: Move AST bytecode generation virtuals to separate cpp file 2021-06-07 18:11:59 +02:00
Console.cpp Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Console.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Forward.h LibJS: Start fleshing out a bytecode for the JavaScript engine :^) 2021-06-07 18:11:59 +02:00
Interpreter.cpp LibJS: Implement destructuring assignments and function parameters 2021-05-29 23:02:23 +04:30
Interpreter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Lexer.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Lexer.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
MarkupGenerator.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MarkupGenerator.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Parser.cpp AK+LibWasm+LibJS: Disallow Variant.has() on types that aren't contained 2021-06-02 18:02:47 +02:00
Parser.h LibJS: Implement destructuring assignments and function parameters 2021-05-29 23:02:23 +04:30
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 Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Token.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00