mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibJS/Bytecode: Support destructuring function parameters
To reduce code duplication, I've added new VM::execute_ast_node() helper that handles bytecode compilation if needed. 918 new passes on test262. :^)
This commit is contained in:
parent
b3a3c53007
commit
eb9298b54e
2 changed files with 21 additions and 9 deletions
|
@ -272,6 +272,10 @@ public:
|
|||
Function<ThrowCompletionOr<void>(Realm&)> host_ensure_can_compile_strings;
|
||||
Function<ThrowCompletionOr<void>(Object&)> host_ensure_can_add_private_element;
|
||||
|
||||
// Execute a specific AST node either in AST or BC interpreter, depending on which one is enabled by default.
|
||||
// NOTE: This is meant as a temporary stopgap until everything is bytecode.
|
||||
ThrowCompletionOr<Value> execute_ast_node(ASTNode const&);
|
||||
|
||||
private:
|
||||
using ErrorMessages = AK::Array<String, to_underlying(ErrorMessage::__Count)>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue