mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-22 00:41:55 +00:00
This allows us to get rid of instructions that move arguments to locals and allocate smaller JS::Value vector in ExecutionContext by reusing slots that were already allocated for arguments. With this change for following function: ```js function f(x, y) { return x + y; } ``` we now produce following bytecode: ``` [ 0] 0: Add dst:reg6, lhs:arg0, rhs:arg1 [ 10] Return value:reg6 ``` instead of: ``` [ 0] 0: GetArgument 0, dst:x~1 [ 10] GetArgument 1, dst:y~0 [ 20] Add dst:reg6, lhs:x~1, rhs:y~0 [ 30] Return value:reg6 ``` |
||
---|---|---|
.. | ||
ASTCodegen.cpp | ||
BasicBlock.cpp | ||
BasicBlock.h | ||
Builtins.cpp | ||
Builtins.h | ||
CodeGenerationError.cpp | ||
CodeGenerationError.h | ||
Executable.cpp | ||
Executable.h | ||
Generator.cpp | ||
Generator.h | ||
IdentifierTable.cpp | ||
IdentifierTable.h | ||
Instruction.cpp | ||
Instruction.h | ||
Interpreter.cpp | ||
Interpreter.h | ||
Label.cpp | ||
Label.h | ||
Op.h | ||
Operand.h | ||
RegexTable.cpp | ||
RegexTable.h | ||
Register.h | ||
ScopedOperand.cpp | ||
ScopedOperand.h | ||
StringTable.cpp | ||
StringTable.h |