ladybird/Userland/Libraries/LibJS/Bytecode
Aliaksandr Kalenik ebb3d8025c LibJS: Get this from execution context for non-arrow functions
Allows to skip function environment allocation for non-arrow functions
if the only reason it is needed is to hold `this` binding.

The parser is changed to do following:
- If a function is an arrow function and uses `this` then all functions
  in a scope chain are marked to allocate function environment for
  `this` binding.
- If a function uses `new.target` then all functions in a scope chain
  are marked to allocate function environment.

`ordinary_call_bind_this()` is changed to put `this` value in execution
context when function environment allocation is skipped.

35% improvement in Octane/typescript.js
50% improvement in Octane/deltablue.js
19% improvement in Octane/raytrace.js
2024-05-22 18:30:13 +02:00
..
ASTCodegen.cpp LibJS: Make return control flow more static 2024-05-15 04:25:14 +02:00
BasicBlock.cpp LibJS/Bytecode: Store labels as basic block index during compilation 2024-05-07 09:15:40 +02:00
BasicBlock.h LibJS/Bytecode: Do basic compare-and-jump peephole optimization 2024-05-10 15:03:24 +00:00
Builtins.cpp LibJS: Introduce Builtins 2023-11-17 19:06:25 +01:00
Builtins.h LibJS/Bytecode: Reorder Call instruction members to make it smaller 2024-05-10 15:03:24 +00:00
CodeGenerationError.cpp LibJS: Add to_string definitions to CodeGenerationError and ParserError 2023-02-17 09:14:23 -05:00
CodeGenerationError.h LibJS: Remove unused CodeGenerationError::to_deprecated_string 2023-02-17 09:14:23 -05:00
CommonImplementations.h LibJS: Get this from execution context for non-arrow functions 2024-05-22 18:30:13 +02:00
Executable.cpp LibJS/Bytecode: Move environment variable caches into instructions 2024-05-13 09:22:14 +02:00
Executable.h LibJS/Bytecode: Move environment variable caches into instructions 2024-05-13 09:22:14 +02:00
Generator.cpp LibJS: Use a local variable for arguments object when possible 2024-05-21 11:24:50 +02:00
Generator.h LibJS: Prepare yield object before re-routing it through finally 2024-05-18 18:11:10 +02:00
IdentifierTable.cpp LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index 2024-05-07 09:15:40 +02:00
IdentifierTable.h LibJS/Bytecode: Make IdentifierTableIndex a 32-bit index 2024-05-07 09:15:40 +02:00
Instruction.cpp LibJS: Join locals, constants and registers into single vector 2024-05-13 19:54:11 +02:00
Instruction.h LibJS/Bytecode: Add dedicated instruction for getting length property 2024-05-20 12:51:56 +02:00
Interpreter.cpp LibJS: Get this from execution context for non-arrow functions 2024-05-22 18:30:13 +02:00
Interpreter.h LibJS: Prepare yield object before re-routing it through finally 2024-05-18 18:11:10 +02:00
Label.cpp LibJS/Bytecode: Store labels as basic block index during compilation 2024-05-07 09:15:40 +02:00
Label.h LibJS/Bytecode: Store labels as basic block index during compilation 2024-05-07 09:15:40 +02:00
Op.h LibJS: Use a local variable for arguments object when possible 2024-05-21 11:24:50 +02:00
Operand.h LibJS: Join locals, constants and registers into single vector 2024-05-13 19:54:11 +02:00
RegexTable.cpp LibJS/Bytecode: Don't reparse regular expressions on instantiation 2023-07-13 13:30:49 +02:00
RegexTable.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Register.h LibJS: Stash thrown exception in a register before executing finalizer 2023-11-03 20:27:45 +01:00
ScopedOperand.cpp LibJS/Bytecode: Reuse bytecode registers 2024-05-09 09:12:13 +02:00
ScopedOperand.h LibJS/Bytecode: Do basic compare-and-jump peephole optimization 2024-05-10 15:03:24 +00:00
StringTable.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
StringTable.h LibJS/Bytecode: Make StringTableIndex be a 32-bit index 2024-05-10 15:03:24 +00:00